S1 User Blocker

Block certain user's content

10.01.2021 itibariyledir. En son verisyonu görün.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         S1 User Blocker
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Block certain user's content
// @author       冰箱研会长
// @match        https://bbs.saraba1st.com/2b/*
// ==/UserScript==

var User_Blocked = new Array("要屏蔽的用户","用半角逗号分开","还要用双引号括起来");

function S1_Reply_Blocker(NodeRoot){
    var PostLists = NodeRoot.getElementById("postlist");
    if(PostLists){
        var PostTables = PostLists.getElementsByClassName("plhin");
        for (var i=0;i< PostTables.length;i++){
            var PostTable = PostTables[i];
            if(User_Blocked.includes( PostTable.getElementsByClassName("pls favatar")[0].
                                     getElementsByClassName("authi")[0].
                                     getElementsByTagName("a")[0].
                                     innerText)){
                PostTable.parentElement.style.display = "none";
            }
        }
    }
}

function S1_Sure_Blocker(NodeRoot){
    var SureList = NodeRoot.getElementById("threadlisttableid");
    if(SureList){
        var SureAuthors = SureList.getElementsByClassName("by");
        for (var counter = 0;counter < SureAuthors.length;counter=counter + 2){
            var SureAuthor = SureAuthors[counter];
            if(User_Blocked.includes(SureAuthor.
                                     getElementsByTagName("a")[0].
                                     innerText)){
                SureAuthor.parentElement.parentElement.style.display = "none";
            }
        }
    }

}

S1_Reply_Blocker(document);
S1_Sure_Blocker(document);