diff --git a/frontend/app.html b/frontend/app.html index 0478136..198bc9a 100644 --- a/frontend/app.html +++ b/frontend/app.html @@ -2254,24 +2254,100 @@ (function() { const threshold = 160; let isDevToolsOpen = false; + let warningShown = false; - setInterval(function() { + // 增强型检测:结合窗口尺寸和debugger暂停 + function checkDevTools() { const widthThreshold = window.outerWidth - window.innerWidth > threshold; const heightThreshold = window.outerHeight - window.innerHeight > threshold; - const orientation = widthThreshold ? 'vertical' : 'horizontal'; - if (!(heightThreshold && widthThreshold) && - ((window.Firebug && window.Firebug.chrome && window.Firebug.chrome.isInitialized) || widthThreshold || heightThreshold)) { - if (!isDevToolsOpen) { - isDevToolsOpen = true; - // 检测到开发者工具打开,可以选择清空页面或重定向 - // document.body.innerHTML = '
+ 为保护系统安全,请关闭浏览器开发者工具后刷新页面 +
+ ++ 如需使用开发者工具,请联系管理员开启调试模式 +
+