MegaUp.net Anti-AdBlock Nuke

Disables the Anti-AdBlock script on MegaUp.net

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

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

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

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

你需要先安裝一款使用者腳本管理器擴展,比如 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();
    };
}