decency

comment decency

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

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

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

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

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


})();