MegaUp.net Anti-AdBlock Nuke

Disables the Anti-AdBlock script on MegaUp.net

当前为 2019-11-04 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         MegaUp.net Anti-AdBlock Nuke
// @namespace    https://greasyfork.org/en/users/94698-freesolutions
// @version      0.2
// @description  Disables the Anti-AdBlock script on MegaUp.net
// @author       FreeSolutions
// @match        *://*.megaup.net/*
// @grant        none
// @run-at       document-start
// ==/UserScript==

if ('MutationObserver' in window)
{
    console.log('[Anti-AdBlock Killer] Creating observer');
    var observer = new MutationObserver(function (mutations, observer) {
        for (var i = 0; i < mutations.length; i++)
        {
            var mutation = mutations[i];

            if (mutation.addedNodes) {
                for (var n = 0; n < mutation.addedNodes.length; n++) {
                    var node = mutation.addedNodes[n];

                    if (node.tagName === 'SCRIPT') {
                        if (node.innerHTML.indexOf('adblock') > -1) {
                            console.log('[Anti-AdBlock Killer] Found script node! Killing...');
                            node.innerHTML = '';
                        }
                    }
                }
            }
        }
    });

    console.log('[Anti-AdBlock Killer] Sarting observer');
    observer.observe(document, {
        childList: true,
        subtree: true
    });

    window.onload = function () {
        console.log('[Anti-AdBlock Killer] Window fully loaded - killing observer');
        observer.disconnect();
    };
}