Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasmafra committed Sep 18, 2024
1 parent 2a3db3c commit cec9d06
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">

<link rel="icon" type="image/png" href="favicon.ico">
<link rel="manifest" href="manifest.webmanifest" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/main-menu.css" />
Expand Down
6 changes: 2 additions & 4 deletions js/PWA.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import '../sw.js';

let deferredPrompt;

export default {
Expand All @@ -8,7 +6,7 @@ export default {
if ('serviceWorker' in navigator) {
navigator.serviceWorker
.register('./sw.js')
.then(() => { console.log('Service Worker Registered'); })
.then(() => { console.log('No-Op Service Worker Registered'); })
.catch(e => { console.log('Error whilst registering service worker'); });
}
window.addEventListener("beforeinstallprompt", (e) => {
Expand All @@ -32,4 +30,4 @@ export default {
deferredPrompt = null;
});
}
}
}
9 changes: 1 addition & 8 deletions sw.js
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
self.addEventListener('install', (e) => {

});

self.addEventListener('fetch', (e) => {

});

// no-op

0 comments on commit cec9d06

Please sign in to comment.