diff --git a/index.html b/index.html index 8521489..f86c007 100755 --- a/index.html +++ b/index.html @@ -2,13 +2,30 @@ RPG Dices + + + + + + + + + + + + + + + + + + - + @@ -77,7 +94,7 @@ - +
diff --git a/script.js b/script.js index 872197e..c8bd438 100755 --- a/script.js +++ b/script.js @@ -471,4 +471,14 @@ if (darkMode) { document.body.classList.add("dark"); document.getElementById("dark-mode-icon").src = "./assets/light.svg"; document.getElementById("dark-mode-text").innerText = "Light Mode"; -} \ No newline at end of file +} + +if ("serviceWorker" in navigator) { + window.addEventListener("load", function() { + navigator.serviceWorker + .register("/sw.js") + .then(res => console.trace("service worker registered")) + .catch(err => console.error("service worker not registered", err)) + }) + } + \ No newline at end of file