您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Convert external links to the raw link.
// ==UserScript== // @name ExternallinkDoctor // @namespace [email protected] // @version 0.1 // @description Convert external links to the raw link. // @author gwentmaster <[email protected]> // @match *://juejin.cn/* // @match *://www.jianshu.com/* // @grant none // ==/UserScript== (function() { 'use strict'; let hostMap = { juejin: "juejin.cn", jianshu: "jianshu.com" }; let doctorMap = { juejin: () => { document.querySelectorAll("a").forEach((a) => { let link = a.getAttribute("href"); if (/.+\:\/\/link\.juejin\.cn\/?\?.*target=/.test(link)) { let params = new URLSearchParams(new URL(link).search); a.setAttribute("href", params.get("target")); } }); }, jianshu: () => { document.querySelectorAll("a").forEach((a) => { let link = a.getAttribute("href"); if (/.+\:\/\/links.jianshu.com\/go\/?\?.*to=/.test(link)) { let params = new URLSearchParams(new URL(link).search); a.setAttribute("href", params.get("to")) } }); } }; let hostname = window.location.hostname; for (let site in hostMap) { if (hostname.indexOf(hostMap[site]) !== -1) { window.onload = doctorMap[site]; break; } } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址