// ==UserScript== // @name 「Z-Blog」开发者工具(应用中心) // @namespace wdssmq.com // @version 2.0 // @author 沉冰浮水 // @description 含搜索订单,附带隐藏未付订单,应用审核回显; // @link https://greasyfork.org/zh-CN/scripts/25662 // @null ---------------------------- // @contributionURL https://github.com/wdssmq#%E4%BA%8C%E7%BB%B4%E7%A0%81 // @contributionAmount 5.93 // @null ---------------------------- // @link https://github.com/wdssmq/userscript // @link https://afdian.net/@wdssmq // @link https://greasyfork.org/zh-CN/users/6865-wdssmq // @null ---------------------------- // @include https://app.zblogcn.com/zb_system/admin/edit.php*id=* // @include https://app.zblogcn.com/zb_users/plugin/AppBuy/shop/main.php* // @include https://app.zblogcn.com/?id=* // @grant none // @downloadURL none // ==/UserScript== // jshint esversion:6 (function () { if (!window.jQuery) { return false; } const $ = window.jQuery; let TheHtml, intVdg = 0, rmbFgu = 0; let nDate = null; let oDate; $(".SubMenu").append( '' + '搜索' ); $("#js-search").click(function () { // alert($("#search").val()); fnRun($("#search").val()); }); fnHide(""); function diff(now, old) { return parseInt((now - old) / (1000 * 60 * 60 * 24)); } function fnHide(t) { $("tr").each(function () { TheHtml = $(this).html(); if (/待付款/.test(TheHtml)) $(this).remove(); if (t === "all") $(this).remove(); }); } function fnRun(q) { intVdg = 0; rmbFgu = 0; var RegPat = new RegExp(q + ".+已付款", ""); // var RegPat = new RegExp(q, ""); fnHide("all"); fnAjax(1, RegPat); } function fnAjax(page, pat) { $.ajax({ url: "https://app.zblogcn.com/zb_users/plugin/AppBuy/shop/main.php?page=" + page, type: "get", success: function (data) { // if (/已付款/.test(data) && page < 3) { if (/已付款/.test(data)) { $(data) .find("#divMain2 table tr") .each(function () { TheHtml = $(this) .html() .replace(/[\n\s]+/g, " "); if (pat.test(TheHtml) === true) { var match = TheHtml.match(/