Skip to content

Commit

Permalink
/
Browse files Browse the repository at this point in the history
  • Loading branch information
JayAgra committed Apr 18, 2023
1 parent eebd567 commit 1935619
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
</style>
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('sw.js', { scope: "/" });
navigator.serviceWorker.register('/sw.js', { scope: "/" });
}
</script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion src/sw.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
console.log("[SW] File Executed");

const urlsToCache = ["/form.min.js","/float.min.css","/css/fonts/whatever-v8.woff","/assets/blackjack.js","/assets/spin.css","/assets/deal.png","/assets/hit.png","/assets/stand.png","/assets/wheel.png","/assets/yummy.mp3"];
self.addEventListener("install", event => {
self.addEventListener("install", (event) => {
console.log("[SW] Service worker installed");
event.waitUntil(
caches.open("pwa-assets").then(cache => {
Expand Down

0 comments on commit 1935619

Please sign in to comment.