NGA ADB

NGA ADB 实际上并非阻止加载广告,而是发现加载广告后将其删除,也许应该叫 Cleaner ,但是ADC这个缩写容易让人误会

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         NGA ADB
// @namespace    https://greatest.deepsurf.us/zh-CN/scripts/39474-nga-adb
// @version      0.3.1.20180311
// @icon         http://bbs.nga.cn/favicon.ico
// @description  NGA ADB 实际上并非阻止加载广告,而是发现加载广告后将其删除,也许应该叫 Cleaner ,但是ADC这个缩写容易让人误会
// @author       AgLandy
// @include      /^https?:\/\/(bbs\.ngacn\.cc|nga\.178\.com|bbs\.nga\.cn)/
// @grant        none
// @require      https://greatest.deepsurf.us/scripts/39014-nga-user-script-loader/code/NGA%20User%20Script%20Loader.js
// ==/UserScript==

//发布地址:http://bbs.ngacn.cc/read.php?tid=13647420

(function(){

    function init(usl){

        if(/adpage_insert/.test(window.location.href))
            getJump();

        let adb = commonui.adBlocker = {
            f: function(){
                usl.$('img[src="http://gg.stargame.com/images/mark.png"]').parent().parent().remove();
            }
        };

        adb.f();

        if(!usl.userScriptData.adb)
            usl.userScriptData.adb = adb.f;

    }

    (function check(){
        try{
            if(commonui.userScriptLoader.$)
                init(commonui.userScriptLoader);
            else
                setTimeout(check, 5);
        }
        catch(e){
            setTimeout(check, 50);
        }
    })();

})();