q78kgblog 0.0.0-1730686126404 → 0.0.0-1730686573410

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/404.html +1 -933
  2. package/about/index.html +1 -1085
  3. package/archives/2023/02/index.html +1 -933
  4. package/archives/2023/04/index.html +1 -933
  5. package/archives/2023/05/index.html +1 -933
  6. package/archives/2023/08/index.html +1 -933
  7. package/archives/2023/09/index.html +1 -933
  8. package/archives/2023/index.html +1 -933
  9. package/archives/2024/01/index.html +1 -933
  10. package/archives/2024/02/index.html +1 -933
  11. package/archives/2024/index.html +1 -933
  12. package/archives/index.html +1 -933
  13. package/assets/css/APlayer.min.css +1 -3
  14. package/assets/js/APlayer.min.js +154 -2
  15. package/assets/js/Meting.min.js +3 -1
  16. package/atom.xml +9 -9
  17. package/baidusitemap.xml +8 -8
  18. package/bangumis/index.html +1 -1055
  19. package/bigpie/index.html +1 -705
  20. package/categories/Hexo/index.html +1 -945
  21. package/categories/index.html +1 -701
  22. package/categories//345/271/264/347/273/210/346/200/273/347/273/223/index.html +1 -945
  23. package/categories//347/264/240/346/235/220/index.html +1 -945
  24. package/categories//351/227/262/350/201/212/346/235/202/350/260/210/index.html +1 -945
  25. package/content.json +1 -1
  26. package/css/swiper.min.css +1 -703
  27. package/fcircle/index.html +1 -724
  28. package/fontawesome/index.html +1 -707
  29. package/index.html +1 -1078
  30. package/js/aplayersave.js +1 -1
  31. package/js/baiduhistory.js +1 -1
  32. package/js/browser.js +1 -1
  33. package/js/calendar.js +1 -1
  34. package/js/cate.js +1 -1
  35. package/js/commentBarrage.js +13 -13
  36. package/js/commentsCount.js +1 -1
  37. package/js/copy.js +1 -1
  38. package/js/countup.js +1 -1
  39. package/js/cursor.js +1 -1
  40. package/js/day.js +2 -2
  41. package/js/dianzan.js +1 -1
  42. package/js/dis.js +3 -3
  43. package/js/fixbugpjax.js +1 -1
  44. package/js/fixed_card_widget.js +1 -1
  45. package/js/fps.js +1 -1
  46. package/js/gitalker.js +1 -1
  47. package/js/gsap.min.js +1 -4
  48. package/js/heimu.js +1 -1
  49. package/js/hide.show.js +1 -1
  50. package/js/languages.js +1 -1
  51. package/js/latest.js +1 -1
  52. package/js/local-search.js +2 -2
  53. package/js/lunar.js +1 -1
  54. package/js/lyxTalk.js +1 -1
  55. package/js/main.js +2 -2
  56. package/js/nav.js +1 -1
  57. package/js/noie.js +1 -1
  58. package/js/owo.js +1 -1
  59. package/js/people.js +2 -2
  60. package/js/pikaday.js +1 -109
  61. package/js/random.js +1 -1
  62. package/js/randomFriend.js +1 -1
  63. package/js/resizeTop.js +1 -1
  64. package/js/rightmenu.js +3 -3
  65. package/js/sakura.js +1 -1
  66. package/js/search/algolia.js +4 -4
  67. package/js/search/local-search.js +1 -1
  68. package/js/settings.js +2 -2
  69. package/js/sitetime.js +1 -1
  70. package/js/smooth-scrolling.js +1 -1
  71. package/js/sw-toolbox.js +1 -1
  72. package/js/swiperinit.js +1 -1
  73. package/js/tw_cn.js +1 -1
  74. package/js/utils.js +1 -1
  75. package/js/welcome.js +1 -1
  76. package/js/welcomeconsole.js +1 -1
  77. package/links/index.html +1 -932
  78. package/live2d-widget/autoload.js +19 -63
  79. package/live2d-widget/demo/demo.html +1 -34
  80. package/live2d-widget/demo/login.html +1 -271
  81. package/live2d-widget/live2d.min.js +45 -1
  82. package/live2d-widget/rollup.config.js +2 -35
  83. package/live2d-widget/src/index.js +4 -175
  84. package/live2d-widget/src/message.js +1 -22
  85. package/live2d-widget/src/model.js +1 -75
  86. package/live2d-widget/src/tools.js +1 -78
  87. package/live2d-widget/src/utils.js +1 -5
  88. package/live2d-widget/src/waifu-tips.js +1 -3
  89. package/live2d-widget/waifu-tips.js +7 -2
  90. package/live2d-widget/waifu.css +1 -310
  91. package/noie.html +1 -69
  92. package/othersite/index.html +1 -770
  93. package/package.json +1 -1
  94. package/people.html +1 -24
  95. package/posts/164ef646/index.html +1 -1018
  96. package/posts/228c2ef8/index.html +1 -1005
  97. package/posts/a9a6c1fb/index.html +1 -1032
  98. package/posts/ad884987/index.html +1 -1005
  99. package/posts/c262e439/index.html +1 -993
  100. package/posts/c81531cf/index.html +1 -1071
  101. package/posts/de1f83f4/index.html +1 -1061
  102. package/posts/e54f7476/index.html +1 -1053
  103. package/random.html +1 -27
  104. package/sitemap.txt +8 -8
  105. package/sitemap.xml +18 -18
  106. package/sw.js +2 -2
  107. package/swReg.js +1 -1
  108. package/tags/AI/index.html +1 -946
  109. package/tags/Butterfly/index.html +1 -946
  110. package/tags/Cloudflare/index.html +1 -946
  111. package/tags/DiffSinger/index.html +1 -946
  112. package/tags/Hexo/index.html +1 -946
  113. package/tags/Next/index.html +1 -946
  114. package/tags/RAID/index.html +1 -946
  115. package/tags/Vercel/index.html +1 -946
  116. package/tags/Workers/index.html +1 -946
  117. package/tags/index.html +1 -701
  118. package/tags//344/270/273/351/242/230/index.html +1 -946
  119. package/tags//345/206/231/344/275/234/index.html +1 -946
  120. package/tags//345/245/263/346/200/247/346/204/217/350/257/206/index.html +1 -946
  121. package/tags//345/255/246/344/271/240/index.html +1 -946
  122. package/tags//345/256/266/351/207/214/344/272/221/index.html +1 -946
  123. package/tags//345/271/264/347/273/210/346/200/273/347/273/223/index.html +1 -946
  124. package/tags//346/212/230/350/205/276/index.html +1 -946
  125. package/tags//346/227/245/345/270/270/index.html +1 -946
  126. package/tags//346/234/215/345/212/241/345/231/250/index.html +1 -946
  127. package/tags//346/265/252/346/275/256/index.html +1 -946
  128. package/tags//347/256/200/347/210/261/index.html +1 -946
  129. package/tags//350/207/252/345/212/250/346/240/207/346/263/250/index.html +1 -946
  130. package/tags//350/256/272/346/226/207/index.html +1 -946
  131. package/tags//350/260/267/346/255/214/347/277/273/350/257/221/index.html +1 -946
  132. package/tags//350/264/237/350/275/275/345/235/207/350/241/241/index.html +1 -946
  133. package/tags//351/207/221/345/217/245/index.html +1 -946
  134. package/tags//351/255/224/346/224/271/index.html +1 -946
package/random.html CHANGED
@@ -1,27 +1 @@
1
- <body onload="javascript:dogo();">
2
- <script>
3
- function dogo(){
4
- var urls=[
5
- "https://yumetsuki.moe/posts/c262e439/",
6
- "https://yumetsuki.moe/posts/e54f7476/",
7
- "https://yumetsuki.moe/posts/164ef646/",
8
- "https://yumetsuki.moe/posts/228c2ef8/",
9
- "https://yumetsuki.moe/posts/a9a6c1fb/",
10
- "https://yumetsuki.moe/posts/ad884987/",
11
- "https://yumetsuki.moe/posts/c81531cf/",
12
- "https://yumetsuki.moe/posts/de1f83f4/",
13
- "https://yumetsuki.moe/manifest.json",
14
- "https://yumetsuki.moe/othersite/index.html",
15
- "https://yumetsuki.moe/tags/index.html",
16
- "https://yumetsuki.moe/links/index.html",
17
- "https://yumetsuki.moe/about/index.html",
18
- "https://yumetsuki.moe/bangumis/index.html",
19
- "https://yumetsuki.moe/bigpie/index.html",
20
- "https://yumetsuki.moe/categories/index.html",
21
- "https://yumetsuki.moe/fcircle/index.html",
22
- "https://yumetsuki.moe/fontawesome/index.html",
23
- ];
24
- n = Math.floor(Math.random()*urls.length);
25
- location.href= urls[n];
26
- }
27
- </script>
1
+ <body onload="dogo()"><script>function dogo(){var t=["https://yumetsuki.moe/posts/c81531cf/","https://yumetsuki.moe/posts/de1f83f4/","https://yumetsuki.moe/posts/c262e439/","https://yumetsuki.moe/posts/164ef646/","https://yumetsuki.moe/posts/e54f7476/","https://yumetsuki.moe/posts/228c2ef8/","https://yumetsuki.moe/posts/ad884987/","https://yumetsuki.moe/posts/a9a6c1fb/","https://yumetsuki.moe/manifest.json","https://yumetsuki.moe/othersite/index.html","https://yumetsuki.moe/tags/index.html","https://yumetsuki.moe/links/index.html","https://yumetsuki.moe/about/index.html","https://yumetsuki.moe/bangumis/index.html","https://yumetsuki.moe/bigpie/index.html","https://yumetsuki.moe/categories/index.html","https://yumetsuki.moe/fcircle/index.html","https://yumetsuki.moe/fontawesome/index.html"];n=Math.floor(Math.random()*t.length),location.href=t[n]}</script></body>
package/sitemap.txt CHANGED
@@ -1,11 +1,11 @@
1
+ https://yumetsuki.moe/posts/c81531cf/
2
+ https://yumetsuki.moe/posts/de1f83f4/
1
3
  https://yumetsuki.moe/posts/c262e439/
2
- https://yumetsuki.moe/posts/e54f7476/
3
4
  https://yumetsuki.moe/posts/164ef646/
5
+ https://yumetsuki.moe/posts/e54f7476/
4
6
  https://yumetsuki.moe/posts/228c2ef8/
5
- https://yumetsuki.moe/posts/a9a6c1fb/
6
7
  https://yumetsuki.moe/posts/ad884987/
7
- https://yumetsuki.moe/posts/c81531cf/
8
- https://yumetsuki.moe/posts/de1f83f4/
8
+ https://yumetsuki.moe/posts/a9a6c1fb/
9
9
  https://yumetsuki.moe/manifest.json
10
10
  https://yumetsuki.moe/othersite/index.html
11
11
  https://yumetsuki.moe/tags/index.html
@@ -29,14 +29,14 @@ https://yumetsuki.moe/tags/%E6%9C%8D%E5%8A%A1%E5%99%A8/
29
29
  https://yumetsuki.moe/tags/%E6%8A%98%E8%85%BE/
30
30
  https://yumetsuki.moe/tags/%E5%AE%B6%E9%87%8C%E4%BA%91/
31
31
  https://yumetsuki.moe/tags/RAID/
32
- https://yumetsuki.moe/tags/%E7%AE%80%E7%88%B1/
33
- https://yumetsuki.moe/tags/%E5%A5%B3%E6%80%A7%E6%84%8F%E8%AF%86/
34
- https://yumetsuki.moe/tags/%E8%AE%BA%E6%96%87/
35
32
  https://yumetsuki.moe/tags/Cloudflare/
36
33
  https://yumetsuki.moe/tags/Vercel/
37
34
  https://yumetsuki.moe/tags/%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1/
38
35
  https://yumetsuki.moe/tags/%E8%B0%B7%E6%AD%8C%E7%BF%BB%E8%AF%91/
39
36
  https://yumetsuki.moe/tags/Workers/
37
+ https://yumetsuki.moe/tags/%E7%AE%80%E7%88%B1/
38
+ https://yumetsuki.moe/tags/%E5%A5%B3%E6%80%A7%E6%84%8F%E8%AF%86/
39
+ https://yumetsuki.moe/tags/%E8%AE%BA%E6%96%87/
40
40
  https://yumetsuki.moe/tags/%E9%87%91%E5%8F%A5/
41
41
  https://yumetsuki.moe/tags/%E5%86%99%E4%BD%9C/
42
42
  https://yumetsuki.moe/tags/%E5%AD%A6%E4%B9%A0/
@@ -44,6 +44,6 @@ https://yumetsuki.moe/tags/DiffSinger/
44
44
  https://yumetsuki.moe/tags/%E8%87%AA%E5%8A%A8%E6%A0%87%E6%B3%A8/
45
45
  https://yumetsuki.moe/tags/AI/
46
46
  https://yumetsuki.moe/categories/%E5%B9%B4%E7%BB%88%E6%80%BB%E7%BB%93/
47
- https://yumetsuki.moe/categories/%E9%97%B2%E8%81%8A%E6%9D%82%E8%B0%88/
48
47
  https://yumetsuki.moe/categories/Hexo/
48
+ https://yumetsuki.moe/categories/%E9%97%B2%E8%81%8A%E6%9D%82%E8%B0%88/
49
49
  https://yumetsuki.moe/categories/%E7%B4%A0%E6%9D%90/
package/sitemap.xml CHANGED
@@ -2,7 +2,7 @@
2
2
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3
3
 
4
4
  <url>
5
- <loc>https://yumetsuki.moe/posts/c262e439/</loc>
5
+ <loc>https://yumetsuki.moe/posts/c81531cf/</loc>
6
6
 
7
7
  <lastmod>2024-11-04</lastmod>
8
8
 
@@ -11,7 +11,7 @@
11
11
  </url>
12
12
 
13
13
  <url>
14
- <loc>https://yumetsuki.moe/posts/e54f7476/</loc>
14
+ <loc>https://yumetsuki.moe/posts/de1f83f4/</loc>
15
15
 
16
16
  <lastmod>2024-11-04</lastmod>
17
17
 
@@ -20,7 +20,7 @@
20
20
  </url>
21
21
 
22
22
  <url>
23
- <loc>https://yumetsuki.moe/posts/164ef646/</loc>
23
+ <loc>https://yumetsuki.moe/posts/c262e439/</loc>
24
24
 
25
25
  <lastmod>2024-11-04</lastmod>
26
26
 
@@ -29,7 +29,7 @@
29
29
  </url>
30
30
 
31
31
  <url>
32
- <loc>https://yumetsuki.moe/posts/228c2ef8/</loc>
32
+ <loc>https://yumetsuki.moe/posts/164ef646/</loc>
33
33
 
34
34
  <lastmod>2024-11-04</lastmod>
35
35
 
@@ -38,7 +38,7 @@
38
38
  </url>
39
39
 
40
40
  <url>
41
- <loc>https://yumetsuki.moe/posts/a9a6c1fb/</loc>
41
+ <loc>https://yumetsuki.moe/posts/e54f7476/</loc>
42
42
 
43
43
  <lastmod>2024-11-04</lastmod>
44
44
 
@@ -47,7 +47,7 @@
47
47
  </url>
48
48
 
49
49
  <url>
50
- <loc>https://yumetsuki.moe/posts/ad884987/</loc>
50
+ <loc>https://yumetsuki.moe/posts/228c2ef8/</loc>
51
51
 
52
52
  <lastmod>2024-11-04</lastmod>
53
53
 
@@ -56,7 +56,7 @@
56
56
  </url>
57
57
 
58
58
  <url>
59
- <loc>https://yumetsuki.moe/posts/c81531cf/</loc>
59
+ <loc>https://yumetsuki.moe/posts/ad884987/</loc>
60
60
 
61
61
  <lastmod>2024-11-04</lastmod>
62
62
 
@@ -65,7 +65,7 @@
65
65
  </url>
66
66
 
67
67
  <url>
68
- <loc>https://yumetsuki.moe/posts/de1f83f4/</loc>
68
+ <loc>https://yumetsuki.moe/posts/a9a6c1fb/</loc>
69
69
 
70
70
  <lastmod>2024-11-04</lastmod>
71
71
 
@@ -257,56 +257,56 @@
257
257
  </url>
258
258
 
259
259
  <url>
260
- <loc>https://yumetsuki.moe/tags/%E7%AE%80%E7%88%B1/</loc>
260
+ <loc>https://yumetsuki.moe/tags/Cloudflare/</loc>
261
261
  <lastmod>2024-11-04</lastmod>
262
262
  <changefreq>weekly</changefreq>
263
263
  <priority>0.2</priority>
264
264
  </url>
265
265
 
266
266
  <url>
267
- <loc>https://yumetsuki.moe/tags/%E5%A5%B3%E6%80%A7%E6%84%8F%E8%AF%86/</loc>
267
+ <loc>https://yumetsuki.moe/tags/Vercel/</loc>
268
268
  <lastmod>2024-11-04</lastmod>
269
269
  <changefreq>weekly</changefreq>
270
270
  <priority>0.2</priority>
271
271
  </url>
272
272
 
273
273
  <url>
274
- <loc>https://yumetsuki.moe/tags/%E8%AE%BA%E6%96%87/</loc>
274
+ <loc>https://yumetsuki.moe/tags/%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1/</loc>
275
275
  <lastmod>2024-11-04</lastmod>
276
276
  <changefreq>weekly</changefreq>
277
277
  <priority>0.2</priority>
278
278
  </url>
279
279
 
280
280
  <url>
281
- <loc>https://yumetsuki.moe/tags/Cloudflare/</loc>
281
+ <loc>https://yumetsuki.moe/tags/%E8%B0%B7%E6%AD%8C%E7%BF%BB%E8%AF%91/</loc>
282
282
  <lastmod>2024-11-04</lastmod>
283
283
  <changefreq>weekly</changefreq>
284
284
  <priority>0.2</priority>
285
285
  </url>
286
286
 
287
287
  <url>
288
- <loc>https://yumetsuki.moe/tags/Vercel/</loc>
288
+ <loc>https://yumetsuki.moe/tags/Workers/</loc>
289
289
  <lastmod>2024-11-04</lastmod>
290
290
  <changefreq>weekly</changefreq>
291
291
  <priority>0.2</priority>
292
292
  </url>
293
293
 
294
294
  <url>
295
- <loc>https://yumetsuki.moe/tags/%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1/</loc>
295
+ <loc>https://yumetsuki.moe/tags/%E7%AE%80%E7%88%B1/</loc>
296
296
  <lastmod>2024-11-04</lastmod>
297
297
  <changefreq>weekly</changefreq>
298
298
  <priority>0.2</priority>
299
299
  </url>
300
300
 
301
301
  <url>
302
- <loc>https://yumetsuki.moe/tags/%E8%B0%B7%E6%AD%8C%E7%BF%BB%E8%AF%91/</loc>
302
+ <loc>https://yumetsuki.moe/tags/%E5%A5%B3%E6%80%A7%E6%84%8F%E8%AF%86/</loc>
303
303
  <lastmod>2024-11-04</lastmod>
304
304
  <changefreq>weekly</changefreq>
305
305
  <priority>0.2</priority>
306
306
  </url>
307
307
 
308
308
  <url>
309
- <loc>https://yumetsuki.moe/tags/Workers/</loc>
309
+ <loc>https://yumetsuki.moe/tags/%E8%AE%BA%E6%96%87/</loc>
310
310
  <lastmod>2024-11-04</lastmod>
311
311
  <changefreq>weekly</changefreq>
312
312
  <priority>0.2</priority>
@@ -364,14 +364,14 @@
364
364
  </url>
365
365
 
366
366
  <url>
367
- <loc>https://yumetsuki.moe/categories/%E9%97%B2%E8%81%8A%E6%9D%82%E8%B0%88/</loc>
367
+ <loc>https://yumetsuki.moe/categories/Hexo/</loc>
368
368
  <lastmod>2024-11-04</lastmod>
369
369
  <changefreq>weekly</changefreq>
370
370
  <priority>0.2</priority>
371
371
  </url>
372
372
 
373
373
  <url>
374
- <loc>https://yumetsuki.moe/categories/Hexo/</loc>
374
+ <loc>https://yumetsuki.moe/categories/%E9%97%B2%E8%81%8A%E6%9D%82%E8%B0%88/</loc>
375
375
  <lastmod>2024-11-04</lastmod>
376
376
  <changefreq>weekly</changefreq>
377
377
  <priority>0.2</priority>
package/sw.js CHANGED
@@ -1,2 +1,2 @@
1
- const CONFIG={CACHE_NAME:"ICDNCache",UPDATE_INTERVAL:6e4,STARTUP_DELAY:5e3,TARGET_DOMAIN:"yumetsuki.moe",DEFAULT_VERSION:"latest"};let cachelist=[];self.addEventListener("install",async function(e){self.skipWaiting(),e.waitUntil(caches.open(CONFIG.CACHE_NAME).then(function(t){return console.log("Opened cache"),t.addAll(cachelist)}))}),self.addEventListener("fetch",async e=>{try{e.respondWith(handle(e.request))}catch(t){console.error("Fetch error:",t),fullpath(urlPath).indexOf(".html")!==-1?e.respondWith(fetch("/404.html")):e.respondWith(handleerr(e.request,t.message))}});const handleerr=async(e,t)=>new Response(`<h1>CDN\u5206\u6D41\u5668\u9047\u5230\u4E86\u81F4\u547D\u9519\u8BEF</h1>
2
- <b>${t}</b>`,{headers:{"content-type":"text/html; charset=utf-8"}}),lfetch=async(e,t)=>{let r=new AbortController;const s=async n=>new Response(await n.arrayBuffer(),{status:n.status,headers:n.headers});return Promise.any||(Promise.any=function(n){return new Promise((o,c)=>{n=Array.isArray(n)?n:[];let a=n.length,l=[];if(a===0)return c(new AggregateError("All promises were rejected"));n.forEach(h=>{h.then(i=>{o(i)},i=>{a--,l.push(i),a===0&&c(new AggregateError(l))})})})}),Promise.any(e.map(n=>new Promise((o,c)=>{fetch(n,{signal:r.signal}).then(s).then(a=>{a.status==200?(r.abort(),o(a)):c(a)})})))},fullpath=e=>(e=e.split("?")[0].split("#")[0],e.match(/\/$/)&&(e+="index"),e.match(/\.[a-zA-Z]+$/)||(e+=".html"),e),generate_blog_urls=(e,t,r)=>{const s=[`https://cdn.cbd.int/${e}@${t}`];for(var n in s)s[n]+=r;return s},mirror=["https://mirrors.cloud.tencent.com/npm/q78kgblog/latest"],get_newest_version=async e=>lfetch(e,e[0]).then(t=>t.json()).then(res.version);self.db={read:(e,t)=>(t||(t={type:"text"}),new Promise((r,s)=>{caches.open(CONFIG.CACHE_NAME).then(n=>{n.match(new Request(`https://LOCALCACHE/${encodeURIComponent(e)}`)).then(function(o){o||r(null),o.text().then(c=>r(c))}).catch(()=>{r(null)})})})),write:(e,t)=>new Promise((r,s)=>{caches.open(CONFIG.CACHE_NAME).then(function(n){n.put(new Request(`https://LOCALCACHE/${encodeURIComponent(e)}`),new Response(t)),r()}).catch(()=>{s()})})};const set_newest_version=async e=>lfetch(e,e[0]).then(t=>t.json()).then(async t=>{await db.write("blog_version",t.version)});setInterval(async()=>{await set_newest_version(mirror)},CONFIG.UPDATE_INTERVAL),setTimeout(async()=>{await set_newest_version(mirror)},CONFIG.STARTUP_DELAY);const MIME_TYPES={html:"text/html",htm:"text/html",js:"text/javascript",css:"text/css",jpg:"image/jpeg",jpeg:"image/jpeg",ico:"image/x-icon",png:"image/png"};function getFileType(e){const t=e.split(".").pop().toLowerCase();return MIME_TYPES[t]||"text/plain"}const handle=async e=>{const t=new URL(e.url),{pathname:r,hostname:s}=t;if(s===CONFIG.TARGET_DOMAIN){const n=await db.read("blog_version")||CONFIG.DEFAULT_VERSION;try{const c=await(await lfetch(generate_blog_urls("q78kgblog",n,fullpath(r)))).arrayBuffer(),a=fullpath(r).split("/").pop().split("\\").pop();return new Response(c,{headers:{"Content-Type":`${getFileType(a)};charset=utf-8`}})}catch(o){return console.error("Resource fetch error:",o),handleerr(e,"\u8D44\u6E90\u52A0\u8F7D\u5931\u8D25")}}return fetch(e)};
1
+ (function(m,f){typeof module=="object"&&typeof module.exports=="object"?f():typeof define=="function"&&define.amd?define([],f):(m=typeof globalThis<"u"?globalThis:m||self)&&f()})(this,function(){function m(u,r,s,t,n,a,i){try{var o=u[a](i),c=o.value}catch(e){s(e);return}o.done?r(c):Promise.resolve(c).then(t,n)}function f(u){return function(){var r=this,s=arguments;return new Promise(function(t,n){var a=u.apply(r,s);function i(c){m(a,t,n,i,o,"next",c)}function o(c){m(a,t,n,i,o,"throw",c)}i(void 0)})}}function l(u,r){var s,t,n,a,i={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(e){return function(p){return c([e,p])}}function c(e){if(s)throw new TypeError("Generator is already executing.");for(;i;)try{if(s=1,t&&(n=e[0]&2?t.return:e[0]?t.throw||((n=t.return)&&n.call(t),0):t.next)&&!(n=n.call(t,e[1])).done)return n;switch(t=0,n&&(e=[e[0]&2,n.value]),e[0]){case 0:case 1:n=e;break;case 4:return i.label++,{value:e[1],done:!1};case 5:i.label++,t=e[1],e=[0];continue;case 7:e=i.ops.pop(),i.trys.pop();continue;default:if(n=i.trys,!(n=n.length>0&&n[n.length-1])&&(e[0]===6||e[0]===2)){i=0;continue}if(e[0]===3&&(!n||e[1]>n[0]&&e[1]<n[3])){i.label=e[1];break}if(e[0]===6&&i.label<n[1]){i.label=n[1],n=e;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(e);break}n[2]&&i.ops.pop(),i.trys.pop();continue}e=r.call(u,i)}catch(p){e=[6,p],t=0}finally{s=n=0}if(e[0]&5)throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}}var h={CACHE_NAME:"ICDNCache",UPDATE_INTERVAL:6e4,STARTUP_DELAY:5e3,TARGET_DOMAIN:"yumetsuki.moe",DEFAULT_VERSION:"latest"},b=[];self.addEventListener("install",function(){var u=f(function(r){return l(this,function(s){return self.skipWaiting(),r.waitUntil(caches.open(h.CACHE_NAME).then(function(t){return console.log("Opened cache"),t.addAll(b)})),[2]})});return function(r){return u.apply(this,arguments)}}()),self.addEventListener("fetch",function(){var u=f(function(r){return l(this,function(s){try{r.respondWith(T(r.request))}catch(t){console.error("Fetch error:",t),d(urlPath).indexOf(".html")!==-1?r.respondWith(fetch("/404.html")):r.respondWith(y(r.request,t.message))}return[2]})});return function(r){return u.apply(this,arguments)}}());var y=function(){var u=f(function(r,s){return l(this,function(t){return[2,new Response(`<h1>CDN\u5206\u6D41\u5668\u9047\u5230\u4E86\u81F4\u547D\u9519\u8BEF</h1>
2
+ <b>`.concat(s,"</b>"),{headers:{"content-type":"text/html; charset=utf-8"}})]})});return function(s,t){return u.apply(this,arguments)}}(),g=function(){var u=f(function(r,s){var t,n;return l(this,function(a){return t=new AbortController,n=function(){var i=f(function(o){var c;return l(this,function(e){switch(e.label){case 0:return c=Response.bind,[4,o.arrayBuffer()];case 1:return[2,new(c.apply(Response,[void 0,e.sent(),{status:o.status,headers:o.headers}]))]}})});return function(c){return i.apply(this,arguments)}}(),[2,(Promise.any||(Promise.any=function(i){return new Promise(function(o,c){i=Array.isArray(i)?i:[];var e=i.length,p=[];if(e===0)return c(new AggregateError("All promises were rejected"));i.forEach(function(R){R.then(function(v){o(v)},function(v){e--,p.push(v),e===0&&c(new AggregateError(p))})})})}),Promise.any(r.map(function(i){return new Promise(function(o,c){fetch(i,{signal:t.signal}).then(n).then(function(e){e.status==200?(t.abort(),o(e)):c(e)})})})))]})});return function(s,t){return u.apply(this,arguments)}}(),d=function(u){return u=u.split("?")[0].split("#")[0],u.match(/\/$/)&&(u+="index"),u.match(/\.[a-zA-Z]+$/)||(u+=".html"),u},A=function(u,r,s){var t=["https://cdn.cbd.int/".concat(u,"@").concat(r)];for(var n in t)t[n]+=s;return t},w=["https://mirrors.cloud.tencent.com/npm/q78kgblog/latest"],x=function(){var u=f(function(r){return l(this,function(s){return[2,g(r,r[0]).then(function(t){return t.json()}).then(res.version)]})});return function(s){return u.apply(this,arguments)}}();self.db={read:function(u,r){return r||(r={type:"text"}),new Promise(function(s,t){caches.open(h.CACHE_NAME).then(function(n){n.match(new Request("https://LOCALCACHE/".concat(encodeURIComponent(u)))).then(function(a){a||s(null),a.text().then(function(i){return s(i)})}).catch(function(){s(null)})})})},write:function(u,r){return new Promise(function(s,t){caches.open(h.CACHE_NAME).then(function(n){n.put(new Request("https://LOCALCACHE/".concat(encodeURIComponent(u))),new Response(r)),s()}).catch(function(){t()})})}};var _=function(){var u=f(function(r){return l(this,function(s){return[2,g(r,r[0]).then(function(t){return t.json()}).then(function(){var t=f(function(n){return l(this,function(a){switch(a.label){case 0:return[4,db.write("blog_version",n.version)];case 1:return a.sent(),[2]}})});return function(n){return t.apply(this,arguments)}}())]})});return function(s){return u.apply(this,arguments)}}();setInterval(f(function(){return l(this,function(u){switch(u.label){case 0:return[4,_(w)];case 1:return u.sent(),[2]}})}),h.UPDATE_INTERVAL),setTimeout(f(function(){return l(this,function(u){switch(u.label){case 0:return[4,_(w)];case 1:return u.sent(),[2]}})}),h.STARTUP_DELAY);var E={html:"text/html",htm:"text/html",js:"text/javascript",css:"text/css",jpg:"image/jpeg",jpeg:"image/jpeg",ico:"image/x-icon",png:"image/png"};function C(u){var r=u.split(".").pop().toLowerCase();return E[r]||"text/plain"}var T=function(){var u=f(function(r){var s,t,n,a,i,o,c;return l(this,function(e){switch(e.label){case 0:return s=new URL(r.url),t=s.pathname,n=s.hostname,n!==h.TARGET_DOMAIN?[3,6]:[4,db.read("blog_version")];case 1:a=e.sent()||h.DEFAULT_VERSION,e.label=2;case 2:return e.trys.push([2,5,,6]),[4,g(A("q78kgblog",a,d(t)))];case 3:return[4,e.sent().arrayBuffer()];case 4:return i=e.sent(),o=d(t).split("/").pop().split("\\").pop(),[2,new Response(i,{headers:{"Content-Type":"".concat(C(o),";charset=utf-8")}})];case 5:return c=e.sent(),[2,(console.error("Resource fetch error:",c),y(r,"\u8D44\u6E90\u52A0\u8F7D\u5931\u8D25"))];case 6:return[2,fetch(r)]}})});return function(s){return u.apply(this,arguments)}}()});
package/swReg.js CHANGED
@@ -1 +1 @@
1
- (()=>{const e={UNINSTALLED:0,INTERRUPTED:1,INSTALLED:2,ACTIVATED:3},r="ChenBlogHelper_Set";(async()=>{if(!("serviceWorker"in navigator))return;const t=Number(localStorage.getItem(r))||0;t<e.INTERRUPTED&&(localStorage.setItem(r,e.INTERRUPTED),window.stop(),document.documentElement.innerHTML="");try{await navigator.serviceWorker.register(`/sw.js?time=${Date.now()}`),t<e.INSTALLED&&setTimeout(()=>{localStorage.setItem(r,e.INSTALLED),window.location.reload()},500)}catch(o){console.error("Service Worker \u6CE8\u518C\u5931\u8D25:",o)}})()})();
1
+ (function(s,f){typeof module=="object"&&typeof module.exports=="object"?f():typeof define=="function"&&define.amd?define([],f):(s=typeof globalThis<"u"?globalThis:s||self)&&f()})(this,function(){function s(o,u,i,r,e,l,t){try{var a=o[l](t),c=a.value}catch(n){i(n);return}a.done?u(c):Promise.resolve(c).then(r,e)}function f(o){return function(){var u=this,i=arguments;return new Promise(function(r,e){var l=o.apply(u,i);function t(c){s(l,r,e,t,a,"next",c)}function a(c){s(l,r,e,t,a,"throw",c)}t(void 0)})}}function d(o,u){var i,r,e,l,t={label:0,sent:function(){if(e[0]&1)throw e[1];return e[1]},trys:[],ops:[]};return l={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function a(n){return function(h){return c([n,h])}}function c(n){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,r&&(e=n[0]&2?r.return:n[0]?r.throw||((e=r.return)&&e.call(r),0):r.next)&&!(e=e.call(r,n[1])).done)return e;switch(r=0,e&&(n=[n[0]&2,e.value]),n[0]){case 0:case 1:e=n;break;case 4:return t.label++,{value:n[1],done:!1};case 5:t.label++,r=n[1],n=[0];continue;case 7:n=t.ops.pop(),t.trys.pop();continue;default:if(e=t.trys,!(e=e.length>0&&e[e.length-1])&&(n[0]===6||n[0]===2)){t=0;continue}if(n[0]===3&&(!e||n[1]>e[0]&&n[1]<e[3])){t.label=n[1];break}if(n[0]===6&&t.label<e[1]){t.label=e[1],e=n;break}if(e&&t.label<e[2]){t.label=e[2],t.ops.push(n);break}e[2]&&t.ops.pop(),t.trys.pop();continue}n=u.call(o,t)}catch(h){n=[6,h],r=0}finally{i=e=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}}(function(){var o={UNINSTALLED:0,INTERRUPTED:1,INSTALLED:2,ACTIVATED:3},u="ChenBlogHelper_Set";f(function(){var i,r;return d(this,function(e){switch(e.label){case 0:if(!("serviceWorker"in navigator))return[2];i=Number(localStorage.getItem(u))||0,i<o.INTERRUPTED&&(localStorage.setItem(u,o.INTERRUPTED),window.stop(),document.documentElement.innerHTML=""),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,navigator.serviceWorker.register("/sw.js?time=".concat(Date.now()))];case 2:return e.sent(),i<o.INSTALLED&&setTimeout(function(){localStorage.setItem(u,o.INSTALLED),window.location.reload()},500),[3,4];case 3:return r=e.sent(),console.error("Service Worker \u6CE8\u518C\u5931\u8D25:",r),[3,4];case 4:return[2]}})})()})()});