您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Disable BiliBili banner advertise
// ==UserScript== // @name Disable BiliBili banner AD // @namespace Hill98 // @description Disable BiliBili banner advertise // @version 1.1.2 // @author Hill-98 // @license MIT // @icon https://www.bilibili.com/favicon.ico // @homepageURL https://github.com/Hill-98/userscripts // @supportURL https://github.com/Hill-98/userscripts/issues // @grant none // @match https://www.bilibili.com/ // @run-at document-start // ==/UserScript== const DISABLE_HANDLE_KEY = '__dbba_$$disable_handle$$'; if (sessionStorage.getItem(DISABLE_HANDLE_KEY)) { sessionStorage.removeItem(DISABLE_HANDLE_KEY); return; } let __INITIAL_DATA__ = null; class FakeString extends String { indexOf(str) { document.querySelector('.logo-img').src = str; return 1; } } document.addEventListener('DOMContentLoaded', () => { document.querySelector('a.inner-logo')?.addEventListener('dblclick', () => { sessionStorage.setItem(DISABLE_HANDLE_KEY, 'true'); location.reload(); }); }); document.addEventListener('readystatechange', () => { if (document.readyState === 'interactive') { window.__INITIAL_DATA__ = window.__INITIAL_DATA__.map((item) => { const request = item.request; if (request.url.includes('//api.bilibili.com/x/web-show/page/header')) { item.response.litpic = new FakeString(''); } return item; }); } });