-
Notifications
You must be signed in to change notification settings - Fork 0
/
service-worker.js
126 lines (124 loc) · 3.45 KB
/
service-worker.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
const cacheName = 'avant-gallery-v1';
const assets = [
'/',
'/index.html',
'/manifest.json',
'/images/icon-192x192.png', // Your app icon
'/images/icon-512x512.png', // Your app icon
// Add paths to all images and other assets you want to cache
'/images/HIGHERWAV1.png',
'/images/HIGHERWAV2.png',
'/images/HIGHERWAV3.png',
'/images/HIGHERWAV4.png',
'/images/HIGHERWAV5.png',
'/images/HIGHERWAV6.png',
'/images/HIGHERWAV7.png',
'/images/HIGHERWAV8.png',
'/images/HIGHERWAV9.png',
'/images/HIGHERWAV10.png',
'/images/HIGHERWAV11.png',
'/images/HIGHERWAV12.png',
'/images/HIGHERWAV13.png',
'/images/HIGHERWAV14.png',
'/images/HIGHERWAV15.png',
'/images/HIGHERWAV16.png',
'/images/HIGHERWAV17.png',
'/images/HIGHERWAV18.png',
'/images/HIGHERWAV19.png',
'/images/HIGHERWAV20.png',
'/images/HIGHERWAV21.png',
'/images/HIGHERWAV22.png',
'/images/HIGHERWAV23.png',
'/images/HIGHERWAV24.png',
'/images/HIGHERWAV25.png',
'/images/HIGHERWAV26.png',
'/images/HIGHERWAV27.png',
'/images/HIGHERWAV28.png',
'/images/HIGHERWAV29.png',
'/images/HIGHERWAV30.png',
'/images/HIGHERWAV31.png',
'/images/HIGHERWAV32.png',
'/images/HIGHERWAV33.png',
'/images/HIGHERWAV34.png',
'/images/HIGHERWAV35.png',
'/images/HIGHERWAV36.png',
'/images/HIGHERWAV37.png',
'/images/HIGHERWAV38.png',
'/images/HIGHERWAV39.png',
'/images/HIGHERWAV40.png',
'/images/HIGHERWAV41.png',
'/images/HIGHERWAV42.png',
'/images/HIGHERWAV43.png',
'/images/HIGHERWAV44.png',
'/images/HIGHERWAV45.png',
'/images/HIGHERWAV46.png',
'/images/HIGHERWAV47.png',
'/images/HIGHERWAV48.png',
'/images/HIGHERWAV49.png',
'/images/HIGHERWAV50.png',
'/images/HIGHERWAV51.png',
'/images/HIGHERWAV52.png',
'/images/HIGHERWAV53.png',
'/images/HIGHERWAV54.png',
'/images/HIGHERWAV55.png',
'/images/HIGHERWAV56.png',
'/images/HIGHERWAV57.png',
'/images/HIGHERWAV58.png',
'/images/HIGHERWAV59.png',
'/images/HIGHERWAV60.png',
'/images/HIGHERWAV61.png',
'/images/HIGHERWAV62.png',
'/images/HIGHERWAV63.png',
'/images/HIGHERWAV64.png',
'/images/HIGHERWAV65.png',
'/images/HIGHERWAV66.png',
'/images/HIGHERWAV67.png',
'/images/HIGHERWAV68.png',
'/images/HIGHERWAV69.png',
'/images/HIGHERWAV70.png',
'/images/HIGHERWAV71.png',
'/images/HIGHERWAV72.png',
'/images/HIGHERWAV73.png',
'/images/HIGHERWAV74.png',
'/images/HIGHERWAV75.png',
'/images/HIGHERWAV76.png',
'/images/HIGHERWAV77.png',
'/images/HIGHERWAV78.png',
'/images/HIGHERWAV79.png',
'/images/HIGHERWAV80.png',
'/images/HIGHERWAV81.png',
'/images/HIGHERWAV82.png',
'/images/HIGHERWAV83.png',
'/images/HIGHERWAV84.png',
'/images/HIGHERWAV85.png',
'/images/HIGHERWAV86.png',
'/images/HIGHERWAV87.png',
'/images/HIGHERWAV88.png',
'/images/HIGHERWAV89.png',
'/images/HIGHERWAV90.png',
'/images/HIGHERWAV91.png',
'/images/HIGHERWAV92.png',
'/images/HIGHERWAV93.png',
'/images/HIGHERWAV94.png',
'/images/HIGHERWAV95.png',
'/images/HIGHERWAV96.png',
'/images/HIGHERWAV97.png',
'/images/HIGHERWAV98.png',
'/images/HIGHERWAV99.png',
'/images/HIGHERWAV100.png'
// ... include all your image paths
];
self.addEventListener('install', (event) => {
event.waitUntil(
caches.open(cacheName).then((cache) => {
return cache.addAll(assets);
})
);
});
self.addEventListener('fetch', (event) => {
event.respondWith(
caches.match(event.request).then((response) => {
return response || fetch(event.request);
})
);
});