您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
有什么好说的
// ==UserScript== // @name 淘宝链接自动精简 // @version 0.2 // @author me // @include https://item.taobao.com/item.htm?* // @include https://detail.tmall.com/item.htm?* // @grant none // @namespace https://gf.qytechs.cn/users/174880 // @description 有什么好说的 // ==/UserScript== (function() { function getQueryString(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r = window.location.search.substr(1).match(reg); if (r != null) return r[2]; return null; } var site = window.location.href.match(/^http(s)?:\/\/[^?]*/); var wd = getQueryString("wd"); var id = getQueryString("id"); var q = getQueryString("q"); var pureUrl; if (wd != null) { pureUrl = site[0] + "?wd=" + wd; } else if (id != null) { pureUrl = site[0] + "?id=" + id; } else if (q != null) { pureUrl = site[0] + "?q=" + q; } else if (site[0].substr(site[0].length - 13) == "view_shop.htm") { pureUrl = window.location.protocol + "//" + window.location.host; } else { pureUrl = site[0]; } if(pureUrl != window.location.href){ window.history.pushState({},0,pureUrl); //window.location.href = pureUrl; } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址