q78kgblog 0.0.0-1734157384337 → 0.0.0-1734172620426

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 (147) 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/11/index.html +1 -933
  12. package/archives/2024/index.html +1 -933
  13. package/archives/index.html +1 -933
  14. package/archives/page/2/index.html +1 -933
  15. package/assets/css/APlayer.min.css +1 -3
  16. package/assets/js/APlayer.min.js +154 -2
  17. package/assets/js/Meting.min.js +3 -1
  18. package/atom.xml +12 -12
  19. package/baidusitemap.xml +4 -4
  20. package/bangumis/index.html +1 -1055
  21. package/bigpie/index.html +1 -705
  22. package/categories/Hexo/index.html +1 -945
  23. package/categories/index.html +1 -701
  24. package/categories//345/271/264/347/273/210/346/200/273/347/273/223/index.html +1 -945
  25. package/categories//346/212/200/346/234/257/345/210/206/344/272/253/index.html +1 -945
  26. package/categories//347/264/240/346/235/220/index.html +1 -945
  27. package/categories//351/227/262/350/201/212/346/235/202/350/260/210/index.html +1 -945
  28. package/content.json +1 -1
  29. package/css/index.css +1 -1
  30. package/css/swiper.min.css +1 -703
  31. package/fcircle/index.html +1 -724
  32. package/fontawesome/index.html +1 -707
  33. package/index.html +1 -1085
  34. package/js/aplayersave.js +1 -1
  35. package/js/baiduhistory.js +1 -1
  36. package/js/browser.js +1 -1
  37. package/js/calendar.js +1 -1
  38. package/js/cate.js +1 -1
  39. package/js/commentBarrage.js +13 -13
  40. package/js/commentsCount.js +1 -1
  41. package/js/copy.js +1 -1
  42. package/js/countup.js +1 -1
  43. package/js/cursor.js +1 -1
  44. package/js/day.js +2 -2
  45. package/js/dianzan.js +1 -1
  46. package/js/dis.js +3 -3
  47. package/js/fixbugpjax.js +1 -1
  48. package/js/fixed_card_widget.js +1 -1
  49. package/js/fps.js +1 -1
  50. package/js/gitalker.js +1 -1
  51. package/js/gsap.min.js +1 -4
  52. package/js/heimu.js +1 -1
  53. package/js/hide.show.js +1 -1
  54. package/js/languages.js +1 -1
  55. package/js/latest.js +1 -1
  56. package/js/local-search.js +2 -2
  57. package/js/lunar.js +1 -1
  58. package/js/lyxTalk.js +1 -1
  59. package/js/main.js +2 -2
  60. package/js/nav.js +1 -1
  61. package/js/noie.js +1 -1
  62. package/js/owo.js +1 -1
  63. package/js/people.js +2 -2
  64. package/js/pikaday.js +1 -109
  65. package/js/random.js +1 -1
  66. package/js/randomFriend.js +1 -1
  67. package/js/resizeTop.js +1 -1
  68. package/js/rightmenu.js +3 -3
  69. package/js/sakura.js +1 -1
  70. package/js/search/algolia.js +4 -4
  71. package/js/search/local-search.js +1 -1
  72. package/js/settings.js +3 -3
  73. package/js/sitetime.js +1 -1
  74. package/js/smooth-scrolling.js +1 -1
  75. package/js/sw-toolbox.js +1 -1
  76. package/js/swiperinit.js +1 -1
  77. package/js/tw_cn.js +1 -1
  78. package/js/utils.js +1 -1
  79. package/js/welcome.js +1 -1
  80. package/js/welcomeconsole.js +1 -1
  81. package/links/index.html +1 -932
  82. package/live2d-widget/autoload.js +19 -63
  83. package/live2d-widget/demo/demo.html +1 -34
  84. package/live2d-widget/demo/login.html +1 -271
  85. package/live2d-widget/live2d.min.js +45 -1
  86. package/live2d-widget/rollup.config.js +2 -35
  87. package/live2d-widget/src/index.js +4 -175
  88. package/live2d-widget/src/message.js +1 -22
  89. package/live2d-widget/src/model.js +1 -75
  90. package/live2d-widget/src/tools.js +1 -78
  91. package/live2d-widget/src/utils.js +1 -5
  92. package/live2d-widget/src/waifu-tips.js +1 -3
  93. package/live2d-widget/waifu-tips.js +7 -2
  94. package/live2d-widget/waifu.css +1 -310
  95. package/noie.html +1 -69
  96. package/othersite/index.html +1 -770
  97. package/package.json +1 -1
  98. package/people.html +1 -24
  99. package/posts/164ef646/index.html +1 -1018
  100. package/posts/1ee472c8/index.html +1 -1006
  101. package/posts/228c2ef8/index.html +1 -1005
  102. package/posts/2b89093e/index.html +1 -1003
  103. package/posts/a9a6c1fb/index.html +1 -1032
  104. package/posts/ad884987/index.html +1 -1005
  105. package/posts/c262e439/index.html +1 -993
  106. package/posts/c81531cf/index.html +1 -1071
  107. package/posts/ce5471fd/index.html +1 -993
  108. package/posts/de1f83f4/index.html +1 -1061
  109. package/posts/e54f7476/index.html +1 -1053
  110. package/random.html +1 -30
  111. package/sitemap.txt +7 -7
  112. package/sitemap.xml +20 -20
  113. package/sw.js +2 -2
  114. package/swReg.js +1 -1
  115. package/tags/AI/index.html +1 -946
  116. package/tags/Abbrlink/index.html +1 -946
  117. package/tags/Butterfly/index.html +1 -946
  118. package/tags/Cloudflare/index.html +1 -946
  119. package/tags/DiffSinger/index.html +1 -946
  120. package/tags/Hexo/index.html +1 -946
  121. package/tags/Markdown/index.html +1 -946
  122. package/tags/Next/index.html +1 -946
  123. package/tags/Obsidian/index.html +1 -946
  124. package/tags/RAID/index.html +1 -946
  125. package/tags/Vercel/index.html +1 -946
  126. package/tags/Workers/index.html +1 -946
  127. package/tags/index.html +1 -701
  128. package/tags//344/270/273/351/242/230/index.html +1 -946
  129. package/tags//345/206/231/344/275/234/index.html +1 -946
  130. package/tags//345/245/263/346/200/247/346/204/217/350/257/206/index.html +1 -946
  131. package/tags//345/255/246/344/271/240/index.html +1 -946
  132. package/tags//345/256/266/351/207/214/344/272/221/index.html +1 -946
  133. package/tags//345/271/264/347/273/210/346/200/273/347/273/223/index.html +1 -946
  134. package/tags//346/212/230/350/205/276/index.html +1 -946
  135. package/tags//346/227/245/345/270/270/index.html +1 -946
  136. package/tags//346/234/215/345/212/241/345/231/250/index.html +1 -946
  137. package/tags//346/260/270/344/271/205/351/223/276/346/216/245/index.html +1 -946
  138. package/tags//346/265/252/346/275/256/index.html +1 -946
  139. package/tags//347/237/255/351/223/276/346/216/245/index.html +1 -946
  140. package/tags//347/256/200/347/210/261/index.html +1 -946
  141. package/tags//347/274/226/350/276/221/345/231/250/index.html +1 -946
  142. package/tags//350/207/252/345/212/250/346/240/207/346/263/250/index.html +1 -946
  143. package/tags//350/256/272/346/226/207/index.html +1 -946
  144. package/tags//350/260/267/346/255/214/347/277/273/350/257/221/index.html +1 -946
  145. package/tags//350/264/237/350/275/275/345/235/207/350/241/241/index.html +1 -946
  146. package/tags//351/207/221/345/217/245/index.html +1 -946
  147. package/tags//351/255/224/346/224/271/index.html +1 -946
package/random.html CHANGED
@@ -1,30 +1 @@
1
- <body onload="javascript:dogo();">
2
- <script>
3
- function dogo(){
4
- var urls=[
5
- "https://yumetsuki.moe/posts/164ef646/",
6
- "https://yumetsuki.moe/posts/e54f7476/",
7
- "https://yumetsuki.moe/posts/ad884987/",
8
- "https://yumetsuki.moe/posts/a9a6c1fb/",
9
- "https://yumetsuki.moe/posts/c81531cf/",
10
- "https://yumetsuki.moe/posts/de1f83f4/",
11
- "https://yumetsuki.moe/posts/c262e439/",
12
- "https://yumetsuki.moe/posts/1ee472c8/",
13
- "https://yumetsuki.moe/posts/228c2ef8/",
14
- "https://yumetsuki.moe/posts/2b89093e/",
15
- "https://yumetsuki.moe/posts/ce5471fd/",
16
- "https://yumetsuki.moe/manifest.json",
17
- "https://yumetsuki.moe/othersite/index.html",
18
- "https://yumetsuki.moe/tags/index.html",
19
- "https://yumetsuki.moe/links/index.html",
20
- "https://yumetsuki.moe/bangumis/index.html",
21
- "https://yumetsuki.moe/bigpie/index.html",
22
- "https://yumetsuki.moe/categories/index.html",
23
- "https://yumetsuki.moe/fcircle/index.html",
24
- "https://yumetsuki.moe/fontawesome/index.html",
25
- "https://yumetsuki.moe/about/index.html",
26
- ];
27
- n = Math.floor(Math.random()*urls.length);
28
- location.href= urls[n];
29
- }
30
- </script>
1
+ <body onload="dogo()"><script>function dogo(){var t=["https://yumetsuki.moe/posts/164ef646/","https://yumetsuki.moe/posts/e54f7476/","https://yumetsuki.moe/posts/ad884987/","https://yumetsuki.moe/posts/c81531cf/","https://yumetsuki.moe/posts/a9a6c1fb/","https://yumetsuki.moe/posts/c262e439/","https://yumetsuki.moe/posts/de1f83f4/","https://yumetsuki.moe/posts/1ee472c8/","https://yumetsuki.moe/posts/228c2ef8/","https://yumetsuki.moe/posts/2b89093e/","https://yumetsuki.moe/posts/ce5471fd/","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,10 +1,10 @@
1
1
  https://yumetsuki.moe/posts/164ef646/
2
2
  https://yumetsuki.moe/posts/e54f7476/
3
3
  https://yumetsuki.moe/posts/ad884987/
4
- https://yumetsuki.moe/posts/a9a6c1fb/
5
4
  https://yumetsuki.moe/posts/c81531cf/
6
- https://yumetsuki.moe/posts/de1f83f4/
5
+ https://yumetsuki.moe/posts/a9a6c1fb/
7
6
  https://yumetsuki.moe/posts/c262e439/
7
+ https://yumetsuki.moe/posts/de1f83f4/
8
8
  https://yumetsuki.moe/posts/1ee472c8/
9
9
  https://yumetsuki.moe/posts/228c2ef8/
10
10
  https://yumetsuki.moe/posts/2b89093e/
@@ -13,12 +13,12 @@ https://yumetsuki.moe/manifest.json
13
13
  https://yumetsuki.moe/othersite/index.html
14
14
  https://yumetsuki.moe/tags/index.html
15
15
  https://yumetsuki.moe/links/index.html
16
+ https://yumetsuki.moe/about/index.html
16
17
  https://yumetsuki.moe/bangumis/index.html
17
18
  https://yumetsuki.moe/bigpie/index.html
18
19
  https://yumetsuki.moe/categories/index.html
19
20
  https://yumetsuki.moe/fcircle/index.html
20
21
  https://yumetsuki.moe/fontawesome/index.html
21
- https://yumetsuki.moe/about/index.html
22
22
  https://yumetsuki.moe/
23
23
  https://yumetsuki.moe/tags/%E9%AD%94%E6%94%B9/
24
24
  https://yumetsuki.moe/tags/Hexo/
@@ -31,16 +31,16 @@ https://yumetsuki.moe/tags/Vercel/
31
31
  https://yumetsuki.moe/tags/%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1/
32
32
  https://yumetsuki.moe/tags/%E8%B0%B7%E6%AD%8C%E7%BF%BB%E8%AF%91/
33
33
  https://yumetsuki.moe/tags/Workers/
34
- https://yumetsuki.moe/tags/%E7%AE%80%E7%88%B1/
35
- https://yumetsuki.moe/tags/%E5%A5%B3%E6%80%A7%E6%84%8F%E8%AF%86/
36
- https://yumetsuki.moe/tags/%E8%AE%BA%E6%96%87/
37
34
  https://yumetsuki.moe/tags/%E9%87%91%E5%8F%A5/
38
35
  https://yumetsuki.moe/tags/%E5%86%99%E4%BD%9C/
39
36
  https://yumetsuki.moe/tags/%E5%AD%A6%E4%B9%A0/
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
+ https://yumetsuki.moe/tags/%E5%B9%B4%E7%BB%88%E6%80%BB%E7%BB%93/
40
41
  https://yumetsuki.moe/tags/DiffSinger/
41
42
  https://yumetsuki.moe/tags/%E8%87%AA%E5%8A%A8%E6%A0%87%E6%B3%A8/
42
43
  https://yumetsuki.moe/tags/AI/
43
- https://yumetsuki.moe/tags/%E5%B9%B4%E7%BB%88%E6%80%BB%E7%BB%93/
44
44
  https://yumetsuki.moe/tags/Obsidian/
45
45
  https://yumetsuki.moe/tags/Abbrlink/
46
46
  https://yumetsuki.moe/tags/%E7%9F%AD%E9%93%BE%E6%8E%A5/
package/sitemap.xml CHANGED
@@ -29,7 +29,7 @@
29
29
  </url>
30
30
 
31
31
  <url>
32
- <loc>https://yumetsuki.moe/posts/a9a6c1fb/</loc>
32
+ <loc>https://yumetsuki.moe/posts/c81531cf/</loc>
33
33
 
34
34
  <lastmod>2024-12-14</lastmod>
35
35
 
@@ -38,7 +38,7 @@
38
38
  </url>
39
39
 
40
40
  <url>
41
- <loc>https://yumetsuki.moe/posts/c81531cf/</loc>
41
+ <loc>https://yumetsuki.moe/posts/a9a6c1fb/</loc>
42
42
 
43
43
  <lastmod>2024-12-14</lastmod>
44
44
 
@@ -47,7 +47,7 @@
47
47
  </url>
48
48
 
49
49
  <url>
50
- <loc>https://yumetsuki.moe/posts/de1f83f4/</loc>
50
+ <loc>https://yumetsuki.moe/posts/c262e439/</loc>
51
51
 
52
52
  <lastmod>2024-12-14</lastmod>
53
53
 
@@ -56,7 +56,7 @@
56
56
  </url>
57
57
 
58
58
  <url>
59
- <loc>https://yumetsuki.moe/posts/c262e439/</loc>
59
+ <loc>https://yumetsuki.moe/posts/de1f83f4/</loc>
60
60
 
61
61
  <lastmod>2024-12-14</lastmod>
62
62
 
@@ -137,7 +137,7 @@
137
137
  </url>
138
138
 
139
139
  <url>
140
- <loc>https://yumetsuki.moe/bangumis/index.html</loc>
140
+ <loc>https://yumetsuki.moe/about/index.html</loc>
141
141
 
142
142
  <lastmod>2024-12-14</lastmod>
143
143
 
@@ -146,7 +146,7 @@
146
146
  </url>
147
147
 
148
148
  <url>
149
- <loc>https://yumetsuki.moe/bigpie/index.html</loc>
149
+ <loc>https://yumetsuki.moe/bangumis/index.html</loc>
150
150
 
151
151
  <lastmod>2024-12-14</lastmod>
152
152
 
@@ -155,7 +155,7 @@
155
155
  </url>
156
156
 
157
157
  <url>
158
- <loc>https://yumetsuki.moe/categories/index.html</loc>
158
+ <loc>https://yumetsuki.moe/bigpie/index.html</loc>
159
159
 
160
160
  <lastmod>2024-12-14</lastmod>
161
161
 
@@ -164,7 +164,7 @@
164
164
  </url>
165
165
 
166
166
  <url>
167
- <loc>https://yumetsuki.moe/fcircle/index.html</loc>
167
+ <loc>https://yumetsuki.moe/categories/index.html</loc>
168
168
 
169
169
  <lastmod>2024-12-14</lastmod>
170
170
 
@@ -173,7 +173,7 @@
173
173
  </url>
174
174
 
175
175
  <url>
176
- <loc>https://yumetsuki.moe/fontawesome/index.html</loc>
176
+ <loc>https://yumetsuki.moe/fcircle/index.html</loc>
177
177
 
178
178
  <lastmod>2024-12-14</lastmod>
179
179
 
@@ -182,7 +182,7 @@
182
182
  </url>
183
183
 
184
184
  <url>
185
- <loc>https://yumetsuki.moe/about/index.html</loc>
185
+ <loc>https://yumetsuki.moe/fontawesome/index.html</loc>
186
186
 
187
187
  <lastmod>2024-12-14</lastmod>
188
188
 
@@ -277,70 +277,70 @@
277
277
  </url>
278
278
 
279
279
  <url>
280
- <loc>https://yumetsuki.moe/tags/%E7%AE%80%E7%88%B1/</loc>
280
+ <loc>https://yumetsuki.moe/tags/%E9%87%91%E5%8F%A5/</loc>
281
281
  <lastmod>2024-12-14</lastmod>
282
282
  <changefreq>weekly</changefreq>
283
283
  <priority>0.2</priority>
284
284
  </url>
285
285
 
286
286
  <url>
287
- <loc>https://yumetsuki.moe/tags/%E5%A5%B3%E6%80%A7%E6%84%8F%E8%AF%86/</loc>
287
+ <loc>https://yumetsuki.moe/tags/%E5%86%99%E4%BD%9C/</loc>
288
288
  <lastmod>2024-12-14</lastmod>
289
289
  <changefreq>weekly</changefreq>
290
290
  <priority>0.2</priority>
291
291
  </url>
292
292
 
293
293
  <url>
294
- <loc>https://yumetsuki.moe/tags/%E8%AE%BA%E6%96%87/</loc>
294
+ <loc>https://yumetsuki.moe/tags/%E5%AD%A6%E4%B9%A0/</loc>
295
295
  <lastmod>2024-12-14</lastmod>
296
296
  <changefreq>weekly</changefreq>
297
297
  <priority>0.2</priority>
298
298
  </url>
299
299
 
300
300
  <url>
301
- <loc>https://yumetsuki.moe/tags/%E9%87%91%E5%8F%A5/</loc>
301
+ <loc>https://yumetsuki.moe/tags/%E7%AE%80%E7%88%B1/</loc>
302
302
  <lastmod>2024-12-14</lastmod>
303
303
  <changefreq>weekly</changefreq>
304
304
  <priority>0.2</priority>
305
305
  </url>
306
306
 
307
307
  <url>
308
- <loc>https://yumetsuki.moe/tags/%E5%86%99%E4%BD%9C/</loc>
308
+ <loc>https://yumetsuki.moe/tags/%E5%A5%B3%E6%80%A7%E6%84%8F%E8%AF%86/</loc>
309
309
  <lastmod>2024-12-14</lastmod>
310
310
  <changefreq>weekly</changefreq>
311
311
  <priority>0.2</priority>
312
312
  </url>
313
313
 
314
314
  <url>
315
- <loc>https://yumetsuki.moe/tags/%E5%AD%A6%E4%B9%A0/</loc>
315
+ <loc>https://yumetsuki.moe/tags/%E8%AE%BA%E6%96%87/</loc>
316
316
  <lastmod>2024-12-14</lastmod>
317
317
  <changefreq>weekly</changefreq>
318
318
  <priority>0.2</priority>
319
319
  </url>
320
320
 
321
321
  <url>
322
- <loc>https://yumetsuki.moe/tags/DiffSinger/</loc>
322
+ <loc>https://yumetsuki.moe/tags/%E5%B9%B4%E7%BB%88%E6%80%BB%E7%BB%93/</loc>
323
323
  <lastmod>2024-12-14</lastmod>
324
324
  <changefreq>weekly</changefreq>
325
325
  <priority>0.2</priority>
326
326
  </url>
327
327
 
328
328
  <url>
329
- <loc>https://yumetsuki.moe/tags/%E8%87%AA%E5%8A%A8%E6%A0%87%E6%B3%A8/</loc>
329
+ <loc>https://yumetsuki.moe/tags/DiffSinger/</loc>
330
330
  <lastmod>2024-12-14</lastmod>
331
331
  <changefreq>weekly</changefreq>
332
332
  <priority>0.2</priority>
333
333
  </url>
334
334
 
335
335
  <url>
336
- <loc>https://yumetsuki.moe/tags/AI/</loc>
336
+ <loc>https://yumetsuki.moe/tags/%E8%87%AA%E5%8A%A8%E6%A0%87%E6%B3%A8/</loc>
337
337
  <lastmod>2024-12-14</lastmod>
338
338
  <changefreq>weekly</changefreq>
339
339
  <priority>0.2</priority>
340
340
  </url>
341
341
 
342
342
  <url>
343
- <loc>https://yumetsuki.moe/tags/%E5%B9%B4%E7%BB%88%E6%80%BB%E7%BB%93/</loc>
343
+ <loc>https://yumetsuki.moe/tags/AI/</loc>
344
344
  <lastmod>2024-12-14</lastmod>
345
345
  <changefreq>weekly</changefreq>
346
346
  <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,a)=>{n=Array.isArray(n)?n:[];let c=n.length,i=[];if(c===0)return a(new AggregateError("All promises were rejected"));n.forEach(h=>{h.then(l=>{o(l)},l=>{c--,i.push(l),c===0&&a(new AggregateError(i))})})})}),Promise.any(e.map(n=>new Promise((o,a)=>{fetch(n,{signal:r.signal}).then(s).then(c=>{c.status==200?(r.abort(),o(c)):a(c)})})))},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.smartcis.cn/npm/${e}@${t}`];for(var n in s)s[n]+=r;return s},mirror=["https://registry.npmmirror.com/q78kgblog/latest"],get_newest_version=async e=>lfetch(e,e[0]).then(t=>t.json()).then(t=>t.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(a=>r(a))}).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)try{const n=await db.read("blog_version")||CONFIG.DEFAULT_VERSION,o=generate_blog_urls("q78kgblog",n,fullpath(r));if(!o||o.length===0)throw new Error("\u65E0\u6548\u7684\u8D44\u6E90URL");const a=await lfetch(o);if(!a)throw new Error("\u8D44\u6E90\u83B7\u53D6\u5931\u8D25");const c=await a.arrayBuffer(),i=fullpath(r).split("/").pop().split("\\").pop();return new Response(c,{headers:{"Content-Type":`${getFileType(i)};charset=utf-8`}})}catch(n){return console.error("Resource fetch error:",n),handleerr(e,`\u8D44\u6E90\u52A0\u8F7D\u5931\u8D25: ${n.message}`)}return fetch(e)};
1
+ (function(g,f){typeof module=="object"&&typeof module.exports=="object"?f():typeof define=="function"&&define.amd?define([],f):(g=typeof globalThis<"u"?globalThis:g||self)&&f()})(this,function(){function g(u,r,s,n,e,a,i){try{var o=u[a](i),c=o.value}catch(t){s(t);return}o.done?r(c):Promise.resolve(c).then(n,e)}function f(u){return function(){var r=this,s=arguments;return new Promise(function(n,e){var a=u.apply(r,s);function i(c){g(a,n,e,i,o,"next",c)}function o(c){g(a,n,e,i,o,"throw",c)}i(void 0)})}}function l(u,r){var s,n,e,a,i={label:0,sent:function(){if(e[0]&1)throw e[1];return e[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(t){return function(h){return c([t,h])}}function c(t){if(s)throw new TypeError("Generator is already executing.");for(;i;)try{if(s=1,n&&(e=t[0]&2?n.return:t[0]?n.throw||((e=n.return)&&e.call(n),0):n.next)&&!(e=e.call(n,t[1])).done)return e;switch(n=0,e&&(t=[t[0]&2,e.value]),t[0]){case 0:case 1:e=t;break;case 4:return i.label++,{value:t[1],done:!1};case 5:i.label++,n=t[1],t=[0];continue;case 7:t=i.ops.pop(),i.trys.pop();continue;default:if(e=i.trys,!(e=e.length>0&&e[e.length-1])&&(t[0]===6||t[0]===2)){i=0;continue}if(t[0]===3&&(!e||t[1]>e[0]&&t[1]<e[3])){i.label=t[1];break}if(t[0]===6&&i.label<e[1]){i.label=e[1],e=t;break}if(e&&i.label<e[2]){i.label=e[2],i.ops.push(t);break}e[2]&&i.ops.pop(),i.trys.pop();continue}t=r.call(u,i)}catch(h){t=[6,h],n=0}finally{s=e=0}if(t[0]&5)throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}var m={CACHE_NAME:"ICDNCache",UPDATE_INTERVAL:6e4,STARTUP_DELAY:5e3,TARGET_DOMAIN:"yumetsuki.moe",DEFAULT_VERSION:"latest"},E=[];self.addEventListener("install",function(){var u=f(function(r){return l(this,function(s){return self.skipWaiting(),r.waitUntil(caches.open(m.CACHE_NAME).then(function(n){return console.log("Opened cache"),n.addAll(E)})),[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(R(r.request))}catch(n){console.error("Fetch error:",n),v(urlPath).indexOf(".html")!==-1?r.respondWith(fetch("/404.html")):r.respondWith(y(r.request,n.message))}return[2]})});return function(r){return u.apply(this,arguments)}}());var y=function(){var u=f(function(r,s){return l(this,function(n){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,n){return u.apply(this,arguments)}}(),d=function(){var u=f(function(r,s){var n,e;return l(this,function(a){return n=new AbortController,e=function(){var i=f(function(o){var c;return l(this,function(t){switch(t.label){case 0:return c=Response.bind,[4,o.arrayBuffer()];case 1:return[2,new(c.apply(Response,[void 0,t.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 t=i.length,h=[];if(t===0)return c(new AggregateError("All promises were rejected"));i.forEach(function(p){p.then(function(w){o(w)},function(w){t--,h.push(w),t===0&&c(new AggregateError(h))})})})}),Promise.any(r.map(function(i){return new Promise(function(o,c){fetch(i,{signal:n.signal}).then(e).then(function(t){t.status==200?(n.abort(),o(t)):c(t)})})})))]})});return function(s,n){return u.apply(this,arguments)}}(),v=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 n=["https://cdn.smartcis.cn/npm/".concat(u,"@").concat(r)];for(var e in n)n[e]+=s;return n},_=["https://registry.npmmirror.com/q78kgblog/latest"],x=function(){var u=f(function(r){return l(this,function(s){return[2,d(r,r[0]).then(function(n){return n.json()}).then(function(n){return n.version})]})});return function(s){return u.apply(this,arguments)}}();self.db={read:function(u,r){return r||(r={type:"text"}),new Promise(function(s,n){caches.open(m.CACHE_NAME).then(function(e){e.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,n){caches.open(m.CACHE_NAME).then(function(e){e.put(new Request("https://LOCALCACHE/".concat(encodeURIComponent(u))),new Response(r)),s()}).catch(function(){n()})})}};var b=function(){var u=f(function(r){return l(this,function(s){return[2,d(r,r[0]).then(function(n){return n.json()}).then(function(){var n=f(function(e){return l(this,function(a){switch(a.label){case 0:return[4,db.write("blog_version",e.version)];case 1:return a.sent(),[2]}})});return function(e){return n.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,b(_)];case 1:return u.sent(),[2]}})}),m.UPDATE_INTERVAL),setTimeout(f(function(){return l(this,function(u){switch(u.label){case 0:return[4,b(_)];case 1:return u.sent(),[2]}})}),m.STARTUP_DELAY);var C={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 T(u){var r=u.split(".").pop().toLowerCase();return C[r]||"text/plain"}var R=function(){var u=f(function(r){var s,n,e,a,i,o,c,t,h;return l(this,function(p){switch(p.label){case 0:if(s=new URL(r.url),n=s.pathname,e=s.hostname,e!==m.TARGET_DOMAIN)return[3,6];p.label=1;case 1:return p.trys.push([1,5,,6]),[4,db.read("blog_version")];case 2:if(a=p.sent()||m.DEFAULT_VERSION,i=A("q78kgblog",a,v(n)),!i||i.length===0)throw new Error("\u65E0\u6548\u7684\u8D44\u6E90URL");return[4,d(i)];case 3:if(o=p.sent(),!o)throw new Error("\u8D44\u6E90\u83B7\u53D6\u5931\u8D25");return[4,o.arrayBuffer()];case 4:return c=p.sent(),t=v(n).split("/").pop().split("\\").pop(),[2,new Response(c,{headers:{"Content-Type":"".concat(T(t),";charset=utf-8")}})];case 5:return h=p.sent(),[2,(console.error("Resource fetch error:",h),y(r,"\u8D44\u6E90\u52A0\u8F7D\u5931\u8D25: ".concat(h.message)))];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]}})})()})()});