add service worker

This commit is contained in:
2024-04-29 17:50:45 +02:00
parent a97d4fcb28
commit d7e3fe8906
3 changed files with 108 additions and 7 deletions

View File

@@ -89,7 +89,7 @@ function nouvelEssai() {
})
play(sonPerdu)
if (confirm(`Perdu ! Le mot à trouver était : ${motATrouver.toUpperCase()}.\nRéessayer ?`)) nouvellePartie()
else nbEssais = 0
}
}
@@ -175,4 +175,9 @@ function onsubmit(event) {
} else {
this.reportValidity()
}
}
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('service-worker.js');
}