// ==UserScript== // @name 【玩的嗨】淘宝、天猫、京东、唯品会隐藏优惠券查询,自动显示历史价格和比价,拒绝虚假价格,让您购买到最优惠的商品,网购省钱小助手 长期更新,放心使用 // @namespace https://www.wandhi.com/ // @version 2.0 // @homepage https://wiki.wandhi.com // @support https:://wiki.wandhi.com // @description 拒绝虚假价格,让您购买到最优惠的商品,网购省钱小助手 // @author MaxZhang // @icon https://www.wandhi.com//favicon.ico // @require https://lib.baomitu.com/jquery/1.12.4/jquery.min.js // @require https://lib.baomitu.com/limonte-sweetalert2/11.4.7/sweetalert2.all.min.js // @require https://lib.baomitu.com/echarts/4.6.0/echarts.min.js // @require https://lib.baomitu.com/layer/2.3/layer.js // @require https://lib.baomitu.com/qrcode-generator/1.4.4/qrcode.min.js // @require https://lib.baomitu.com/FileSaver.js/2.0.5/FileSaver.min.js // @require https://lib.baomitu.com/viewerjs/1.11.3/viewer.min.js // @require https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/react/18.2.0/umd/react.production.min.js // @require https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/react-dom/18.2.0/umd/react-dom.production.min.js // @require https://registry.npmmirror.com/@douyinfe/semi-ui/2.51.0/files/dist/umd/semi-ui.min.js // @include *://item.taobao.com/* // @include *://s.taobao.com/search* // @include *://list.tmall.com/search_product.htm* // @include *://detail.tmall.com/* // @include *://chaoshi.detail.tmall.com/* // @include *://detail.tmall.hk/* // @include *://item.yiyaojd.com/* // @include *://item.jd.com/* // @include *://search.jd.com/* // @include *://item.jd.hk/* // @include *://search.kaola.com/* // @include *://goods.kaola.com* // @include *://detail.vip.com/detail-* // @include *://product.suning.com/* // @grant GM_setClipboard // @grant unsafeWindow // @grant GM_xmlhttpRequest // @grant GM_info // @grant GM_cookie // @grant GM_addStyle // @grant GM_getValue // @grant GM_setValue // @grant GM.getValue // @grant GM.setValue // @grant GM_notification // @grant GM_openInTab // @grant GM_deleteValue // @grant GM_registerMenuCommand // @grant GM_unregisterMenuCommand // @grant GM_download // @connect api.wandhi.com // @connect api.huizhek.com // @connect cdn.jsdelivr.net // @connect tool.manmanbuy.com // @connect gwdang.com // @connect scriptcat.org // @connect quark.cn // @connect openapi.baidu.com // @connect localhost // @compatible firefox // @compatible chrome // @compatible opera safari edge // @compatible safari // @compatible edge // @run-at document-end // @antifeature referral-link 此提示为GreasyFork代码规范要求含有查券功能的脚本必须添加,实际使用无任何强制跳转,代码可查,请知悉。 // @downloadURL none // ==/UserScript== (function(global, factory) { "object" == typeof exports && "undefined" != typeof module ? factory(require("react-dom"), require("sweetalert2")) : "function" == typeof define && define.amd ? define([ "react-dom", "sweetalert2" ], factory) : factory((global = "undefined" != typeof globalThis ? globalThis : global || self).ReactDOM, global.Swal); })(this, (function(ReactDOM, Swal) { "use strict"; var ReactDOM__default, Swal__default, LogLevel, BrowerType, VersionResult, Common, SiteEnum, commonjsGlobal, fingerprint2, headStyle, isChrome, isIE, hasWeakMap, ua, isNativeObject, checkFunctions, ItemType; function _interopDefaultLegacy(e) { return e && "object" == typeof e && "default" in e ? e : { default: e }; } ReactDOM__default = _interopDefaultLegacy(ReactDOM), Swal__default = _interopDefaultLegacy(Swal); const container = new Map; class Container { static Registe(type, args) { let className = this.processName(type.name); return container.has(className) ? container.get(className) : className ? (container.set(className, window.Reflect.construct(type, args)), container.get(className)) : void 0; } static processName(name) { return name.toLowerCase(); } static Require(type) { return this.Registe(type, []); } } class Logger { static log(msg, group, level) {} static debug(msg, group = "debug") { this.log(msg, group, LogLevel.debug); } static info(msg, group = "info") { this.log(msg, group, LogLevel.info); } static warn(msg, group = "warning") { this.log(msg, group, LogLevel.warn); } static error(msg, group = "error") { this.log(msg, group, LogLevel.error); } } function __awaiter(thisArg, _arguments, P, generator) { return new (P || (P = Promise))((function(resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : function adopt(value) { return value instanceof P ? value : new P((function(resolve) { resolve(value); })); }(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); })); } !function(LogLevel) { LogLevel[LogLevel.debug = 0] = "debug", LogLevel[LogLevel.info = 1] = "info", LogLevel[LogLevel.warn = 2] = "warn", LogLevel[LogLevel.error = 3] = "error"; }(LogLevel || (LogLevel = {})), function(BrowerType) { BrowerType[BrowerType.Edge = 0] = "Edge", BrowerType[BrowerType.Edg = 1] = "Edg", BrowerType[BrowerType.Chrome = 2] = "Chrome", BrowerType[BrowerType.Firefox = 3] = "Firefox", BrowerType[BrowerType.Safiri = 4] = "Safiri", BrowerType[BrowerType.Se360 = 5] = "Se360", BrowerType[BrowerType.Ie2345 = 6] = "Ie2345", BrowerType[BrowerType.Baidu = 7] = "Baidu", BrowerType[BrowerType.Liebao = 8] = "Liebao", BrowerType[BrowerType.UC = 9] = "UC", BrowerType[BrowerType.QQ = 10] = "QQ", BrowerType[BrowerType.Sogou = 11] = "Sogou", BrowerType[BrowerType.Opera = 12] = "Opera", BrowerType[BrowerType.Maxthon = 13] = "Maxthon"; }(BrowerType || (BrowerType = {})), function(VersionResult) { VersionResult[VersionResult.less = -1] = "less", VersionResult[VersionResult.equal = 0] = "equal", VersionResult[VersionResult.greater = 1] = "greater", VersionResult[VersionResult.incomparable = NaN] = "incomparable"; }(VersionResult || (VersionResult = {})); class Core { constructor() { this.url = Core.currentUrl(); } static Render(element, id) { let container = document.getElementById(id); if (!container) { let script = unsafeWindow.window.document.createElement("div"); script.id = id, unsafeWindow.window.document.head.append(script), container = document.getElementById(id); } ReactDOM__default.default.render(element, container); } static appendTo(selector, html) { $(selector).append(html); } static prepend(selector, html) { $(selector).prepend(html); } static lazyload(callback, time = 5) { return __awaiter(this, void 0, void 0, (function*() { return new Promise(resolve => { setTimeout(() => __awaiter(this, void 0, void 0, (function*() { yield callback(), resolve(); })), 1e3 * time); }); })); } static autoLazyload(is_ok, callback, time = 5) { return __awaiter(this, void 0, void 0, (function*() { return new Promise(resolve => __awaiter(this, void 0, void 0, (function*() { is_ok() ? (yield callback(), Logger.debug("\u81ea\u52a8\u5ef6\u8fdf\u56de\u8c03\u6267\u884c\u5b8c\u6bd5,\u5ef6\u65f6\u65f6\u95f4:" + time), resolve()) : setTimeout(() => { Core.autoLazyload(is_ok, callback, time).then(() => resolve()); }, 1e3 * time); }))); })); } static sleep(time) { return new Promise(resolve => { setTimeout(() => { resolve(); }, 1e3 * time); }); } static random(min, max) { let range = max - min, rand = Math.random(); return min + Math.round(rand * range); } static randStr(len = 4) { let $chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", maxPos = $chars.length, pwd = ""; for (let i = 0; i < len; i++) pwd += $chars.charAt(Math.floor(Math.random() * maxPos)); return pwd; } static background(callback, time = 5) { setInterval(() => { callback(); }, 1e3 * time); } static get head() { return unsafeWindow.window.document.head; } static isNumber(a) { return !Array.isArray(a) && a - parseFloat(a) >= 0; } static addUrl(key, url) { GM_setValue(key, url); } static openUrl(key) { this.open(GM_getValue(key)); } static getPar(option, url = window.location.search) { let v = url.match(new RegExp("[?&]" + option + "=([^&]+)", "i")); return null == v || v.length < 1 ? "" : v[1]; } static appendCss(url) { let linkCSS = document.createElement("link"); linkCSS.type = "text/css", linkCSS.rel = "stylesheet", linkCSS.href = url, Core.head.appendChild(linkCSS); } static appendCssContent(content) { let Style = document.createElement("style"); Style.innerHTML = content, Core.head.appendChild(Style); } bodyAppendCss(url) { $("body").append($('')); } static bodyAppend(html) { $("body").append(html); } static bodyPrepend(html) { $("body").prepend(html); } static appendJs(url) { let linkScript = document.createElement("script"); linkScript.type = "text/javascript", linkScript.src = url, this.head.appendChild(linkScript); } bodyAppendJs(url) { $("body").append($('