RapidLeech Popup Skipper

Attempts to bypass the ad popup window on RapidLeech-based sites

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         RapidLeech Popup Skipper
// @namespace    pk.qwerty12
// @version      0.1
// @author       qwerty12
// @description  Attempts to bypass the ad popup window on RapidLeech-based sites
// @include      *
// @grant        none
// @run-at       document-end
// ==/UserScript==

(function () {
    'use strict';
    document.addEventListener("DOMContentLoaded", function() {
        var tload = document.forms['transload'];
        if (tload && document.documentElement.textContent.toLowerCase().indexOf('leech') > -1)
        {
            var btn = document.getElementsByName('btnTransload');
            if (btn && btn[0])
                btn[0].parentNode.removeChild(btn[0]);

            btn = tload.elements;
            for (var i = 0; i < btn.length; ++i) {
                var type = btn[i].type;
                if (type === 'button' || type === 'submit')
                    btn[i].parentNode.removeChild(btn[i]);
            }

            btn = document.createElement('div');
            btn.style.border = '6px lime solid';
            btn.style.width = '200px';

            var hackedbtn = document.createElement('input');
            hackedbtn.style.font = '180% arial';
            hackedbtn.style.letterSpacing = '-.05em';
            hackedbtn.style.width = '200px';
            hackedbtn.style.height = '50px';
            hackedbtn.type = 'button';
            hackedbtn.value = 'Bypass!!';
            hackedbtn.addEventListener('click', function() {
                tload.submit();
            }, false);

            btn.appendChild(hackedbtn);
            tload.appendChild(btn);
        }
    });
}());