pwa
This commit is contained in:
parent
f8415c3441
commit
a1dbb328e0
7 changed files with 61 additions and 0 deletions
|
|
@ -797,3 +797,12 @@ if (window.location.pathname === '/callback' || window.location.search.includes(
|
|||
} else {
|
||||
initializeApp();
|
||||
}
|
||||
|
||||
// Register Service Worker for PWA
|
||||
if ('serviceWorker' in navigator) {
|
||||
window.addEventListener('load', () => {
|
||||
navigator.serviceWorker.register('/sw.js')
|
||||
.then(reg => console.log('SW registered', reg))
|
||||
.catch(err => console.error('SW registration failed', err));
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue