Subreddit filter

Filter the reddit popular page of terrible subreddits

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name        Subreddit filter
// @namespace   RedditPopFilter
// @version     0.0.9
// @license     Apache 2.0
// @description Filter the reddit popular page of terrible subreddits
// @author      zachmu
// @include     https://*.reddit.com/*
// @grant       none
// ==/UserScript==

var filterSub = [
    "/r/PoliticalHumor/",
    "/r/MurderedByWords/",
    "/r/ENLIGHTENEDCENTRISM/",
    "/r/SelfAwarewolves/",
    "/r/Overwatch/",
    "/r/TopMindsOfReddit/",
    "/r/ShitPostCrusaders/",
    "/r/badwomensanatomy/",
    "/r/The_Mueller/",
    "/r/IncelTears/",
    "/r/trashy/",
    "/r/JusticePorn/",
    "/r/JusticeServed/",
    "/r/thatHappened/",
    "/r/vaxxhappened/",
    "/r/Instagramreality/",
    "/r/gatekeeping/",
    "/r/KidsAreFuckingStupid/",
    "/r/fuckthesepeople/",
    "/r/iamatotalpieceofshit/",
    "/r/iamverysmart/",
    "/r/iamverybadass/",
    "/r/ihavesex/",
    "/r/EntitledBitch/",
    "/r/insanepeoplefacebook/",
    "/r/insanepeoplequora/",
    "/r/insaneparents/",
    "/r/Cringetopia/",
    "/r/Nicegirls/",
    "/r/niceguys/",
    "/r/justneckbeardthings/",
    "/r/4PanelCringe/",
    "/r/sadcringe/",
    "/r/cringe/",
    "/r/quityourbullshit/",
    "/r/entitledparents/",
    "/r/creepyPMs/",
    "/r/rareinsults/",
    "/r/AteTheOnion/",
    "/r/creepyasterisks/",
    "/r/TheRightCantMeme/",
    "/r/imveryedgy/",
    "/r/notliketheothergirls/",
    "/r/BlackPeopleTwitter/",
    "/r/TwoXChromosomes/",
    "/r/MaliciousCompliance/",
    "/r/NotHowGirlsWork/",
    "/r/ToiletPaperUSA/",
    "/r/Gamingcirclejerk/",
    "/r/PewdiepieSubmissions/",
    "/r/menwritingwomen/",
    "/r/politics/",
    "/r/worldpolitics/",
    "/r/Trumpgret/",
    "/r/WhitePeopleTwitter/",
    "/r/facepalm/",
    "/r/FragileWhiteRedditor/",
    "/r/therewasanattempt/",
    "/r/Bad_Cop_No_Donut/",
    "/r/Whatcouldgowrong/",
    "/r/holdmyfries/",
    "/r/awfuleverything/",
    "/r/NoahGetTheBoat/",
    "/r/lgbt/",
    "/r/bi_irl/",
    "/r/LeopardsAteMyFace/",
    "/r/PublicFreakout/",
    "/r/ActualPublicFreakouts/",
];

function filter() {
    var elements = document.querySelectorAll("a[data-click-id=subreddit]")
    elements.forEach(function(a, i) {
        if (filterSub.indexOf(a.attributes.href.value) >= 0) {
            a.closest("div.scrollerItem").style.display = "none"
        }
    })
}

var mutationObserver = new MutationObserver(function(mutations) {
    filter();
});

mutationObserver.observe(document.documentElement, {
    childList: true,
    subtree: true,
});

filter();