您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Hides the bell icon and its following separator on old Reddit
// ==UserScript== // @name Hide Reddit Notification Bell Icon and Count // @namespace http://tampermonkey.net/ // @version 1.0 // @description Hides the bell icon and its following separator on old Reddit // @match https://old.reddit.com/* // @grant none // @license MIT // ==/UserScript== (function () { function hideBell() { let notif = document.querySelector('a#notifications'); while (notif) { notif.style.display = 'none'; const next = notif.nextElementSibling; if (next && (next.classList.contains('separator') || next.classList.contains('badge-count') || next.classList.contains('message-count'))) { next.style.display = 'none'; notif = next; } else { notif = false; } } } // Run once and also when DOM updates hideBell(); const observer = new MutationObserver(hideBell); observer.observe(document.body, {childList: true, subtree: true}); })();