S1 User Blocker

Block certain user's content

2021/01/10のページです。最新版はこちら

スクリプトをインストールするには、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         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);