// ==UserScript== // @name FR:ES - Viewer // @namespace https://www.reddit.com/user/RobotOilInc // @version 0.3.2 // @description Show all QCs in TaoBao and Yupoo // @author RobotOilInc // @match http://*/* // @grant none // @license MIT // @homepageURL https://www.qc-server.cf/ // @supportURL https://greasyfork.org/en/scripts/426976-fr-es-viewer // @include /^https?://((?:item|2)\.taobao|detail\.tmall)\.com/(item|meal_detail)\.(htm|html)\?/ // @include /^https?://world.(?:taobao|tmall).com/item/\d+.htm/ // @include /^https?://world.(?:taobao|tmall).com/item/\d+.html/ // @include /^https?://.*\.x\.yupoo\.com/albums/\d+/ // @require https://unpkg.com/js-logger@1.6.1/src/logger.min.js // @require https://unpkg.com/jquery@3.6.0/dist/jquery.min.js // @require https://unpkg.com/swagger-client@3.13.3/dist/swagger-client.browser.min.js // @require https://unpkg.com/iframe-resizer@4.3.2/js/iframeResizer.min.js // @run-at document-end // @downloadURL none // ==/UserScript== const _SWAGGER_DOC_URL = 'https://www.qc-server.cf/api/doc.json'; const _DOMAINS = ['https://localhost:8000', 'https://www.qc-server.cf']; const _VERSION = GM_info.script.version; // eslint-disable-next-line func-names (async function () { // Setup the logger. Logger.useDefaults(); // Log the start of the script. Logger.info(`Starting extension, version ${_VERSION}`); /** @type {SwaggerClient} */ let client; // Try to create Swagger client from our own documentation try { client = await new SwaggerClient({ url: _SWAGGER_DOC_URL }); } catch (error) { Logger.error(`We are unable to connect to FR:ES: ${_SWAGGER_DOC_URL}`, error); return; } const $iframe = $('