您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Removes promoted answers that have nothing to do with the question you're looking up
当前为
// ==UserScript== // @name Remove promoted answers on Quora // @namespace http://tampermonkey.net/ // @version 0.1 // @description Removes promoted answers that have nothing to do with the question you're looking up // @author A long-time Quora user annoyed by the irrelevant ads that pollute the site // @match https://www.quora.com/* // @match https://quora.com/* // @icon https://www.google.com/s2/favicons?domain=quora.com // @grant none // ==/UserScript== (function() { 'use strict'; var logRemovalsToDevConsole = false; // Change this to true to log removals to the console setInterval(function() { // search for the "Promoted by" string var xpathResult = document.evaluate("//div[contains(@class, 'qu-fontSize--small') and contains(., 'Promoted by')]", document, null, XPathResult.ANY_TYPE, null); if (xpathResult) { var textBlock = null; while ((textBlock = xpathResult.iterateNext()) !== null) { var node = textBlock; do { node = node.parentNode; } while (node && node.className.indexOf('CssComponent') == -1); // find the parent node with a CssComponent class, this is the block we want to remove if (node && node.parentNode) { logRemovalsToDevConsole && console.log('Removing promoted block', node); node.parentNode.removeChild(node); } } } }, 200); // repeat as more results are loaded (every 200ms) })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址