完善报错信息
This commit is contained in:
@@ -1458,7 +1458,7 @@ input:checked+.slider:before {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
height: 100dvh;
|
height: 100dvh;
|
||||||
z-index: 1000;
|
z-index: 9999;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
@@ -80,6 +80,20 @@
|
|||||||
observer.observe(document.documentElement, { childList: true, subtree: true });
|
observer.observe(document.documentElement, { childList: true, subtree: true });
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
<script>
|
||||||
|
// Global Error Logger for remote debugging
|
||||||
|
window.onerror = function(msg, url, line, col, error) {
|
||||||
|
var debugDiv = document.getElementById('js-debug-overlay');
|
||||||
|
if (!debugDiv) {
|
||||||
|
debugDiv = document.createElement('div');
|
||||||
|
debugDiv.id = 'js-debug-overlay';
|
||||||
|
debugDiv.style.cssText = 'position:fixed;top:0;left:0;width:100%;background:rgba(220,38,38,0.95);color:white;z-index:99999;padding:10px;font-family:monospace;font-size:12px;max-height:30vh;overflow:auto;pointer-events:none;';
|
||||||
|
document.body.appendChild(debugDiv);
|
||||||
|
}
|
||||||
|
debugDiv.innerHTML += '<div>[JS ERROR] ' + msg + ' at ' + line + ':' + col + '</div>';
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -2190,7 +2190,7 @@
|
|||||||
|
|
||||||
async function saveSiteSettings() {
|
async function saveSiteSettings() {
|
||||||
if (!user) {
|
if (!user) {
|
||||||
showSiteMessage('请先登录后操作', 'error');
|
showSiteMessage('Please login first', 'error');
|
||||||
openLoginModal();
|
openLoginModal();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user