您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Show all QCs in TaoBao and Yupoo
当前为
// ==UserScript== // @name FR:ES - Viewer // @namespace https://www.reddit.com/user/RobotOilInc // @author RobotOilInc // @version 1.0.0 // @description Show all QCs in TaoBao and Yupoo // @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+/ // @connect self // @connect 127.0.0.1 // @connect localhost // @require https://code.jquery.com/jquery-3.4.1.min.js // @require https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.1/iframeResizer.min.js // @run-at document-end // ==/UserScript== 'use strict'; /* jshint esversion: 8 */ /* globals $:false */ const _version = "0.1.0"; const _url = "https://localhost:8000/"; (async function () { const searchParams = new URLSearchParams(window.location.search); const $iframe = $('<iframe id="qciframe" style="border:0" />') $iframe.on('load',function () { $iframe.iFrameResize({bodyMargin: 10, bodyPadding: 10}); }); // Are we on a Yupoo album? if (window.location.hostname.includes('yupoo.com')) { const website = 'yupoo', id = window.location.href.match(/^https?:\/\/.*\.x\.yupoo\.com\/albums\/(\d+)/)[1], author = window.location.hostname.replace(".x.yupoo.com", '') $(".showalbum__imagecardwrap").append($iframe); $iframe.attr('src', _url + 'view/qc/' + website + '/' + id + '/' + author); return; } // Are we on a Taobao/Tmall item page? if (window.location.hostname.includes('taobao') || window.location.hostname.includes('tmall')) { $("#description").prepend($iframe); $iframe.attr('src', _url + 'qcdb/qcview.php?id=' + searchParams.get("id")); $iframe.css("width", "770px"); return; } console.debug("Unsupported website/missing if statement"); })();