-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathindex.html
More file actions
39 lines (39 loc) · 1.8 KB
/
Copy pathindex.html
File metadata and controls
39 lines (39 loc) · 1.8 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
<!DOCTYPE html>
<html lang="en" data-theme="everforest">
<head>
<meta charset="UTF-8" />
<!-- Zoom locked by default so Cortex feels like a native app, not a zoomable web
page (no pinch / double-tap zoom in the mobile WKWebView). The source viewer
temporarily unlocks this while open so PDFs/slides stay zoomable — see
SourceViewer.svelte. Harmless on desktop (touch-scaling is irrelevant there). -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no" />
<title>Cortex — study OS</title>
</head>
<body>
<div id="root"></div>
<!-- DEV diagnostic: surface any webview JS error on-screen (terminal won't show webview errors). -->
<script>
(function () {
function show(msg) {
var r = document.getElementById("root");
// Only take over the screen if the app never mounted (white-screen
// catcher) — never hijack an already-rendered UI on a stray error.
if (r && r.childElementCount === 0)
r.innerHTML =
'<pre style="color:#ff8d7a;background:#0e1813;font:12px/1.5 monospace;padding:24px;white-space:pre-wrap;margin:0;height:100vh;overflow:auto">CORTEX RUNTIME ERROR\n\n' +
String(msg).replace(/[<>&]/g, function (c) {
return { "<": "<", ">": ">", "&": "&" }[c];
}) +
"</pre>";
}
window.addEventListener("error", function (e) {
show((e.error && e.error.stack) || e.message || e);
});
window.addEventListener("unhandledrejection", function (e) {
show("unhandledrejection: " + ((e.reason && e.reason.stack) || e.reason));
});
})();
</script>
<script type="module" src="/src/main.ts"></script>
</body>
</html>