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
// @supportURL   https://github.com/Alorel/wikia-remove-intersitial-modal/issues
// @author       Alorel <[email protected]>
// @version      1.0.7
// @description  Skips the "skip this ad" screen when leaving wika.com to an external page
// @author       Alorel <[email protected]>
// @icon         https://cdn.rawgit.com/Alorel/wikia-remove-intersitial-modal/1.0.7/ico.png
// @include      http://*.wikia.com*
// @include      https://*.wikia.com*
// @grant        GM_openInTab
// @run-at       document-end
// @license      LGPL-2.1
// ==/UserScript==

/*
 Copyright 2016 Alorel, [email protected]
 Licenced under LGPL-2.1. Full licence at https://github.com/alorel/wikia-remove-intersitial-modal/blob/master/LICENSE
 */
(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);
    }
})();

QingJ © 2025

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