NGA ADB

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

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==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);
        }
    })();

})();