您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
新闻类网站去除广告, V2EX, 9to5mac, MacRumors, finviz, coinglass
当前为
// ==UserScript== // @name 新闻类网站去除广告 // @name:en News website ad removal // @namespace https://banmiya.com/userscirpt/applenewsadremove // @version 1.0.7 // @description 新闻类网站去除广告, V2EX, 9to5mac, MacRumors, finviz, coinglass // @description:en News website to remove ads, V2EX, 9to5mac, MacRumors, finviz, coinglass // @author zmlu // @match https://9to5mac.com/* // @match https://www.macrumors.com/* // @match https://v2ex.com/* // @match https://finviz.com/* // @match https://www.coinglass.com/* // @icon none // @grant none // @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.3/jquery.min.js // @license MIT // ==/UserScript== (function() { 'use strict'; var url = location.href var targetNode // 9to5mac if(url.includes("9to5mac.com")){ targetNode = document.getElementById('content'); window.removeAdByZmlu = function() { $(".ad-container").hide(); $(".adsense").hide(); $(".adsbygoogle").hide(); $(".google-news-link").hide(); $(".ad-disclaimer-container").hide(); $(".google-auto-placed").hide(); $("div[data-spotim-module='pitc']").hide(); }; } // macrumors if(url.includes("macrumors.com")){ targetNode = document.getElementById('root'); window.removeAdByZmlu = function() { $("div[id^='AdThrive_Header']").each(function( index ) { $(this).parent().hide(); }); $("div[class^='sidebarblock']").hide(); $("div[id^='AdThrive_Sidebar']").hide(); $("div[class^='subscribe-']").hide(); $("div[id^='AdThrive_Content']").hide(); $("div[id^='AdThrive_Below_Post']").hide(); $("div[id^='AdThrive_Footer']").hide(); $(".adthrive-footer-message").hide(); }; } // v2ex if(url.includes("v2ex.com")){ targetNode = document.getElementById('Wrapper'); window.removeAdByZmlu = function() { $(".adsbygoogle").hide(); $("div[class^='wwads-']").hide(); }; } // finviz if(url.includes("finviz.com")){ targetNode = document.getElementsByClassName('m-0'); window.removeAdByZmlu = function() { $("#banner_position").hide(); $("#rectangle_position").hide() $("div[data-google-query-id]").hide(); }; } // coinglass if(url.includes("coinglass.com")){ targetNode = document.getElementById('__next'); window.removeAdByZmlu = function() { $(".pb20").hide(); $(".FloatAd").hide(); }; } window.removeAdByZmlu(); var config = { attributes: true, childList: true, subtree: true }; var callback = function(mutationsList) { window.removeAdByZmlu(); }; var observer = new MutationObserver(callback); observer.observe(targetNode, config); })();