Greasy Fork

来自缓存

Greasy Fork is available in English.

B站顽固广告清除

清除B站那些无法通过 AdGuard 等扩展移除的广告(普通广告不处理)

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

/* eslint-disable strict */
// ==UserScript==
// @name            B站顽固广告清除
// @version         1.1.2.20240827
// @namespace       laster2800
// @author          Laster2800
// @description     清除B站那些无法通过 AdGuard 等扩展移除的广告(普通广告不处理)
// @icon            https://www.bilibili.com/favicon.ico
// @homepageURL     http://greasyfork.icu/zh-CN/scripts/456768
// @supportURL      http://greasyfork.icu/zh-CN/scripts/456768/feedback
// @license         LGPL-3.0
// @noframes
// @include         *://search.bilibili.com/*
// @require         https://update.greasyfork.icu/scripts/409641/1435266/UserscriptAPI.js
// @require         https://update.greasyfork.icu/scripts/432002/1161015/UserscriptAPIWait.js
// @grant           none
// @run-at          document-start
// ==/UserScript==

/* global UserscriptAPI */
const selector = 'a[href*="cm.bilibili.com"][data-target-url]'
const callback = identity => { identity.closest('.bili-video-card').parentElement.style.display = 'none' }
new UserscriptAPI().wait.executeAfterElementLoaded({ selector, callback, multiple: true, repeat: true, timeout: 0 })