sinzmise-cetastories-en 1.7.0-1719905274967 → 1.7.0-1719906897661

Sign up to get free protection for your applications and to get access to all the features.
Files changed (172) hide show
  1. package/404.html +72 -0
  2. package/BingSiteAuth.xml +4 -0
  3. package/archives/2023/12/index.html +72 -0
  4. package/archives/2023/index.html +72 -0
  5. package/archives/index.html +72 -0
  6. package/article.json +1 -0
  7. package/{en/atom.xml → atom.xml} +9 -9
  8. package/baidu_verify_codeva-NA6uDlCuZg.html +72 -0
  9. package/{en/baidusitemap.xml → baidusitemap.xml} +1 -1
  10. package/bangumis/index.html +72 -0
  11. package/cacheList.json +1 -0
  12. package/categories/Test/index.html +72 -0
  13. package/categories/index.html +72 -0
  14. package/css/custom2.css +1 -0
  15. package/css/plane.css +1 -0
  16. package/google8073542809160a67.html +72 -0
  17. package/images/favicon.ico +0 -0
  18. package/images/siteicon/16.png +0 -0
  19. package/images/siteicon/32.png +0 -0
  20. package/images/siteicon/apple-icon-180.png +0 -0
  21. package/images/siteicon/manifest-icon-192.maskable.png +0 -0
  22. package/images/siteicon/manifest-icon-512.maskable.png +0 -0
  23. package/img/512.png +0 -0
  24. package/img/avatar.png +0 -0
  25. package/img/bili.jpg +0 -0
  26. package/img/dark.jpg +0 -0
  27. package/img/friend_404.gif +0 -0
  28. package/img/icon-dark.png +0 -0
  29. package/img/icon-light.png +0 -0
  30. package/img/icons/api.svg +1 -0
  31. package/img/icons/diary.svg +1 -0
  32. package/img/icons/homepage.svg +1 -0
  33. package/img/icons/navi.svg +1 -0
  34. package/img/icons/pan.svg +1 -0
  35. package/img/icons/rtalk.svg +1 -0
  36. package/img/light.jpg +0 -0
  37. package/img/link.png +0 -0
  38. package/img/load-dark.png +0 -0
  39. package/img/load-light.png +0 -0
  40. package/img/longnian.webp +0 -0
  41. package/img/longnian1.webp +0 -0
  42. package/img/longnian2.webp +0 -0
  43. package/img/longnian3.webp +0 -0
  44. package/img/siteicon/android-chrome-144x144.png +0 -0
  45. package/img/siteicon/android-chrome-192x192.png +0 -0
  46. package/img/siteicon/android-chrome-256x256.png +0 -0
  47. package/img/siteicon/android-chrome-36x36.png +0 -0
  48. package/img/siteicon/android-chrome-384x384.png +0 -0
  49. package/img/siteicon/android-chrome-48x48.png +0 -0
  50. package/img/siteicon/android-chrome-512x512.png +0 -0
  51. package/img/siteicon/android-chrome-72x72.png +0 -0
  52. package/img/siteicon/android-chrome-96x96.png +0 -0
  53. package/img/siteicon/apple-splash-1125-2436.jpg +0 -0
  54. package/img/siteicon/apple-splash-1136-640.jpg +0 -0
  55. package/img/siteicon/apple-splash-1170-2532.jpg +0 -0
  56. package/img/siteicon/apple-splash-1179-2556.jpg +0 -0
  57. package/img/siteicon/apple-splash-1242-2208.jpg +0 -0
  58. package/img/siteicon/apple-splash-1242-2688.jpg +0 -0
  59. package/img/siteicon/apple-splash-1284-2778.jpg +0 -0
  60. package/img/siteicon/apple-splash-1290-2796.jpg +0 -0
  61. package/img/siteicon/apple-splash-1334-750.jpg +0 -0
  62. package/img/siteicon/apple-splash-1536-2048.jpg +0 -0
  63. package/img/siteicon/apple-splash-1620-2160.jpg +0 -0
  64. package/img/siteicon/apple-splash-1668-2224.jpg +0 -0
  65. package/img/siteicon/apple-splash-1668-2388.jpg +0 -0
  66. package/img/siteicon/apple-splash-1792-828.jpg +0 -0
  67. package/img/siteicon/apple-splash-2048-1536.jpg +0 -0
  68. package/img/siteicon/apple-splash-2048-2732.jpg +0 -0
  69. package/img/siteicon/apple-splash-2160-1620.jpg +0 -0
  70. package/img/siteicon/apple-splash-2208-1242.jpg +0 -0
  71. package/img/siteicon/apple-splash-2224-1668.jpg +0 -0
  72. package/img/siteicon/apple-splash-2388-1668.jpg +0 -0
  73. package/img/siteicon/apple-splash-2436-1125.jpg +0 -0
  74. package/img/siteicon/apple-splash-2532-1170.jpg +0 -0
  75. package/img/siteicon/apple-splash-2556-1179.jpg +0 -0
  76. package/img/siteicon/apple-splash-2688-1242.jpg +0 -0
  77. package/img/siteicon/apple-splash-2732-2048.jpg +0 -0
  78. package/img/siteicon/apple-splash-2778-1284.jpg +0 -0
  79. package/img/siteicon/apple-splash-2796-1290.jpg +0 -0
  80. package/img/siteicon/apple-splash-640-1136.jpg +0 -0
  81. package/img/siteicon/apple-splash-750-1334.jpg +0 -0
  82. package/img/siteicon/apple-splash-828-1792.jpg +0 -0
  83. package/img/siteicon/apple-touch-icon.png +0 -0
  84. package/img/siteicon/favicon-16x16.png +0 -0
  85. package/img/siteicon/favicon-32x32.png +0 -0
  86. package/img/siteicon/favicon.ico +0 -0
  87. package/img/siteicon/mstile-150x150.png +0 -0
  88. package/img/siteicon/safari-pinned-tab.svg +247 -0
  89. package/img/theta.svg +1 -0
  90. package/index.html +72 -0
  91. package/js/autoload.js +1 -0
  92. package/js/clock.js +1 -0
  93. package/js/kslink.js +1 -0
  94. package/js/newyear.js +1 -0
  95. package/js/plane.js +1 -0
  96. package/js/txmap.js +1 -0
  97. package/js/waifu-tips.json +1 -0
  98. package/manifest.json +1 -0
  99. package/package.json +1 -1
  100. package/posts/46521/index.html +72 -0
  101. package/sitemap.xml +101 -0
  102. package/sw-dom.js +73 -0
  103. package/sw.js +580 -138
  104. package/tags/Test/index.html +72 -0
  105. package/tags/index.html +72 -0
  106. package/test.json +1 -0
  107. package/update.json +1 -0
  108. package/en/404.html +0 -72
  109. package/en/archives/2023/12/index.html +0 -72
  110. package/en/archives/2023/index.html +0 -72
  111. package/en/archives/index.html +0 -72
  112. package/en/article.json +0 -1
  113. package/en/bangumis/index.html +0 -72
  114. package/en/categories/Test/index.html +0 -72
  115. package/en/categories/index.html +0 -72
  116. package/en/img/friend_404.gif +0 -0
  117. package/en/index.html +0 -72
  118. package/en/posts/46521/index.html +0 -72
  119. package/en/sitemap.xml +0 -56
  120. package/en/tags/Test/index.html +0 -72
  121. package/en/tags/index.html +0 -72
  122. /package/{en/assets → assets}/algolia/algoliasearch.js +0 -0
  123. /package/{en/assets → assets}/algolia/algoliasearch.min.js +0 -0
  124. /package/{en/assets → assets}/algolia/algoliasearchLite.js +0 -0
  125. /package/{en/assets → assets}/algolia/algoliasearchLite.min.js +0 -0
  126. /package/{en/css → css}/404.css +0 -0
  127. /package/{en/css → css}/anzhiyu-var.css +0 -0
  128. /package/{en/css → css}/bywind-var.css +0 -0
  129. /package/{en/css → css}/categoryBar.css +0 -0
  130. /package/{en/css → css}/console.css +0 -0
  131. /package/{en/css → css}/custom.css +0 -0
  132. /package/{en/css → css}/essay_page.css +0 -0
  133. /package/{en/css → css}/footer.css +0 -0
  134. /package/{en/css → css}/heo-var.css +0 -0
  135. /package/{en/css → css}/icat-var.css +0 -0
  136. /package/{en/css → css}/iconfont.css +0 -0
  137. /package/{en/css → css}/iconfont.ttf +0 -0
  138. /package/{en/css → css}/iconfont.woff +0 -0
  139. /package/{en/css → css}/iconfont.woff2 +0 -0
  140. /package/{en/css → css}/index.css +0 -0
  141. /package/{en/css → css}/orlike.css +0 -0
  142. /package/{en/css → css}/rightmenu.css +0 -0
  143. /package/{en/css → css}/var.css +0 -0
  144. /package/{en/img → img}/404.jpg +0 -0
  145. /package/{en/img → img}/favicon.png +0 -0
  146. /package/{en/img → img}/footer-social-link.svg +0 -0
  147. /package/{en/js → js}/about.js +0 -0
  148. /package/{en/js → js}/categoryBar.js +0 -0
  149. /package/{en/js → js}/comments.js +0 -0
  150. /package/{en/js → js}/console.js +0 -0
  151. /package/{en/js → js}/custom/fixed_card_widget.js +0 -0
  152. /package/{en/js → js}/custom.js +0 -0
  153. /package/{en/js → js}/day.js +0 -0
  154. /package/{en/js → js}/fps.js +0 -0
  155. /package/{en/js → js}/hometop.js +0 -0
  156. /package/{en/js → js}/lunar.js +0 -0
  157. /package/{en/js → js}/main.js +0 -0
  158. /package/{en/js → js}/nav.js +0 -0
  159. /package/{en/js → js}/orlike.js +0 -0
  160. /package/{en/js → js}/owobig.js +0 -0
  161. /package/{en/js → js}/random-friends-post.js +0 -0
  162. /package/{en/js → js}/randompost.js +0 -0
  163. /package/{en/js → js}/rightmenu.js +0 -0
  164. /package/{en/js → js}/sakura.js +0 -0
  165. /package/{en/js → js}/search/algolia.js +0 -0
  166. /package/{en/js → js}/search/local-search.js +0 -0
  167. /package/{en/js → js}/tw_cn.js +0 -0
  168. /package/{en/js → js}/utils.js +0 -0
  169. /package/{en/js → js}/waterfall/waterfall.js +0 -0
  170. /package/{en/js → js}/welcome.js +0 -0
  171. /package/{en/lib → lib}/tag_plugins.css +0 -0
  172. /package/{en/robots.txt → robots.txt} +0 -0
package/sw-dom.js ADDED
@@ -0,0 +1,73 @@
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: `Cache refreshed,Updated to version ${GLOBAL_CONFIG.uiversion} with the latest content.`,
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
+ })