fix(*): Add missing service worker registration

This commit is contained in:
Josh Creek
2023-07-12 12:06:26 +00:00
parent f71bfcfb66
commit 80cad4a6e3
+8
View File
@@ -48,6 +48,14 @@
window.addEventListener('appinstalled', (evt) => {
console.log('a2hs', 'appinstalled', evt);
});
if (window.matchMedia('(display-mode: standalone)').matches) {
installButton.style.display = 'none';
}
window.addEventListener('load', () => {
navigator.serviceWorker.register('%sveltekit.assets%/service-worker.js');
});
</script>
</body>
</html>