initial commit

This commit is contained in:
りき萌 2024-08-10 23:10:03 +02:00
commit caec0b8ac9
27 changed files with 4786 additions and 0 deletions

16
static/live-reload.js Normal file
View file

@ -0,0 +1,16 @@
// NOTE: The server never fulfills this request, it stalls forever.
// Once the connection is closed, we try to connect with the server until we establish a successful
// connection. Then we reload the page.
await fetch("/dev/live-reload/stall").catch(async () => {
while (true) {
try {
let response = await fetch("/dev/live-reload/back-up");
if (response.status == 200) {
window.location.reload();
break;
}
} catch (e) {
await new Promise((resolve) => setTimeout(resolve, 100));
}
}
});