-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
30 lines (27 loc) · 1.69 KB
/
index.html
File metadata and controls
30 lines (27 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>globeimposer</title>
</head>
<body>
<div id="root"></div>
<script>
window.onerror = function (message, source, lineno, colno, error) {
const div = document.createElement('div');
div.style.cssText = 'position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(50,0,0,0.9);color:white;z-index:9999;padding:20px;font-family:monospace;white-space:pre-wrap;overflow:auto;pointer-events:all;';
div.innerHTML = '<h1 style="color:#ff5555;font-size:24px;margin-bottom:10px;">Global Error</h1><h2 style="font-size:18px;">' + message + '</h2><p style="color:#aaa;">' + source + ':' + lineno + '</p><pre style="background:#000;padding:10px;border-radius:5px;">' + (error ? error.stack : '') + '</pre>';
document.body.appendChild(div);
};
window.addEventListener('unhandledrejection', function (event) {
const div = document.createElement('div');
div.style.cssText = 'position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(80,0,0,0.95);color:white;z-index:9999;padding:20px;font-family:monospace;white-space:pre-wrap;overflow:auto;pointer-events:all;';
div.innerHTML = '<h1 style="color:#ff5555;font-size:24px;margin-bottom:10px;">Unhandled Promise Rejection (Import Failed?)</h1><pre style="background:#000;padding:10px;border-radius:5px;">' + (event.reason ? (event.reason.stack || event.reason) : event.reason) + '</pre>';
document.body.appendChild(div);
});
</script>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>