JavaScript检查是否按下F12,并自动跳转到指定地址.

180it 2021-02-26 AM 105℃ 0条

!function(e) {

function n(e) {
    function n() {
        return u
    }

    function o() {
        window.Firebug && window.Firebug.chrome && window.Firebug.chrome.isInitialized ? t("on") : (a = "off", console.log(d), console.clear(), t(a))
    }

    function t(e) {
        u !== e && (u = e, "function" == typeof c.onchange && c.onchange(e))
    }

    function r() {
        l || (l = !0, window.removeEventListener("resize", o), clearInterval(f))
    }
    "function" == typeof e && (e = {
        onchange: e
    });
    var i = (e = e || {}).delay || 500,
        c = {};
    c.onchange = e.onchange;
    var a, d = new Image;
    d.__defineGetter__("id", function() {
        a = "on"
    });
    var u = "unknown";
    c.getStatus = n;
    var f = setInterval(o, i);
    window.addEventListener("resize", o);
    var l;
    return c.free = r, c
}
var o = o || {};
o.create = n, "function" == typeof define ? (define.amd || define.cmd) && define(function() {
    return o
}) : "undefined" != typeof module && module.exports ? module.exports = o : window.jdetects = o

}(), jdetects.create(function(e) {

var a = 0;
var n = setInterval(function() {
    if ("on" == e) {
        setTimeout(function() {
            if (a == 0) {
                a = 1;
                //此处改成你要跳转的地址
                top.location.href = 'http://www.180it.com/'
            }
        }, 200)
    }
}, 100)

});

来源:https://blog.kieng.cn/2657.html

支付宝打赏支付宝打赏 微信打赏微信打赏

如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!

标签: none

JavaScript检查是否按下F12,并自动跳转到指定地址.