Fuck Reddit Karma + Extras (Old Reddit)

Hides anything related to karma on Old.Reddit.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 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();
})();