Wikia ad skipper

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

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         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);
    }
})();