Files
poo-stack.rs/frontend/dist/index.html
LinlyBoi bb2d30e890 BOOM
2022-12-25 22:35:16 +02:00

35 lines
1.4 KiB
HTML

<!DOCTYPE html><html><head>
<meta charset="utf-8">
<title>Ze greatest</title>
<link rel="preload" href="/db-frontend-26b4e8491c3f6360_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
<link rel="modulepreload" href="/db-frontend-26b4e8491c3f6360.js"></head>
<body>
<script type="module">import init from '/db-frontend-26b4e8491c3f6360.js';init('/db-frontend-26b4e8491c3f6360_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>