Wikia ad skipper

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

目前為 2016-05-16 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Wikia ad skipper
// @namespace    alorel.wikiaskipad
// @homepage     https://github.com/Alorel/wikia-remove-intersitial-modal
// @author       Alorel <[email protected]>
// @version      1.0.2
// @description  Skips the "skip this ad" screen when leaving wika.com to an external page
// @author       Alorel <[email protected]>
// @include      http://*.wikia.com*
// @include      https://*.wikia.com*
// @grant        GM_openInTab
// @run-at       document-end
// ==/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 || 2 == e.which);
                },
                i = 0;
            for (; i < elements.length; i++) {
                elements[i].addEventListener("click", callback);
            }
        })();

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

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

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址