bazzar/crates/web/dist/index.html

45 lines
1.7 KiB
HTML

<!DOCTYPE html><html lang="pl"><head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="/logo-5d25fab096a85f61.png">
<title>Bazzar</title>
<link rel="stylesheet" href="/tailwind-ad72042a0c3f7966.css">
<link rel="copy-file" href="assets/logo.png">
<link rel="copy-file" href="tmp/tailwind.css">
<base href="/">
<link rel="preload" href="/web-edbdf95f1008e472_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
<link rel="modulepreload" href="/web-edbdf95f1008e472.js"></head>
<body>
<main id="main">
</main>
<script type="module">import init from '/web-edbdf95f1008e472.js';init('/web-edbdf95f1008e472_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>