This repository has been archived by the owner on Dec 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
sw.js
51 lines (50 loc) · 1.86 KB
/
sw.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
self.addEventListener('install', function (e) {
e.waitUntil(
caches.open('video-store').then(function (cache) {
return cache.addAll([
'/',
'/index.html',
'/wave.js',
'/mediaPolyfill.js',
'/hearplus.svg',
'/manifest.json',
'/manifest.webmanifest',
'/side.png',
'/icons/android-icon-144x144.png',
'/icons/android-icon-192x192.png',
'/icons/android-icon-36x36.png',
'/icons/android-icon-48x48.png',
'/icons/android-icon-72x72.png',
'/icons/android-icon-96x96.png',
'/icons/apple-icon-114x114.png',
'/icons/apple-icon-120x120.png',
'/icons/apple-icon-144x144.png',
'/icons/apple-icon-152x152.png',
'/icons/apple-icon-180x180.png',
'/icons/apple-icon-57x57.png',
'/icons/apple-icon-60x60.png',
'/icons/apple-icon-72x72.png',
'/icons/apple-icon-76x76.png',
'/icons/apple-icon-precomposed.png',
'/icons/apple-icon.png',
'/icons/favicon-16x16.png',
'/icons/favicon-32x32.png',
'/icons/favicon-96x96.png',
'/icons/favicon.ico',
'/icons/ms-icon-144x144.png',
'/icons/ms-icon-150x150.png',
'/icons/ms-icon-310x310.png',
'/icons/ms-icon-70x70.png',
'/icons//icons/hearplus1024.png',
]);
})
);
});
self.addEventListener('fetch', function (e) {
console.log(e.request.url);
e.respondWith(
caches.match(e.request).then(function (response) {
return response || fetch(e.request);
})
);
});