mirror of
https://github.com/pvrzz/toolscord.git
synced 2026-11-29 05:22:25 +00:00
Register service worker on window load
This commit is contained in:
@@ -1164,3 +1164,7 @@ setupColors();
|
|||||||
loadState();
|
loadState();
|
||||||
if (!editor.value) editor.value = DEFAULT_TEXT;
|
if (!editor.value) editor.value = DEFAULT_TEXT;
|
||||||
render();
|
render();
|
||||||
|
|
||||||
|
if ("serviceWorker" in navigator) {
|
||||||
|
window.addEventListener("load", () => navigator.serviceWorker.register("sw.js").catch(() => {}));
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user