Fuck Reddit Karma + Extras (Old Reddit)

Hides anything related to karma on Old.Reddit.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        Fuck Reddit Karma + Extras (Old Reddit)
// @author      Unbroken
// @namespace   https://*.reddit.com
// @description Hides anything related to karma on Old.Reddit.
// @include     https://*.reddit.com/*
// @version     2.07
// @icon        https://www.google.com/s2/favicons?domain=www.reddit.com
// @grant       none
// @license     GPLv3
// ==/UserScript==


(function() {
    'use strict';

    // Function to hide the message count
    function hideGarbage() {
        const messageCount = $('.message-count.badge-count');
        if (messageCount.length) {
            messageCount.hide(); // Hide the element
        }

        //This section hides anything related to "Karma"
        $(".arrow").css("display", "none");
        $(".score").css("display", "none");
        $(".rank").css("display", "none");
        $(".karma").css("display", "none");
        $(".userkarma").css("display", "none");

        $("span:contains('[score hidden]')").css("display", "none");

        //This section hides the secret santa garbage
        $(".hohoho-header").css("display", "none");
        $(".hohoho").css("display", "none");

        //This section will hide any other reddit nonsense
        $("#header-img").css("display", "none");
        $(".ad-container").css("display", "none");
        $(".premium-banner-outer").css("display", "none");
        $(".promoted").css("display", "none");
        $(".awarding-icon-container").css("display", "none");

        //This will hide the new stupid notifications bell
        $("#notifications").css("display", "none");
    }

    // Create a MutationObserver to watch for changes in the body
    const observer = new MutationObserver((mutations) => {
        mutations.forEach(() => {
            hideGarbage(); // Call the function on each mutation
        });
    });

    // Start observing the body for child node changes
    observer.observe(document.body, { childList: true, subtree: true });

    // Initial check
    hideGarbage();
})();