Make it a service worker
This commit is contained in:
parent
edf653cfe0
commit
e9c4f78d98
|
@ -59,6 +59,9 @@ function changeTemp(e) {
|
||||||
function init() {
|
function init() {
|
||||||
document.querySelector("#temp").addEventListener("input", changeTemp)
|
document.querySelector("#temp").addEventListener("input", changeTemp)
|
||||||
changeTemp()
|
changeTemp()
|
||||||
|
if (navigator.serviceWorker) {
|
||||||
|
navigator.serviceWorker.register("sw.js")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (document.readyState === "loading") {
|
if (document.readyState === "loading") {
|
||||||
|
|
Loading…
Reference in New Issue