您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Disable links to third-party sites on theoldreader.com
// ==UserScript== // @name theoldreader link disabler // @description Disable links to third-party sites on theoldreader.com // @version 1 // @match https://theoldreader.com/* // @grant none // @namespace https://gf.qytechs.cn/users/668680 // ==/UserScript== // Disable links within content of feed posts unsafeWindow.blankshield.open = function(e,t,n) {} // Disable links of titles of feed posts function disableClicks(event) { event.preventDefault() } function disableClicksForThirdPartyLinks(anchorElement) { let href = anchorElement.href; if (!(href.startsWith("https://theoldreader.com") || href.startsWith("/"))) { anchorElement.addEventListener("click", disableClicks) } } let targetNode = document.querySelector("div.content-cell") for (let element of targetNode.querySelectorAll("a[href]")) { disableClicksForThirdPartyLinks(element) } function mutationsCallback(mutations) { for (let mutation of mutations) { for (let node of mutation.addedNodes) { if (!(node instanceof HTMLElement)) continue; if (node.matches("a[href]")) { disableClicksForThirdPartyLinks(node) } for (let element of node.querySelectorAll("a[href]")) { disableClicksForThirdPartyLinks(element) } } } } let observer = new MutationObserver(mutationsCallback) observer.observe(targetNode, {childList:true, subtree:true}) // Mind the letter cases, childList and subtree.
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址