您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Hide ads in tweets. 隐藏推特中的广告。
// ==UserScript== // @name Twitter AD Filter 推特广告过滤 // @name:zh-CN Twitter AD Filter 推特广告过滤 // @namespace http://tampermonkey.net/ // @version 0.2 // @description Hide ads in tweets. 隐藏推特中的广告。 // @description:zh-CN Hide ads in tweets. 隐藏推特中的广告。 // @icon https://about.twitter.com/etc/designs/about2-twitter/public/img/favicon-32x32.png // @author gabe // @license MIT // @match https://twitter.com/* // @grant none // ==/UserScript== (function () { "use strict"; function log() { return console.info("[Twitter AD Filter]", ...arguments); } let i = 0; function hideAd(node) { try { if ( !node || node.nodeName !== "DIV" || node.getAttribute("data-testid") !== "cellInnerDiv" ) { return; } const el = node.querySelector( "div[data-testid='placementTracking'] > article" ); if (!el) { return; } const userName = el.querySelector("div[data-testid='User-Name']"); log("hide ad:", ++i, userName && userName.innerText); node.style.cssText += "display: none;"; } catch (err) { log("got err:", err.message); } } const pageObserver = new MutationObserver(function (mutations) { mutations.forEach(function (mutation) { mutation.addedNodes.forEach(hideAd); }); }); pageObserver.observe(document.body, { childList: true, subtree: true, }); document.querySelectorAll("div[data-testid='cellInnerDiv']").forEach(hideAd); log("--- start ---"); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址