25 lines
498 B
JavaScript
25 lines
498 B
JavaScript
self.addEventListener('install', (e) => {
|
|
e.waitUntil(
|
|
caches.open('victorytimer-v1').then((cache) => {
|
|
return cache.addAll([
|
|
'/',
|
|
'/index.html',
|
|
'/style.css',
|
|
'/app.js',
|
|
'/timer.js',
|
|
'/button.js',
|
|
'/chart.js',
|
|
'/messages.js',
|
|
'/manifest.webmanifest'
|
|
]);
|
|
})
|
|
);
|
|
});
|
|
|
|
self.addEventListener('fetch', (e) => {
|
|
e.respondWith(
|
|
caches.match(e.request).then((resp) => resp || fetch(e.request))
|
|
);
|
|
});
|
|
|