您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
移除B站动态页面右侧的话题推荐栏和新版侧边栏
// ==UserScript== // @name 移除B站动态页右侧话题栏 // @namespace http://tampermonkey.net/ // @version 1.3 // @description 移除B站动态页面右侧的话题推荐栏和新版侧边栏 // @author Kazeharu // @match https://t.bilibili.com/* // @icon https://www.bilibili.com/favicon.ico // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; function removeElements() { // 移除右侧话题栏 const rightSidebar = document.querySelector('aside.right'); if (rightSidebar) { rightSidebar.remove(); console.log('已成功移除右侧话题栏'); } // 仅移除"回到旧版"按钮(第一个按钮) const backToOldBtn = document.querySelector('.bili-dyn-sidebar__btn:first-child'); if (backToOldBtn) { backToOldBtn.remove(); console.log('已移除回到旧版按钮'); } } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', removeElements); } else { removeElements(); } const observer = new MutationObserver(() => { if (document.querySelector('aside.right') || document.querySelector('.bili-dyn-sidebar__btn:first-child')) { removeElements(); } }); observer.observe(document.body, { childList: true, subtree: true }); })();