网站禁止浏览器审查元素代码分享

默认分类 · 2023-03-10

将以下代码添加到网站全局底部尾标签前面就可以了

     <script>
 var ConsoleManager = {
    onOpen: function() {},
    onClose: function() {},
    init: function() {
        var self = this;
        var x = new Image();
        var isOpening = false,
            isOpened = false;
        Object.defineProperty(x, 'id', {
            get: function() {
                if (!isOpening) {
                    self.onOpen();
                    isOpening = true;
                }
                isOpened = true;
            }
        });
        setInterval(function() {
            isOpened = false;
            console.info(x);
            console.clear();
            if (!isOpened && isOpening) {
                self.onClose();
                isOpening = false;
            }
        }, 200);
    }
}
ConsoleManager.onOpen = function() {
    document.documentElement.innerHTML = '<p style="text-align: center">禁止审查元素!!!梦小慀资源网:WWW.MENGTG.CN</p>';
}

ConsoleManager.onClose = function() {
    window.location.reload();
}
ConsoleManager.init();   
</script>  
  • 【入口】梦小慀资源网
  • 桂ICP备19006881号-1 桂公网安备 45012502000034号 Theme Jasmine by Kent Liao