-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
37 lines (34 loc) · 1.49 KB
/
index.html
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
<!DOCTYPE html><html><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>🌙</title>
<link rel="stylesheet" href="/louvre/style-29e6338276875613.css">
<link rel="preload" href="/louvre/page-dcdfc0036da8cd5e_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
<link rel="modulepreload" href="/louvre/page-dcdfc0036da8cd5e.js"></head>
<body><script type="module">import init from '/louvre/page-dcdfc0036da8cd5e.js';init('/louvre/page-dcdfc0036da8cd5e_bg.wasm');</script><script>(function () {
var protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
var url = protocol + '//' + window.location.host + '/_trunk/ws';
var poll_interval = 5000;
var reload_upon_connect = () => {
window.setTimeout(
() => {
// when we successfully reconnect, we'll force a
// reload (since we presumably lost connection to
// trunk due to it being killed, so it will have
// rebuilt on restart)
var ws = new WebSocket(url);
ws.onopen = () => window.location.reload();
ws.onclose = reload_upon_connect;
},
poll_interval);
};
var ws = new WebSocket(url);
ws.onmessage = (ev) => {
const msg = JSON.parse(ev.data);
if (msg.reload) {
window.location.reload();
}
};
ws.onclose = reload_upon_connect;
})()
</script></body></html>