-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.html
More file actions
45 lines (45 loc) · 2.33 KB
/
index.html
File metadata and controls
45 lines (45 loc) · 2.33 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>EXT — Local Markdown & Text Workspace</title>
<meta name="description" content="A fast, local-first workspace for Markdown and text files scattered across your folders." />
<link rel="icon" type="image/png" href="/icon.png" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
<style>
/* Prevent white flash on load */
html, body { background: #000000; }
</style>
<script>
window.addEventListener('error', (event) => {
const errorDiv = document.createElement('div');
errorDiv.style = 'position:fixed;top:0;left:0;z-index:9999;background:red;color:white;padding:20px;width:100%;font-size:16px;white-space:pre-wrap;';
errorDiv.innerText = `Error: ${event.message}\n${event.error ? event.error.stack : ''}`;
document.body.appendChild(errorDiv);
});
window.addEventListener('unhandledrejection', (event) => {
const errorDiv = document.createElement('div');
errorDiv.style = 'position:fixed;top:0;left:0;z-index:9999;background:orange;color:white;padding:20px;width:100%;font-size:16px;white-space:pre-wrap;';
errorDiv.innerText = `Unhandled Promise Rejection: ${event.reason}`;
document.body.appendChild(errorDiv);
});
const originalConsoleError = console.error;
console.error = function(...args) {
if(args[0] && args[0].message && args[0].stack) {
const errorDiv = document.createElement('div');
errorDiv.style = 'position:fixed;top:0;left:0;z-index:9999;background:darkred;color:white;padding:20px;width:100%;font-size:16px;white-space:pre-wrap;';
errorDiv.innerText = `Console Error: ${args[0].message}\n${args[0].stack}`;
document.body.appendChild(errorDiv);
}
originalConsoleError.apply(console, args);
};
</script>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>