minor improvement in the client-side code of the still-loading screen

master^2
Michał 'rysiek' Woźniak 2024-03-01 18:24:05 +00:00
rodzic 933bcbe7b4
commit 833ad8b07c
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -1509,11 +1509,13 @@ self.addEventListener('fetch', async event => {
if ( event.data.url === window.location.href ) {
if ( event.data.state === 'success' ) {
header.innerHTML = "Loaded, redirecting!"
document.title = "Loaded, redirecting!"
text.innerHTML = "The content has loaded, you are being redirected."
window.location.reload()
} else if ( event.data.state === 'failed' ) {
header.innerHTML = "Loading failed."
document.title = "Loading failed."
text.innerHTML = "We're sorry, we were unable to load this page."
}
if ( 'error' in event.data ) {