js监听浏览器控制台打开

-

(function noDebuger() {
    function testDebuger() {
        var wWADWeTEd1 = new window["Date"]();
        debugger;
        if (new window["Date"]() - wWADWeTEd1 > 10) {
            window["document"]['body']['innerHTML'] = '<div>私有接口,请勿调用</div>';
            return true
        }
        return false
    }

    function start() {
        while (testDebuger()) {
            testDebuger()
        }
    }
    if (!testDebuger()) {
        window['onblur'] = function() {
            setTimeout(function() {
                start()
            }, 500)
        }
    } else {
        start()
    }
})();

 要放在body标签之后

-

原文地址:https://www.cnblogs.com/fqh123/p/15313349.html