decency

comment decency

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         decency
// @namespace    http://tampermonkey.net/
// @version      2024-09-13
// @description  comment decency
// @author       You
// @match        https://saidit.net/s/all/comments*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=saidit.net
// @grant        none
// @license      AGPL 3.1
// ==/UserScript==

(function() {
    'use strict';

    Object.entries(document.querySelectorAll(".usertext-body")).reduce(function(res, item) {
        console.log(item);
        let text = item[1].childNodes[0].childNodes[0].innerText.toLowerCase();
        if (text.indexOf("dick") >= 0) {
            item[1].parentNode.parentNode.parentNode.remove();
            return false;
        } else if(text.indexOf("nigger") >= 0) {
            item[1].parentNode.parentNode.parentNode.remove();
            return false;
        } else if(text.indexOf("cunt") >= 0) {
            item[1].parentNode.parentNode.parentNode.remove();
            return false;
        } else if (item[1].parentNode.parentNode.querySelector(".author").innerText == "YoMamma") {
            item[1].parentNode.parentNode.parentNode.remove();
            return false;
        } else if (item[1].parentNode.parentNode.querySelector(".author").innerText == "Oyveygoyim") {
            item[1].parentNode.parentNode.parentNode.remove();
            return false;
        } else if (item[1].parentNode.parentNode.querySelector(".author").innerText == "TheBlackSun") {
            item[1].parentNode.parentNode.parentNode.remove();
            return false;
        } else if (item[1].parentNode.parentNode.querySelector(".author").innerText.indexOf("kys") >= 0) {
            item[1].parentNode.parentNode.parentNode.remove();
            return false;
        } else if (item[1].parentNode.parentNode.querySelector(".author").innerText == "GuyWhite") {
            item[1].parentNode.parentNode.parentNode.remove();
            return false;
        } else if (item[1].parentNode.parentNode.querySelector(".author").innerText == "TotalAnon1337") {
            item[1].parentNode.parentNode.parentNode.remove();
            return false;
        } else if (item[1].parentNode.parentNode.querySelector(".author").innerText == "WoodyWoodPecker") {
            item[1].parentNode.parentNode.parentNode.remove();
            return false;
        } else if (item[1].parentNode.parentNode.querySelector(".author").innerText == "NastyWetSmear") {
            item[1].parentNode.parentNode.parentNode.remove();
            return false;
        } else if (item[1].parentNode.parentNode.querySelector(".author").innerText == "LarrySwinger2") {
            item[1].parentNode.parentNode.parentNode.remove();
            return false;
        } else if(text.indexOf(" ") < 0) {
            item[1].parentNode.parentNode.parentNode.remove();
            return false;
        } else if(text.indexOf("sexy") >= 0) {
            item[1].parentNode.parentNode.parentNode.remove();
            return false;
        }


        return true;

    }, true);


})();