-
Notifications
You must be signed in to change notification settings - Fork 0
/
sw.js
270 lines (262 loc) · 14.9 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
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
importScripts('https://storage.googleapis.com/workbox-cdn/releases/6.4.2/workbox-sw.js');
const accessToken =
"pk.eyJ1IjoicmVraXNoaWtva3VkbyIsImEiOiJjazRoMmF3dncwODU2M2ttdzI2aDVqYXVwIn0.8Hb9sekgjfck6Setxk5uVg";
const style = "mapbox://styles/moritoru/ck4s6w8bd0sb51cpp9vn7ztty";
workbox.core.skipWaiting();
workbox.core.clientsClaim();
workbox.navigationPreload.enable();
// ------------------ runtime caching starts ---------------------
// frequently updated resources
workbox.routing.registerRoute(
new RegExp('jizo_project.geojson'),
new workbox.strategies.NetworkFirst({
cacheName: 'fetch-objects-cache',
}),
'GET'
);
// splash icon images
workbox.routing.registerRoute(
new RegExp('(?:icons|assets|images|mid_thumbs|small_thumbs)/.*'),
new workbox.strategies.StaleWhileRevalidate({
cacheName: 'icons',
maxEntries: 50
})
);
// manifest
workbox.routing.registerRoute(
new RegExp('manifest.json'),
new workbox.strategies.StaleWhileRevalidate()
);
// ------------------ precaching the assets ---------------------
workbox.precaching.precacheAndRoute([
// html
{'revision':'20230110', 'url':'index.html'},
// js
{'revision':'20230110', 'url':'https://unpkg.com/[email protected]/dist/leaflet.js'},
{'revision':'20230110', 'url':'https://unpkg.com/[email protected]/dist/maplibre-gl.js'},
{'revision':'20230110', 'url':'https://raw.githack.com/maplibre/maplibre-gl-leaflet/main/leaflet-maplibre-gl.js'},
{'revision':'20230110', 'url':'https://unpkg.com/[email protected]/umd/quyuan.min.js'},
{'revision':'20230110', 'url':'src/popup_template.js'},
{'revision':'20230110', 'url':'src/icon_template.js'},
{'revision':'20230110', 'url':'src/twitter_Intent_url.js'},
{'revision':'20230110', 'url':'src/oms.min.js'},
{'revision':'20230110', 'url':'src/L.Control.Locate.js'},
{'revision':'20230110', 'url':'src/main.js'},
{'revision':'20230110', 'url':'src/twitter-text-3.1.0.min.js'},
{'revision':'20230110', 'url':'https://unpkg.com/[email protected]/dist/flatgeobuf-geojson.min.js'},
// css
{'revision':'20230110', 'url':'https://cdnjs.cloudflare.com/ajax/libs/github-fork-ribbon-css/0.2.3/gh-fork-ribbon.min.css'},
{'revision':'20230110', 'url':'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css'},
{'revision':'20230110', 'url':'https://unpkg.com/[email protected]/dist/leaflet.css'},
{'revision':'20230110', 'url':'https://unpkg.com/[email protected]/dist/maplibre-gl.css'},
{'revision':'20230110', 'url':'src/L.Control.Locate.min.css'},
{'revision':'20230110', 'url':'src/style.css'},
// other
{'revision':'20230110', 'url':'manifest.json'},
// image
{'revision':'20230126', 'url':'assets/alley.png'},
{'revision':'20230126', 'url':'assets/god_minions_action.png'},
{'revision':'20230126', 'url':'assets/mount_missing.png'},
{'revision':'20230126', 'url':'assets/stone_display.png'},
{'revision':'20230126', 'url':'assets/alley_action.png'},
{'revision':'20230126', 'url':'assets/god_minions_missing.png'},
{'revision':'20230126', 'url':'assets/mount_noimg.png'},
{'revision':'20230126', 'url':'assets/stone_display_action.png'},
{'revision':'20230126', 'url':'assets/alley_missing.png'},
{'revision':'20230126', 'url':'assets/god_minions_noimg.png'},
{'revision':'20230126', 'url':'assets/myogo.png'},
{'revision':'20230126', 'url':'assets/stone_display_missing.png'},
{'revision':'20230126', 'url':'assets/alley_noimg.png'},
{'revision':'20230126', 'url':'assets/gorinto.png'},
{'revision':'20230126', 'url':'assets/myogo_action.png'},
{'revision':'20230126', 'url':'assets/stone_display_noimg.png'},
{'revision':'20230126', 'url':'assets/balustrade.png'},
{'revision':'20230126', 'url':'assets/gorinto_action.png'},
{'revision':'20230126', 'url':'assets/myogo_missing.png'},
{'revision':'20230126', 'url':'assets/stone_lantern.png'},
{'revision':'20230126', 'url':'assets/balustrade_action.png'},
{'revision':'20230126', 'url':'assets/gorinto_missing.png'},
{'revision':'20230126', 'url':'assets/myogo_noimg.png'},
{'revision':'20230126', 'url':'assets/stone_lantern_action.png'},
{'revision':'20230126', 'url':'assets/balustrade_missing.png'},
{'revision':'20230126', 'url':'assets/gorinto_noimg.png'},
{'revision':'20230126', 'url':'assets/myooh.png'},
{'revision':'20230126', 'url':'assets/stone_lantern_missing.png'},
{'revision':'20230126', 'url':'assets/balustrade_noimg.png'},
{'revision':'20230126', 'url':'assets/himachi.png'},
{'revision':'20230126', 'url':'assets/myooh_action.png'},
{'revision':'20230126', 'url':'assets/stone_lantern_noimg.png'},
{'revision':'20230126', 'url':'assets/banrei.png'},
{'revision':'20230126', 'url':'assets/himachi_action.png'},
{'revision':'20230126', 'url':'assets/myooh_missing.png'},
{'revision':'20230126', 'url':'assets/stone_missing.png'},
{'revision':'20230126', 'url':'assets/banrei_action.png'},
{'revision':'20230126', 'url':'assets/himachi_missing.png'},
{'revision':'20230126', 'url':'assets/myooh_noimg.png'},
{'revision':'20230126', 'url':'assets/stone_noimg.png'},
{'revision':'20230126', 'url':'assets/banrei_missing.png'},
{'revision':'20230126', 'url':'assets/himachi_noimg.png'},
{'revision':'20230126', 'url':'assets/new.png'},
{'revision':'20230126', 'url':'assets/stone_torii.png'},
{'revision':'20230126', 'url':'assets/banrei_noimg.png'},
{'revision':'20230126', 'url':'assets/hokora.png'},
{'revision':'20230126', 'url':'assets/nyoirin.png'},
{'revision':'20230126', 'url':'assets/stone_torii_action.png'},
{'revision':'20230126', 'url':'assets/bato.png'},
{'revision':'20230126', 'url':'assets/hokora_action.png'},
{'revision':'20230126', 'url':'assets/nyoirin_action.png'},
{'revision':'20230126', 'url':'assets/stone_torii_missing.png'},
{'revision':'20230126', 'url':'assets/bato_action.png'},
{'revision':'20230126', 'url':'assets/hokora_missing.png'},
{'revision':'20230126', 'url':'assets/nyoirin_missing.png'},
{'revision':'20230126', 'url':'assets/stone_torii_noimg.png'},
{'revision':'20230126', 'url':'assets/bato_missing.png'},
{'revision':'20230126', 'url':'assets/hokora_noimg.png'},
{'revision':'20230126', 'url':'assets/nyoirin_noimg.png'},
{'revision':'20230126', 'url':'assets/stone_tower.png'},
{'revision':'20230126', 'url':'assets/bato_noimg.png'},
{'revision':'20230126', 'url':'assets/hokyoin.png'},
{'revision':'20230126', 'url':'assets/nyorai.png'},
{'revision':'20230126', 'url':'assets/stone_tower_action.png'},
{'revision':'20230126', 'url':'assets/bosatsu.png'},
{'revision':'20230126', 'url':'assets/hokyoin_action.png'},
{'revision':'20230126', 'url':'assets/nyorai_action.png'},
{'revision':'20230126', 'url':'assets/stone_tower_missing.png'},
{'revision':'20230126', 'url':'assets/bosatsu_action.png'},
{'revision':'20230126', 'url':'assets/hokyoin_missing.png'},
{'revision':'20230126', 'url':'assets/nyorai_missing.png'},
{'revision':'20230126', 'url':'assets/stone_tower_noimg.png'},
{'revision':'20230126', 'url':'assets/bosatsu_missing.png'},
{'revision':'20230126', 'url':'assets/hokyoin_noimg.png'},
{'revision':'20230126', 'url':'assets/nyorai_noimg.png'},
{'revision':'20230126', 'url':'assets/ten_female.png'},
{'revision':'20230126', 'url':'assets/bosatsu_noimg.png'},
{'revision':'20230126', 'url':'assets/itahi.png'},
{'revision':'20230126', 'url':'assets/sekijin.png'},
{'revision':'20230126', 'url':'assets/ten_female_action.png'},
{'revision':'20230126', 'url':'assets/christ_lantern.png'},
{'revision':'20230126', 'url':'assets/itahi_action.png'},
{'revision':'20230126', 'url':'assets/sekijin_action.png'},
{'revision':'20230126', 'url':'assets/ten_female_missing.png'},
{'revision':'20230126', 'url':'assets/christ_lantern_action.png'},
{'revision':'20230126', 'url':'assets/itahi_missing.png'},
{'revision':'20230126', 'url':'assets/sekijin_missing.png'},
{'revision':'20230126', 'url':'assets/ten_female_noimg.png'},
{'revision':'20230126', 'url':'assets/christ_lantern_missing.png'},
{'revision':'20230126', 'url':'assets/itahi_noimg.png'},
{'revision':'20230126', 'url':'assets/sekijin_noimg.png'},
{'revision':'20230126', 'url':'assets/ten_male.png'},
{'revision':'20230126', 'url':'assets/christ_lantern_noimg.png'},
{'revision':'20230126', 'url':'assets/jizo.png'},
{'revision':'20230126', 'url':'assets/sekishi.png'},
{'revision':'20230126', 'url':'assets/ten_male_action.png'},
{'revision':'20230126', 'url':'assets/chukonhi.png'},
{'revision':'20230126', 'url':'assets/jizo_action.png'},
{'revision':'20230126', 'url':'assets/sekishi_action.png'},
{'revision':'20230126', 'url':'assets/ten_male_missing.png'},
{'revision':'20230126', 'url':'assets/chukonhi_action.png'},
{'revision':'20230126', 'url':'assets/jizo_missing.png'},
{'revision':'20230126', 'url':'assets/sekishi_missing.png'},
{'revision':'20230126', 'url':'assets/ten_male_noimg.png'},
{'revision':'20230126', 'url':'assets/chukonhi_missing.png'},
{'revision':'20230126', 'url':'assets/jizo_noimg.png'},
{'revision':'20230126', 'url':'assets/sekishi_noimg.png'},
{'revision':'20230126', 'url':'assets/tomb.png'},
{'revision':'20230126', 'url':'assets/chukonhi_noimg.png'},
{'revision':'20230126', 'url':'assets/kinenhi.png'},
{'revision':'20230126', 'url':'assets/shomen.png'},
{'revision':'20230126', 'url':'assets/tomb_action.png'},
{'revision':'20230126', 'url':'assets/culvert.png'},
{'revision':'20230126', 'url':'assets/kinenhi_action.png'},
{'revision':'20230126', 'url':'assets/shomen_action.png'},
{'revision':'20230126', 'url':'assets/tomb_missing.png'},
{'revision':'20230126', 'url':'assets/culvert_action.png'},
{'revision':'20230126', 'url':'assets/kinenhi_missing.png'},
{'revision':'20230126', 'url':'assets/shomen_missing.png'},
{'revision':'20230126', 'url':'assets/tomb_noimg.png'},
{'revision':'20230126', 'url':'assets/culvert_missing.png'},
{'revision':'20230126', 'url':'assets/kinenhi_noimg.png'},
{'revision':'20230126', 'url':'assets/shomen_noimg.png'},
{'revision':'20230126', 'url':'assets/tree.png'},
{'revision':'20230126', 'url':'assets/culvert_noimg.png'},
{'revision':'20230126', 'url':'assets/komainu.png'},
{'revision':'20230126', 'url':'assets/shrine.png'},
{'revision':'20230126', 'url':'assets/tree_action.png'},
{'revision':'20230126', 'url':'assets/dohyo.png'},
{'revision':'20230126', 'url':'assets/komainu_action.png'},
{'revision':'20230126', 'url':'assets/shrine_action.png'},
{'revision':'20230126', 'url':'assets/tree_missing.png'},
{'revision':'20230126', 'url':'assets/dohyo_action.png'},
{'revision':'20230126', 'url':'assets/komainu_missing.png'},
{'revision':'20230126', 'url':'assets/shrine_missing.png'},
{'revision':'20230126', 'url':'assets/tree_noimg.png'},
{'revision':'20230126', 'url':'assets/dohyo_missing.png'},
{'revision':'20230126', 'url':'assets/komainu_noimg.png'},
{'revision':'20230126', 'url':'assets/shrine_noimg.png'},
{'revision':'20230126', 'url':'assets/tsukimachi.png'},
{'revision':'20230126', 'url':'assets/dohyo_noimg.png'},
{'revision':'20230126', 'url':'assets/koshin.png'},
{'revision':'20230126', 'url':'assets/slope.png'},
{'revision':'20230126', 'url':'assets/tsukimachi_action.png'},
{'revision':'20230126', 'url':'assets/dosojin.png'},
{'revision':'20230126', 'url':'assets/koshin_action.png'},
{'revision':'20230126', 'url':'assets/slope_action.png'},
{'revision':'20230126', 'url':'assets/tsukimachi_missing.png'},
{'revision':'20230126', 'url':'assets/dosojin_action.png'},
{'revision':'20230126', 'url':'assets/koshin_missing.png'},
{'revision':'20230126', 'url':'assets/slope_missing.png'},
{'revision':'20230126', 'url':'assets/tsukimachi_noimg.png'},
{'revision':'20230126', 'url':'assets/dosojin_missing.png'},
{'revision':'20230126', 'url':'assets/koshin_noimg.png'},
{'revision':'20230126', 'url':'assets/slope_noimg.png'},
{'revision':'20230126', 'url':'assets/ukibori_gorin.png'},
{'revision':'20230126', 'url':'assets/dosojin_noimg.png'},
{'revision':'20230126', 'url':'assets/kuyohi.png'},
{'revision':'20230126', 'url':'assets/stone.png'},
{'revision':'20230126', 'url':'assets/ukibori_gorin_action.png'},
{'revision':'20230126', 'url':'assets/fujiko.png'},
{'revision':'20230126', 'url':'assets/kuyohi_action.png'},
{'revision':'20230126', 'url':'assets/stone_action.png'},
{'revision':'20230126', 'url':'assets/ukibori_gorin_missing.png'},
{'revision':'20230126', 'url':'assets/fujiko_action.png'},
{'revision':'20230126', 'url':'assets/kuyohi_missing.png'},
{'revision':'20230126', 'url':'assets/stone_bowl.png'},
{'revision':'20230126', 'url':'assets/ukibori_gorin_noimg.png'},
{'revision':'20230126', 'url':'assets/fujiko_missing.png'},
{'revision':'20230126', 'url':'assets/kuyohi_noimg.png'},
{'revision':'20230126', 'url':'assets/stone_bowl_action.png'},
{'revision':'20230126', 'url':'assets/fujiko_noimg.png'},
{'revision':'20230126', 'url':'assets/mount.png'},
{'revision':'20230126', 'url':'assets/stone_bowl_missing.png'},
{'revision':'20230126', 'url':'assets/god_minions.png'},
{'revision':'20230126', 'url':'assets/mount_action.png'},
{'revision':'20230126', 'url':'assets/stone_bowl_noimg.png'},
{'revision':'20230110', 'url':'icons/favicon-196.png'},
{'revision':'20230110', 'url':'icons/apple-icon-180.png'},
{'revision':'20230110', 'url':'icons/apple-splash-2048-2732.jpg'},
{'revision':'20230110', 'url':'icons/apple-splash-2732-2048.jpg'},
{'revision':'20230110', 'url':'icons/apple-splash-1668-2388.jpg'},
{'revision':'20230110', 'url':'icons/apple-splash-2388-1668.jpg'},
{'revision':'20230110', 'url':'icons/apple-splash-1536-2048.jpg'},
{'revision':'20230110', 'url':'icons/apple-splash-2048-1536.jpg'},
{'revision':'20230110', 'url':'icons/apple-splash-1668-2224.jpg'},
{'revision':'20230110', 'url':'icons/apple-splash-2224-1668.jpg'},
{'revision':'20230110', 'url':'icons/apple-splash-1620-2160.jpg'},
{'revision':'20230110', 'url':'icons/apple-splash-2160-1620.jpg'},
{'revision':'20230110', 'url':'icons/apple-splash-1284-2778.jpg'},
{'revision':'20230110', 'url':'icons/apple-splash-2778-1284.jpg'},
{'revision':'20230110', 'url':'icons/apple-splash-1170-2532.jpg'},
{'revision':'20230110', 'url':'icons/apple-splash-2532-1170.jpg'},
{'revision':'20230110', 'url':'icons/apple-splash-1125-2436.jpg'},
{'revision':'20230110', 'url':'icons/apple-splash-2436-1125.jpg'},
{'revision':'20230110', 'url':'icons/apple-splash-1242-2688.jpg'},
{'revision':'20230110', 'url':'icons/apple-splash-2688-1242.jpg'},
{'revision':'20230110', 'url':'icons/apple-splash-828-1792.jpg'},
{'revision':'20230110', 'url':'icons/apple-splash-1792-828.jpg'},
{'revision':'20230110', 'url':'icons/apple-splash-1242-2208.jpg'},
{'revision':'20230110', 'url':'icons/apple-splash-2208-1242.jpg'},
{'revision':'20230110', 'url':'icons/apple-splash-750-1334.jpg'},
{'revision':'20230110', 'url':'icons/apple-splash-1334-750.jpg'},
{'revision':'20230110', 'url':'icons/apple-splash-640-1136.jpg'},
{'revision':'20230110', 'url':'icons/apple-splash-1136-640.jpg'}
]);