mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 00:43:49 +01:00
Auto-Refresh page if offline...
This commit is contained in:
parent
e0f84d1ce6
commit
2f27250bc8
@ -28,7 +28,7 @@ globalThis.addEventListener("activate", (ev) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function offlineContentHTML(): string {
|
function offlineContentHTML(): string {
|
||||||
return `<!doctype html>Offline. Service Worker @${_VERSION_} <button onclick="location.reload()">reload</button>`;
|
return `<!doctype html>TrashPoss @${_VERSION_} is currently offline. Retrying in 5 seconds... <button onclick="location.reload()">Reload manually</button>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
globalThis.addEventListener("fetch", (ev) => {
|
globalThis.addEventListener("fetch", (ev) => {
|
||||||
@ -48,6 +48,7 @@ globalThis.addEventListener("fetch", (ev) => {
|
|||||||
status: 200,
|
status: 200,
|
||||||
headers: {
|
headers: {
|
||||||
"content-type": "text/html",
|
"content-type": "text/html",
|
||||||
|
"Refresh": "5",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
|
Loading…
Reference in New Issue
Block a user