sinzmise-cetastories 1.7.0-1717845329718 → 1.7.0-1717846414703

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. package/404/index.html +1 -1
  2. package/404.html +1 -1
  3. package/about/index.html +1 -1
  4. package/album/index.html +1 -1
  5. package/archives/2021/12/index.html +1 -1
  6. package/archives/2021/index.html +1 -1
  7. package/archives/2022/12/index.html +1 -1
  8. package/archives/2022/index.html +1 -1
  9. package/archives/2023/01/index.html +1 -1
  10. package/archives/2023/02/index.html +1 -1
  11. package/archives/2023/03/index.html +1 -1
  12. package/archives/2023/04/index.html +1 -1
  13. package/archives/2023/07/index.html +1 -1
  14. package/archives/2023/08/index.html +1 -1
  15. package/archives/2023/09/index.html +1 -1
  16. package/archives/2023/10/index.html +1 -1
  17. package/archives/2023/11/index.html +1 -1
  18. package/archives/2023/12/index.html +1 -1
  19. package/archives/2023/index.html +1 -1
  20. package/archives/2023/page/2/index.html +1 -1
  21. package/archives/2023/page/3/index.html +1 -1
  22. package/archives/2024/01/index.html +1 -1
  23. package/archives/2024/02/index.html +1 -1
  24. package/archives/2024/03/index.html +1 -1
  25. package/archives/2024/04/index.html +1 -1
  26. package/archives/2024/05/index.html +1 -1
  27. package/archives/2024/index.html +1 -1
  28. package/archives/2024/page/2/index.html +1 -1
  29. package/archives/index.html +1 -1
  30. package/archives/page/2/index.html +1 -1
  31. package/archives/page/3/index.html +1 -1
  32. package/archives/page/4/index.html +1 -1
  33. package/atom.xml +21 -21
  34. package/baidu_verify_codeva-NA6uDlCuZg.html +1 -1
  35. package/baidusitemap.xml +29 -29
  36. package/bangumis/index.html +1 -1
  37. package/bbs/index.html +1 -1
  38. package/cacheList.json +1 -1
  39. package/categories/index.html +1 -1
  40. package/categories//344/270/252/344/272/272/345/260/217/350/256/260/index.html +1 -1
  41. package/categories//344/270/252/344/272/272/345/260/217/350/256/260/page/2/index.html +1 -1
  42. package/categories//346/255/214/346/233/262/346/224/266/351/233/206/index.html +1 -1
  43. package/categories//346/270/270/346/210/217/347/233/270/345/205/263/index.html +1 -1
  44. package/categories//347/253/231/347/202/271/346/212/230/350/205/276/index.html +1 -1
  45. package/categories//347/253/231/347/202/271/346/212/230/350/205/276/page/2/index.html +1 -1
  46. package/categories//351/241/271/347/233/256/346/212/230/350/205/276/index.html +1 -1
  47. package/charts/index.html +1 -1
  48. package/comments/index.html +1 -1
  49. package/essay/index.html +1 -1
  50. package/fcircle/index.html +1 -1
  51. package/google8073542809160a67.html +1 -1
  52. package/index.html +1 -1
  53. package/link/index.html +1 -1
  54. package/music/index.html +1 -1
  55. package/package.json +1 -1
  56. package/page/2/index.html +1 -1
  57. package/page/3/index.html +1 -1
  58. package/page/4/index.html +1 -1
  59. package/posts/10021/index.html +1 -1
  60. package/posts/10045/index.html +1 -1
  61. package/posts/10996/index.html +1 -1
  62. package/posts/12779/index.html +1 -1
  63. package/posts/13624/index.html +1 -1
  64. package/posts/15748/index.html +1 -1
  65. package/posts/15842/index.html +1 -1
  66. package/posts/16107/index.html +1 -1
  67. package/posts/18063/index.html +1 -1
  68. package/posts/20412/index.html +1 -1
  69. package/posts/21375/index.html +1 -1
  70. package/posts/22945/index.html +1 -1
  71. package/posts/23021/index.html +1 -1
  72. package/posts/27531/index.html +1 -1
  73. package/posts/27762/index.html +1 -1
  74. package/posts/28536/index.html +1 -1
  75. package/posts/28733/index.html +1 -1
  76. package/posts/29196/index.html +1 -1
  77. package/posts/38917/index.html +1 -1
  78. package/posts/38964/index.html +1 -1
  79. package/posts/42487/index.html +1 -1
  80. package/posts/42580/index.html +1 -1
  81. package/posts/45875/index.html +1 -1
  82. package/posts/48762/index.html +1 -1
  83. package/posts/50710/index.html +1 -1
  84. package/posts/52677/index.html +1 -1
  85. package/posts/53662/index.html +1 -1
  86. package/posts/54386/index.html +1 -1
  87. package/posts/54481/index.html +1 -1
  88. package/posts/54787/index.html +1 -1
  89. package/posts/56467/index.html +1 -1
  90. package/posts/57692/index.html +1 -1
  91. package/posts/58203/index.html +1 -1
  92. package/posts/61417/index.html +1 -1
  93. package/posts/646/index.html +1 -1
  94. package/seas/index.html +1 -1
  95. package/sitemap.xml +46 -46
  96. package/sw-dom.js +1 -73
  97. package/sw.js +1 -586
  98. package/tags/Flash/347/233/270/345/205/263/index.html +1 -1
  99. package/tags/Steam/346/270/270/346/210/217/index.html +1 -1
  100. package/tags/Windows/350/275/257/344/273/266/index.html +1 -1
  101. package/tags/index.html +1 -1
  102. package/tags//344/270/252/344/272/272/345/260/217/350/256/260/index.html +1 -1
  103. package/tags//344/270/252/344/272/272/345/260/217/350/256/260/page/2/index.html +1 -1
  104. package/tags//345/205/266/345/256/203/346/270/270/346/210/217/index.html +1 -1
  105. package/tags//346/202/254/346/265/256/345/256/240/347/211/251-/347/234/213/346/235/277/345/250/230/index.html +1 -1
  106. package/tags//346/255/214/346/233/262/346/224/266/351/233/206/index.html +1 -1
  107. package/tags//346/270/270/346/210/217/347/233/270/345/205/263/index.html +1 -1
  108. package/tags//347/253/231/347/202/271/345/272/225/351/203/250/351/255/224/346/224/271/index.html +1 -1
  109. package/tags//347/253/231/347/202/271/346/212/230/350/205/276/index.html +1 -1
  110. package/tags//347/253/231/347/202/271/346/212/230/350/205/276/page/2/index.html +1 -1
  111. package/tags//350/207/252/345/273/272/351/203/250/347/275/262/index.html +1 -1
  112. package/tags//351/241/265/351/235/242/351/255/224/346/224/271/index.html +1 -1
  113. package/tags//351/241/271/347/233/256/346/212/230/350/205/276/index.html +1 -1
  114. package/update/index.html +1 -1
  115. package/update.json +1 -1
package/sitemap.xml CHANGED
@@ -83,7 +83,7 @@
83
83
  </url>
84
84
 
85
85
  <url>
86
- <loc>https://blog.sinzmise.top/posts/29196/</loc>
86
+ <loc>https://blog.sinzmise.top/posts/42580/</loc>
87
87
 
88
88
  <lastmod>2024-06-08</lastmod>
89
89
 
@@ -92,7 +92,7 @@
92
92
  </url>
93
93
 
94
94
  <url>
95
- <loc>https://blog.sinzmise.top/posts/28536/</loc>
95
+ <loc>https://blog.sinzmise.top/posts/56467/</loc>
96
96
 
97
97
  <lastmod>2024-06-08</lastmod>
98
98
 
@@ -101,7 +101,7 @@
101
101
  </url>
102
102
 
103
103
  <url>
104
- <loc>https://blog.sinzmise.top/posts/646/</loc>
104
+ <loc>https://blog.sinzmise.top/posts/53662/</loc>
105
105
 
106
106
  <lastmod>2024-06-08</lastmod>
107
107
 
@@ -110,7 +110,7 @@
110
110
  </url>
111
111
 
112
112
  <url>
113
- <loc>https://blog.sinzmise.top/posts/61417/</loc>
113
+ <loc>https://blog.sinzmise.top/posts/27531/</loc>
114
114
 
115
115
  <lastmod>2024-06-08</lastmod>
116
116
 
@@ -119,7 +119,7 @@
119
119
  </url>
120
120
 
121
121
  <url>
122
- <loc>https://blog.sinzmise.top/posts/58203/</loc>
122
+ <loc>https://blog.sinzmise.top/posts/29196/</loc>
123
123
 
124
124
  <lastmod>2024-06-08</lastmod>
125
125
 
@@ -128,7 +128,7 @@
128
128
  </url>
129
129
 
130
130
  <url>
131
- <loc>https://blog.sinzmise.top/posts/12779/</loc>
131
+ <loc>https://blog.sinzmise.top/posts/48762/</loc>
132
132
 
133
133
  <lastmod>2024-06-08</lastmod>
134
134
 
@@ -137,7 +137,7 @@
137
137
  </url>
138
138
 
139
139
  <url>
140
- <loc>https://blog.sinzmise.top/posts/10996/</loc>
140
+ <loc>https://blog.sinzmise.top/posts/42487/</loc>
141
141
 
142
142
  <lastmod>2024-06-08</lastmod>
143
143
 
@@ -146,7 +146,7 @@
146
146
  </url>
147
147
 
148
148
  <url>
149
- <loc>https://blog.sinzmise.top/posts/54787/</loc>
149
+ <loc>https://blog.sinzmise.top/posts/16107/</loc>
150
150
 
151
151
  <lastmod>2024-06-08</lastmod>
152
152
 
@@ -155,7 +155,7 @@
155
155
  </url>
156
156
 
157
157
  <url>
158
- <loc>https://blog.sinzmise.top/baidu_verify_codeva-NA6uDlCuZg</loc>
158
+ <loc>https://blog.sinzmise.top/posts/38917/</loc>
159
159
 
160
160
  <lastmod>2024-06-08</lastmod>
161
161
 
@@ -164,7 +164,7 @@
164
164
  </url>
165
165
 
166
166
  <url>
167
- <loc>https://blog.sinzmise.top/google8073542809160a67</loc>
167
+ <loc>https://blog.sinzmise.top/posts/21375/</loc>
168
168
 
169
169
  <lastmod>2024-06-08</lastmod>
170
170
 
@@ -173,7 +173,7 @@
173
173
  </url>
174
174
 
175
175
  <url>
176
- <loc>https://blog.sinzmise.top/categories/</loc>
176
+ <loc>https://blog.sinzmise.top/posts/57692/</loc>
177
177
 
178
178
  <lastmod>2024-06-08</lastmod>
179
179
 
@@ -182,7 +182,7 @@
182
182
  </url>
183
183
 
184
184
  <url>
185
- <loc>https://blog.sinzmise.top/fcircle/</loc>
185
+ <loc>https://blog.sinzmise.top/posts/54481/</loc>
186
186
 
187
187
  <lastmod>2024-06-08</lastmod>
188
188
 
@@ -191,7 +191,7 @@
191
191
  </url>
192
192
 
193
193
  <url>
194
- <loc>https://blog.sinzmise.top/comments/</loc>
194
+ <loc>https://blog.sinzmise.top/posts/28536/</loc>
195
195
 
196
196
  <lastmod>2024-06-08</lastmod>
197
197
 
@@ -200,7 +200,7 @@
200
200
  </url>
201
201
 
202
202
  <url>
203
- <loc>https://blog.sinzmise.top/album/</loc>
203
+ <loc>https://blog.sinzmise.top/posts/15842/</loc>
204
204
 
205
205
  <lastmod>2024-06-08</lastmod>
206
206
 
@@ -209,7 +209,7 @@
209
209
  </url>
210
210
 
211
211
  <url>
212
- <loc>https://blog.sinzmise.top/about/</loc>
212
+ <loc>https://blog.sinzmise.top/posts/15748/</loc>
213
213
 
214
214
  <lastmod>2024-06-08</lastmod>
215
215
 
@@ -218,7 +218,7 @@
218
218
  </url>
219
219
 
220
220
  <url>
221
- <loc>https://blog.sinzmise.top/essay/</loc>
221
+ <loc>https://blog.sinzmise.top/posts/10021/</loc>
222
222
 
223
223
  <lastmod>2024-06-08</lastmod>
224
224
 
@@ -227,7 +227,7 @@
227
227
  </url>
228
228
 
229
229
  <url>
230
- <loc>https://blog.sinzmise.top/bbs/</loc>
230
+ <loc>https://blog.sinzmise.top/posts/52677/</loc>
231
231
 
232
232
  <lastmod>2024-06-08</lastmod>
233
233
 
@@ -236,7 +236,7 @@
236
236
  </url>
237
237
 
238
238
  <url>
239
- <loc>https://blog.sinzmise.top/charts/</loc>
239
+ <loc>https://blog.sinzmise.top/posts/27762/</loc>
240
240
 
241
241
  <lastmod>2024-06-08</lastmod>
242
242
 
@@ -245,7 +245,7 @@
245
245
  </url>
246
246
 
247
247
  <url>
248
- <loc>https://blog.sinzmise.top/posts/42580/</loc>
248
+ <loc>https://blog.sinzmise.top/posts/646/</loc>
249
249
 
250
250
  <lastmod>2024-06-08</lastmod>
251
251
 
@@ -254,7 +254,7 @@
254
254
  </url>
255
255
 
256
256
  <url>
257
- <loc>https://blog.sinzmise.top/posts/56467/</loc>
257
+ <loc>https://blog.sinzmise.top/posts/20412/</loc>
258
258
 
259
259
  <lastmod>2024-06-08</lastmod>
260
260
 
@@ -263,7 +263,7 @@
263
263
  </url>
264
264
 
265
265
  <url>
266
- <loc>https://blog.sinzmise.top/posts/53662/</loc>
266
+ <loc>https://blog.sinzmise.top/posts/61417/</loc>
267
267
 
268
268
  <lastmod>2024-06-08</lastmod>
269
269
 
@@ -272,7 +272,7 @@
272
272
  </url>
273
273
 
274
274
  <url>
275
- <loc>https://blog.sinzmise.top/posts/27531/</loc>
275
+ <loc>https://blog.sinzmise.top/posts/58203/</loc>
276
276
 
277
277
  <lastmod>2024-06-08</lastmod>
278
278
 
@@ -281,7 +281,7 @@
281
281
  </url>
282
282
 
283
283
  <url>
284
- <loc>https://blog.sinzmise.top/posts/48762/</loc>
284
+ <loc>https://blog.sinzmise.top/posts/18063/</loc>
285
285
 
286
286
  <lastmod>2024-06-08</lastmod>
287
287
 
@@ -290,7 +290,7 @@
290
290
  </url>
291
291
 
292
292
  <url>
293
- <loc>https://blog.sinzmise.top/posts/42487/</loc>
293
+ <loc>https://blog.sinzmise.top/posts/12779/</loc>
294
294
 
295
295
  <lastmod>2024-06-08</lastmod>
296
296
 
@@ -299,7 +299,7 @@
299
299
  </url>
300
300
 
301
301
  <url>
302
- <loc>https://blog.sinzmise.top/posts/16107/</loc>
302
+ <loc>https://blog.sinzmise.top/posts/10996/</loc>
303
303
 
304
304
  <lastmod>2024-06-08</lastmod>
305
305
 
@@ -308,7 +308,7 @@
308
308
  </url>
309
309
 
310
310
  <url>
311
- <loc>https://blog.sinzmise.top/posts/38917/</loc>
311
+ <loc>https://blog.sinzmise.top/posts/28733/</loc>
312
312
 
313
313
  <lastmod>2024-06-08</lastmod>
314
314
 
@@ -317,7 +317,7 @@
317
317
  </url>
318
318
 
319
319
  <url>
320
- <loc>https://blog.sinzmise.top/posts/21375/</loc>
320
+ <loc>https://blog.sinzmise.top/posts/23021/</loc>
321
321
 
322
322
  <lastmod>2024-06-08</lastmod>
323
323
 
@@ -326,7 +326,7 @@
326
326
  </url>
327
327
 
328
328
  <url>
329
- <loc>https://blog.sinzmise.top/posts/57692/</loc>
329
+ <loc>https://blog.sinzmise.top/posts/13624/</loc>
330
330
 
331
331
  <lastmod>2024-06-08</lastmod>
332
332
 
@@ -335,7 +335,7 @@
335
335
  </url>
336
336
 
337
337
  <url>
338
- <loc>https://blog.sinzmise.top/posts/54481/</loc>
338
+ <loc>https://blog.sinzmise.top/posts/50710/</loc>
339
339
 
340
340
  <lastmod>2024-06-08</lastmod>
341
341
 
@@ -344,7 +344,7 @@
344
344
  </url>
345
345
 
346
346
  <url>
347
- <loc>https://blog.sinzmise.top/posts/15842/</loc>
347
+ <loc>https://blog.sinzmise.top/posts/10045/</loc>
348
348
 
349
349
  <lastmod>2024-06-08</lastmod>
350
350
 
@@ -353,7 +353,7 @@
353
353
  </url>
354
354
 
355
355
  <url>
356
- <loc>https://blog.sinzmise.top/posts/15748/</loc>
356
+ <loc>https://blog.sinzmise.top/posts/45875/</loc>
357
357
 
358
358
  <lastmod>2024-06-08</lastmod>
359
359
 
@@ -362,7 +362,7 @@
362
362
  </url>
363
363
 
364
364
  <url>
365
- <loc>https://blog.sinzmise.top/posts/10021/</loc>
365
+ <loc>https://blog.sinzmise.top/posts/54787/</loc>
366
366
 
367
367
  <lastmod>2024-06-08</lastmod>
368
368
 
@@ -371,7 +371,7 @@
371
371
  </url>
372
372
 
373
373
  <url>
374
- <loc>https://blog.sinzmise.top/posts/52677/</loc>
374
+ <loc>https://blog.sinzmise.top/posts/54386/</loc>
375
375
 
376
376
  <lastmod>2024-06-08</lastmod>
377
377
 
@@ -380,7 +380,7 @@
380
380
  </url>
381
381
 
382
382
  <url>
383
- <loc>https://blog.sinzmise.top/posts/27762/</loc>
383
+ <loc>https://blog.sinzmise.top/posts/22945/</loc>
384
384
 
385
385
  <lastmod>2024-06-08</lastmod>
386
386
 
@@ -389,7 +389,7 @@
389
389
  </url>
390
390
 
391
391
  <url>
392
- <loc>https://blog.sinzmise.top/posts/20412/</loc>
392
+ <loc>https://blog.sinzmise.top/posts/38964/</loc>
393
393
 
394
394
  <lastmod>2024-06-08</lastmod>
395
395
 
@@ -398,7 +398,7 @@
398
398
  </url>
399
399
 
400
400
  <url>
401
- <loc>https://blog.sinzmise.top/posts/18063/</loc>
401
+ <loc>https://blog.sinzmise.top/baidu_verify_codeva-NA6uDlCuZg</loc>
402
402
 
403
403
  <lastmod>2024-06-08</lastmod>
404
404
 
@@ -407,7 +407,7 @@
407
407
  </url>
408
408
 
409
409
  <url>
410
- <loc>https://blog.sinzmise.top/posts/28733/</loc>
410
+ <loc>https://blog.sinzmise.top/google8073542809160a67</loc>
411
411
 
412
412
  <lastmod>2024-06-08</lastmod>
413
413
 
@@ -416,7 +416,7 @@
416
416
  </url>
417
417
 
418
418
  <url>
419
- <loc>https://blog.sinzmise.top/posts/23021/</loc>
419
+ <loc>https://blog.sinzmise.top/categories/</loc>
420
420
 
421
421
  <lastmod>2024-06-08</lastmod>
422
422
 
@@ -425,7 +425,7 @@
425
425
  </url>
426
426
 
427
427
  <url>
428
- <loc>https://blog.sinzmise.top/posts/13624/</loc>
428
+ <loc>https://blog.sinzmise.top/404/</loc>
429
429
 
430
430
  <lastmod>2024-06-08</lastmod>
431
431
 
@@ -434,7 +434,7 @@
434
434
  </url>
435
435
 
436
436
  <url>
437
- <loc>https://blog.sinzmise.top/posts/50710/</loc>
437
+ <loc>https://blog.sinzmise.top/fcircle/</loc>
438
438
 
439
439
  <lastmod>2024-06-08</lastmod>
440
440
 
@@ -443,7 +443,7 @@
443
443
  </url>
444
444
 
445
445
  <url>
446
- <loc>https://blog.sinzmise.top/posts/10045/</loc>
446
+ <loc>https://blog.sinzmise.top/comments/</loc>
447
447
 
448
448
  <lastmod>2024-06-08</lastmod>
449
449
 
@@ -452,7 +452,7 @@
452
452
  </url>
453
453
 
454
454
  <url>
455
- <loc>https://blog.sinzmise.top/posts/45875/</loc>
455
+ <loc>https://blog.sinzmise.top/album/</loc>
456
456
 
457
457
  <lastmod>2024-06-08</lastmod>
458
458
 
@@ -461,7 +461,7 @@
461
461
  </url>
462
462
 
463
463
  <url>
464
- <loc>https://blog.sinzmise.top/posts/54386/</loc>
464
+ <loc>https://blog.sinzmise.top/about/</loc>
465
465
 
466
466
  <lastmod>2024-06-08</lastmod>
467
467
 
@@ -470,7 +470,7 @@
470
470
  </url>
471
471
 
472
472
  <url>
473
- <loc>https://blog.sinzmise.top/posts/22945/</loc>
473
+ <loc>https://blog.sinzmise.top/essay/</loc>
474
474
 
475
475
  <lastmod>2024-06-08</lastmod>
476
476
 
@@ -479,7 +479,7 @@
479
479
  </url>
480
480
 
481
481
  <url>
482
- <loc>https://blog.sinzmise.top/posts/38964/</loc>
482
+ <loc>https://blog.sinzmise.top/bbs/</loc>
483
483
 
484
484
  <lastmod>2024-06-08</lastmod>
485
485
 
@@ -488,7 +488,7 @@
488
488
  </url>
489
489
 
490
490
  <url>
491
- <loc>https://blog.sinzmise.top/404/</loc>
491
+ <loc>https://blog.sinzmise.top/charts/</loc>
492
492
 
493
493
  <lastmod>2024-06-08</lastmod>
494
494
 
package/sw-dom.js CHANGED
@@ -1,73 +1 @@
1
- document.addEventListener('DOMContentLoaded', () => {
2
- if (!navigator.serviceWorker?.controller) return
3
- /** 发送信息到 sw */
4
- const postMessage2SW = type => navigator.serviceWorker.controller.postMessage(type)
5
- const pjaxUpdate = url => {
6
- const type = url.endsWith('js') ? 'script' : 'link'
7
- const name = type === 'link' ? 'href' : 'src'
8
- for (let item of document.getElementsByTagName(type)) {
9
- const itUrl = item[name]
10
- if (url.length > itUrl ? url.endsWith(itUrl) : itUrl.endsWith(url)) {
11
- const newEle = document.createElement(type)
12
- const content = item.text || item.textContent || item.innerHTML || ''
13
- // noinspection JSUnresolvedReference
14
- Array.from(item.attributes).forEach(attr => newEle.setAttribute(attr.name, attr.value))
15
- newEle.appendChild(document.createTextNode(content))
16
- item.parentNode.replaceChildren(newEle, item)
17
- return true
18
- }
19
- }
20
- }
21
- const SESSION_KEY = 'updated'
22
- // noinspection JSFileReferences
23
- const onSuccess = () => {
24
- caches.match('https://id.v3/').then(function(response) {
25
- if (response) {
26
- // 如果找到了匹配的缓存响应
27
- response.json().then(function(data) {
28
- var snackbarBg =
29
- document.documentElement.getAttribute('data-theme') === 'light' ?
30
- GLOBAL_CONFIG.Snackbar.bgLight :
31
- GLOBAL_CONFIG.Snackbar.bgDark
32
- var snackbarPos = GLOBAL_CONFIG.Snackbar.position
33
- Snackbar.show({
34
- text: `已刷新缓存,更新为${GLOBAL_CONFIG.uiversion}版本最新内容`,
35
- backgroundColor: snackbarBg,
36
- duration: 30000,
37
- pos: snackbarPos,
38
- actionText: '查看更新日志',
39
- actionTextColor: '#fff',
40
- onActionClick: function(e) {
41
- location.assign("/update/");
42
- },
43
- })
44
- });
45
- } else {
46
- console.info('未找到匹配的缓存响应');
47
- }
48
- }).catch(function(error) {
49
- console.error('缓存匹配出错:', error);
50
- });
51
- };
52
- if (sessionStorage.getItem(SESSION_KEY)) {
53
- onSuccess()
54
- sessionStorage.removeItem(SESSION_KEY)
55
- } else postMessage2SW('update')
56
- navigator.serviceWorker.addEventListener('message', event => {
57
- const data = event.data
58
- sessionStorage.setItem(SESSION_KEY, data.type)
59
- const list = data.list?.filter(url => /\.(js|css)$/.test(url))
60
- if (list) {
61
- // noinspection JSUnresolvedReference
62
- if (window.Pjax?.isSupported?.())
63
- list.forEach(pjaxUpdate)
64
- location.reload()
65
- } else {
66
- const newVersion = data.new, oldVersion = data.old
67
- if (oldVersion && (newVersion.global !== oldVersion.global || newVersion.local !== oldVersion.local)) {
68
- onSuccess()
69
- }
70
- sessionStorage.removeItem(SESSION_KEY)
71
- }
72
- })
73
- })
1
+ document.addEventListener("DOMContentLoaded",(()=>{if(!navigator.serviceWorker?.controller)return;const e=e=>{const t=e.endsWith("js")?"script":"link",o="link"===t?"href":"src";for(let n of document.getElementsByTagName(t)){const r=n[o];if(e.length>r?e.endsWith(r):r.endsWith(e)){const e=document.createElement(t),o=n.text||n.textContent||n.innerHTML||"";return Array.from(n.attributes).forEach((t=>e.setAttribute(t.name,t.value))),e.appendChild(document.createTextNode(o)),n.parentNode.replaceChildren(e,n),!0}}},t="updated",o=()=>{caches.match("https://id.v3/").then((function(e){e?e.json().then((function(e){var t="light"===document.documentElement.getAttribute("data-theme")?GLOBAL_CONFIG.Snackbar.bgLight:GLOBAL_CONFIG.Snackbar.bgDark,o=GLOBAL_CONFIG.Snackbar.position;Snackbar.show({text:`已刷新缓存,更新为${GLOBAL_CONFIG.uiversion}版本最新内容`,backgroundColor:t,duration:3e4,pos:o,actionText:"查看更新日志",actionTextColor:"#fff",onActionClick:function(e){location.assign("/update/")}})})):console.info("未找到匹配的缓存响应")})).catch((function(e){console.error("缓存匹配出错:",e)}))};var n;sessionStorage.getItem(t)?(o(),sessionStorage.removeItem(t)):(n="update",navigator.serviceWorker.controller.postMessage(n)),navigator.serviceWorker.addEventListener("message",(n=>{const r=n.data;sessionStorage.setItem(t,r.type);const a=r.list?.filter((e=>/\.(js|css)$/.test(e)));if(a)window.Pjax?.isSupported?.()&&a.forEach(e),location.reload();else{const e=r.new,n=r.old;!n||e.global===n.global&&e.local===n.local||o(),sessionStorage.removeItem(t)}}))}));