您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
解决知乎外链与Clickable Links拓展冲突的问题
// ==UserScript== // @name 解决知乎外链与Clickable Links拓展冲突 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 解决知乎外链与Clickable Links拓展冲突的问题 // @author Chen // @match https://www.zhihu.com/question/* // @match https://zhuanlan.zhihu.com/p/* // @grant none // ==/UserScript== const observedElement = []; (function () { 'use strict'; const bodyObserver = new MutationObserver(function (mutationsList) { observeExternal(); }); bodyObserver.observe(document.querySelector("body"), { childList: true, subtree: true }); })(); function observeExternal() { document.querySelectorAll('.external > .visible').forEach(function (it) { if (!observedElement.includes(it)) { observedElement.push(it); const externalObserver = new MutationObserver(function (mutationsList) { const tags = it.getElementsByTagName("a") for (let index = 0; index < tags.length; index++) { const element = tags[index]; element.removeAttribute("href"); console.log(".external > .visible > a href removed"); } }); externalObserver.observe(it, { childList: true }); } }); }