您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
移除 B 站的广告屏蔽警告,顺便清除直播推荐等卡片
// ==UserScript== // @name Remove BiliBili AD Block Warning // @namespace https://www.xumumi.com // @version 2024-05-27 // @description 移除 B 站的广告屏蔽警告,顺便清除直播推荐等卡片 // @author xumumi // @match https://www.bilibili.com/ // @icon https://www.bilibili.com/favicon.ico // @license MIT // ==/UserScript== (function () { 'use strict'; const observer = new MutationObserver(mutations => { const tip = document.getElementsByClassName('adblock-tips')[0] tip?.parentNode?.removeChild(tip); const rmcds = document.getElementsByClassName("bili-video-card is-rcmd") for (const rcmd of rmcds) { if (isAdBlockWarning(rcmd)) { const card = rcmd.parentNode card.removeChild(rcmd) if (card.classList.value === "feed-card") card.parentNode.removeChild(card) } } removeElement("floor-single-card") removeElement("bili-live-card") removeElement("left-loc-entry") removeElement("recommended-swipe grid-anchor") const feedCards = document.getElementsByClassName("feed-card") for(const feedCard of feedCards){ feedCard.style.marginTop = 0 } const videoCards = document.getElementsByClassName("bili-video-card") for(const videoCard of videoCards){ videoCard.style.marginTop = 0 } }) observer.observe(document, { childList: true, subtree: true }) })(); function isAdBlockWarning(element) { const tip = element.childNodes; return tip[1]?.tagName === "DIV"; } function removeElement(className){ const elements = document.getElementsByClassName(className) for (const element of elements) element.parentNode.removeChild(element) }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址