Anti-Adblock Killer for overclockers.ru

Don't touch my Adblocker!

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         Anti-Adblock Killer for overclockers.ru
// @namespace    FIX
// @version      0.14
// @description  Don't touch my Adblocker!
// @author       raletag
// @include      *://overclockers.ru/*
// @include      *://*.overclockers.ru/*
// @grant        none
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';
    function AAK () {
        var MO = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
        if (!MO) {
            alert('ENG: Anti-Adblock Killer for overclockers.ru is not supported in this browser! \nRUS: Anti-Adblock Killer for overclockers.ru не поддерживается в данном браузере!');
            return;
        }
        new MO(function (ms) {
            var m, n;
            for (m of ms) {
                for (n of m.addedNodes) {
                    if (n.nodeType === Node.ELEMENT_NODE && n.tagName === 'SCRIPT' && /adblock/i.test(n.innerHTML)) {
                        n.innerHTML  = n.innerHTML.replace(/\$(.*)["']body["'](.*);/ig,'');
                        console.log('Anti-Adblock killed');
                    }
                }
            }
        }).observe(document, {childList:true, subtree:true});
    }
    var scr = document.createElement('script'),
        meta = document.createElement('meta');
    meta.httpEquiv = 'Cache-Control';
    meta.content = 'max-age=1, must-revalidate';
    scr.textContent = '(' + AAK.toString() + ')();';
    (document.documentElement||document).appendChild(meta);
    (document.documentElement||document).appendChild(scr);
})();