Greasy Fork is available in English.

Reddit Word Blacklist

Blacklist words on reddit to not see them in your feed

// ==UserScript==
// @name         Reddit Word Blacklist
// @namespace    redditwordblacklist
// @version      1.0
// @description  Blacklist words on reddit to not see them in your feed
// @author       Folfy Blue
// @match        https://www.reddit.com/*
// @grant        none
// ==/UserScript==

var wordBlacklist = ["trump","biden"];

function applyBlacklist(word) {

    for (const p of document.querySelectorAll("p")) {
        if (p.textContent.toLowerCase().includes(word.toLowerCase())) {
            console.log(p.textContent)
            p.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.remove()
        }
    }

    for (const h3 of document.querySelectorAll("h3")) {
        if (h3.textContent.toLowerCase().includes(word.toLowerCase())) {
            console.log(h3.textContent)
            h3.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.remove()
        }
    }



}

function bl() {
  wordBlacklist.forEach(applyBlacklist)
}

(function() {
    'use strict';
     setInterval(bl,200)


})();