-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
38 lines (35 loc) · 1.09 KB
/
Copy pathindex.html
File metadata and controls
38 lines (35 loc) · 1.09 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="description" content="{long_description}">
<title>{app_title}</title>
<script>
{ // Restore the original URL after a 404-redirect from GitHub Pages
const redir = new URLSearchParams(window.location.search).get('redirect');
if (redir) {
// Remove trailing slash from pathname, then join with redirect path
const base = window.location.pathname.replace(/\/$/, '');
const url = base + '/' + redir.replace(/^\//, '');
window.history.replaceState(null, '', url);
}
}
{ // Pre-seed exercise DB URL from deep-link query param before WASM starts
const db = new URLSearchParams(window.location.search).get('dl_db_url');
if (db) {
const normalized = db.endsWith('/') ? db : db + '/';
localStorage.setItem('exercise_db_url', normalized);
localStorage.removeItem('exercise_db_last_fetch');
}
}
</script>
<style>
body {
background: var(--void, black);
min-height: 100vh;
}
</style>
</head>
<body>
<div id="main"></div>
</body>
</html>