Wikia ad skipper

Skips the "skip this ad" screen when leaving wikia.com to an external page

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Wikia ad skipper
// @namespace    https://github.com/AlorelUserscripts/wikia-remove-intersitial-modal
// @homepage     https://github.com/AlorelUserscripts/wikia-remove-intersitial-modal
// @supportURL   https://github.com/AlorelUserscripts/wikia-remove-intersitial-modal/issues
// @author       Alorel <[email protected]>
// @version      1.0.3
// @description  Skips the "skip this ad" screen when leaving wikia.com to an external page
// @author       Alorel <[email protected]>
// @icon         https://cdn.jsdelivr.net/gh/AlorelUserscripts/[email protected]/ico.png
// @include      http*://*.wikia.com*
// @grant        GM_openInTab
// @run-at       document-end
// @license      LGPL-2.1
// ==/UserScript==

(function () {
    'use strict';
    var main = function () {
        (function () {
            var elements = document.querySelectorAll([
                    ".exitstitial",
                    ".external",
                    ".exitw"
                ].join(",")),
                callback = function (e) {
                    e.preventDefault();
                    GM_openInTab(this.getAttribute("href"), e.ctrlKey || 1 === e.button);
                },
                i = 0;
            for (; i < elements.length; i++) {
                elements[i].addEventListener("click", callback);
            }
        })();

        (function () {
            var css = document.createElement("style");
            css.innerText = [
                    ".blackout",
                    "#ExitstitialInfobox"
                ].join(",") + '{display:none!important}';
            document.body.appendChild(css);
        })();
    };

    if ('loading' !== document.readyState) {
        main();
    } else {
        document.addEventListener('DOMContentLoaded', main);
    }
})();