mirror of
https://github.com/cfultz/mtgcsv.git
synced 2024-11-22 01:10:02 +01:00
Changed service-worker.js to sw.js
This commit is contained in:
parent
de84e04fcb
commit
8fedcefb4b
24
sw.js
Normal file
24
sw.js
Normal file
@ -0,0 +1,24 @@
|
||||
self.addEventListener('install', (event) => {
|
||||
event.waitUntil(
|
||||
caches.open('mtg-csv-generator-v1').then((cache) => {
|
||||
return cache.addAll([
|
||||
'/',
|
||||
'/index.html',
|
||||
'/styles.css',
|
||||
'/app.js',
|
||||
'/manifest.json',
|
||||
'/icon.png',
|
||||
'/cash-money.mp3',
|
||||
'/randomWords.js'
|
||||
]);
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
self.addEventListener('fetch', (event) => {
|
||||
event.respondWith(
|
||||
caches.match(event.request).then((response) => {
|
||||
return response || fetch(event.request);
|
||||
})
|
||||
);
|
||||
});
|
Loading…
Reference in New Issue
Block a user