Greasy Fork广告狗屏蔽

Greasy Fork官方不封广告狗,那么我们只能自己屏蔽

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

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

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

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

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

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

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Greasy Fork广告狗屏蔽
// @namespace    https://greasyfork.org/zh-CN/users/76579-%E4%BB%99%E5%9C%A3
// @version      0.1
// @description  Greasy Fork官方不封广告狗,那么我们只能自己屏蔽
// @author       仙圣
// @include      *://greasyfork.org/*/scripts*
// ==/UserScript==

//屏蔽词列表。
//屏蔽词的双引号为英文半角引号,逗号也是,请勿忘记加逗号。
    var blackList = [
        'dfwofeibi',
    ];
function 屏蔽某人(){
    var target = document.querySelectorAll("li");

    for (var i = 0;i < target.length; i++){
        if (target[i].querySelectorAll("dd.script-list-author>span>a")[0] != null){
            var node = target[i].querySelectorAll("dd.script-list-author>span>a")[0];

            for (var j = 0 ;j < blackList.length; j++){
                //用户名在黑名单中则删掉
                if (node.innerHTML.indexOf(blackList[j]) > -1){
                    target[i].remove();
                    console.log(node);
                }
            }
        }
    }
}
setTimeout(function(){屏蔽某人();}, 2000);