您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
bilibili,B站 屏蔽首页小火箭推广广告
当前为
// ==UserScript== // @name 去你妈的批站诈骗广告 // @namespace http://tampermonkey.net/ // @version 1.0 // @description bilibili,B站 屏蔽首页小火箭推广广告 // @author 爆菊大师 // @match *://*.bilibili.com/* // @grant none // @license MIT // ==/UserScript== (function () { 'use strict'; function checkPseudoElements() { const cards = document.querySelectorAll('.bili-video-card.is-rcmd'); cards.forEach((card) => { const beforeContent = window.getComputedStyle(card, '::before').content; const afterContent = window.getComputedStyle(card, '::after').content; if ( beforeContent.includes('该内容被AdGuard/AdBlock类插件屏蔽') || afterContent.includes('请检查插件以恢复正常内容展示') ) { card.style.display = 'none'; return; } const children = card.children; for (let child of children) { const childBeforeContent = window.getComputedStyle(child, '::before').content; if (childBeforeContent.includes('该内容被AdGuard/AdBlock类插件屏蔽')) { card.style.display = 'none'; break; } } }); } checkPseudoElements(); const observer = new MutationObserver(() => { checkPseudoElements(); }); observer.observe(document.body, { childList: true, subtree: true }); })();