![]() |
1
Yuesh1 11 天前
|
2
Wvg9eBo3U0c8BLd2 11 天前
以后所有的内容创作都是 AI 输出的, 网络世界还有什么意思!
|
3
EdsionRookie OP @Yuesh1 最好用 Chrome
|
4
EdsionRookie OP @lolita89201 加快流程的工具,不是代替真人
|
![]() |
5
LeslieLeung 11 天前
看到一楼的回复好奇试了下。
这个防控制台打开的方法也太拙劣了,检测逻辑就是两个:一个控制台高度阈值,一个开发者工具快捷键拦截。甚至因为 arc 本身的布局,一打开就会触发检测。 绕过方法:Arc 浏览器全屏,把开发者工具弹出方式改为单独窗口。 ``` checkConsoleOpen: function checkConsoleOpen() { var threshold = 160; // 自定义控制台高度阈值 setInterval(function () { if (window.outerHeight - window.innerHeight > threshold || window.outerWidth - window.innerWidth > threshold) { alert("控制台已打开,禁止查看源代码!"); window.location.reload(); // 可选:刷新页面或隐藏内容 } }, 1000); } if (true) { if (localStorage.getItem('allowopenf12') != true && localStorage.getItem('allowopenf12') != 'true') { this.checkConsoleOpen(); // 禁用右键菜单 document.addEventListener('contextmenu', function (event) { return event.preventDefault(); }); document.addEventListener('keydown', function (event) { if (event.key === 'F12' || // F12 event.ctrlKey && event.shiftKey && event.key === 'I' || // Ctrl+Shift+I event.ctrlKey && event.shiftKey && event.key === 'J' || // Ctrl+Shift+J event.ctrlKey && event.key === 'U' // Ctrl+U ) { event.preventDefault(); } }); } } ``` 说实话,开发者工具真没必要防吧,想看你接口我抓包也行,一万种方法。 |