sinzmise-cetastories 1.7.0-1717844841184 → 1.7.0-1717845329718

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) 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 +35 -35
  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/js/console.js +1 -452
  54. package/link/index.html +1 -1
  55. package/music/index.html +1 -1
  56. package/package.json +1 -1
  57. package/page/2/index.html +1 -1
  58. package/page/3/index.html +1 -1
  59. package/page/4/index.html +1 -1
  60. package/posts/10021/index.html +1 -1
  61. package/posts/10045/index.html +1 -1
  62. package/posts/10996/index.html +1 -1
  63. package/posts/12779/index.html +1 -1
  64. package/posts/13624/index.html +1 -1
  65. package/posts/15748/index.html +1 -1
  66. package/posts/15842/index.html +1 -1
  67. package/posts/16107/index.html +1 -1
  68. package/posts/18063/index.html +1 -1
  69. package/posts/20412/index.html +1 -1
  70. package/posts/21375/index.html +1 -1
  71. package/posts/22945/index.html +1 -1
  72. package/posts/23021/index.html +1 -1
  73. package/posts/27531/index.html +1 -1
  74. package/posts/27762/index.html +1 -1
  75. package/posts/28536/index.html +1 -1
  76. package/posts/28733/index.html +1 -1
  77. package/posts/29196/index.html +1 -1
  78. package/posts/38917/index.html +1 -1
  79. package/posts/38964/index.html +1 -1
  80. package/posts/42487/index.html +1 -1
  81. package/posts/42580/index.html +1 -1
  82. package/posts/45875/index.html +1 -1
  83. package/posts/48762/index.html +1 -1
  84. package/posts/50710/index.html +1 -1
  85. package/posts/52677/index.html +1 -1
  86. package/posts/53662/index.html +1 -1
  87. package/posts/54386/index.html +1 -1
  88. package/posts/54481/index.html +1 -1
  89. package/posts/54787/index.html +1 -1
  90. package/posts/56467/index.html +1 -1
  91. package/posts/57692/index.html +1 -1
  92. package/posts/58203/index.html +1 -1
  93. package/posts/61417/index.html +1 -1
  94. package/posts/646/index.html +1 -1
  95. package/seas/index.html +1 -1
  96. package/sitemap.xml +45 -45
  97. package/sw-dom.js +73 -1
  98. package/sw.js +586 -1
  99. package/tags/Flash/347/233/270/345/205/263/index.html +1 -1
  100. package/tags/Steam/346/270/270/346/210/217/index.html +1 -1
  101. package/tags/Windows/350/275/257/344/273/266/index.html +1 -1
  102. package/tags/index.html +1 -1
  103. package/tags//344/270/252/344/272/272/345/260/217/350/256/260/index.html +1 -1
  104. package/tags//344/270/252/344/272/272/345/260/217/350/256/260/page/2/index.html +1 -1
  105. package/tags//345/205/266/345/256/203/346/270/270/346/210/217/index.html +1 -1
  106. 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
  107. package/tags//346/255/214/346/233/262/346/224/266/351/233/206/index.html +1 -1
  108. package/tags//346/270/270/346/210/217/347/233/270/345/205/263/index.html +1 -1
  109. package/tags//347/253/231/347/202/271/345/272/225/351/203/250/351/255/224/346/224/271/index.html +1 -1
  110. package/tags//347/253/231/347/202/271/346/212/230/350/205/276/index.html +1 -1
  111. package/tags//347/253/231/347/202/271/346/212/230/350/205/276/page/2/index.html +1 -1
  112. package/tags//350/207/252/345/273/272/351/203/250/347/275/262/index.html +1 -1
  113. package/tags//351/241/265/351/235/242/351/255/224/346/224/271/index.html +1 -1
  114. package/tags//351/241/271/347/233/256/346/212/230/350/205/276/index.html +1 -1
  115. package/update/index.html +1 -1
  116. package/update.json +1 -1
package/js/console.js CHANGED
@@ -1,452 +1 @@
1
- document.addEventListener('pjax:complete', tosetting);
2
- document.addEventListener('DOMContentLoaded', tosetting);
3
- function tosetting(){
4
- $("#settingWindow").hide();
5
- if(localStorage.getItem("blur")=="false"){
6
- blur=0;
7
- }else{
8
- blur=1;
9
-
10
- }
11
- if(localStorage.getItem("yjjs")=="true"){
12
- yjjs=1;
13
- }else{
14
- yjjs=0;
15
-
16
- }
17
- if(localStorage.getItem("fpson")==undefined){
18
- localStorage.setItem("fpson","1");
19
- }
20
- if(!blur){
21
- document.getElementById("settingStyle").innerText=`
22
- *,*:not(.card-info)::before,*::after{
23
- -webkit-backdrop-filter: none!important;
24
- backdrop-filter: none!important;
25
- -webkit-filter: none!important;
26
- filter: none!important;
27
- }`}
28
- else{
29
- document.getElementById("settingStyle").innerText=''
30
- }
31
- setBlur=function(){
32
- blur=!blur;
33
- localStorage.setItem("blur",blur);
34
- if(!blur){
35
- document.getElementById("settingStyle").innerText=`
36
- *{
37
- -webkit-backdrop-filter: none!important;
38
- backdrop-filter: none!important;
39
- -webkit-filter: none!important;
40
- filter: none!important;
41
- }`}
42
- else{
43
- document.getElementById("settingStyle").innerText=''
44
- }
45
- }
46
- // if(yjjs){
47
- // document.getElementById("yjjs").innerText=`
48
- // *:not(#web_bg){
49
- // transform:translateZ(0);
50
- // backface-visibility: hidden
51
- // }`}
52
- // else{
53
- // document.getElementById("yjjs").innerText=``
54
- // }
55
- yjjs1=function(){
56
- yjjs=!yjjs;
57
- localStorage.setItem("yjjs",yjjs)
58
- // if(yjjs){
59
- // document.getElementById("yjjs").innerText=`
60
- // *:not(#web_bg){
61
- // transform:translateZ(0);
62
- // backface-visibility: hidden
63
- // }`}
64
- // else{
65
- // document.getElementById("yjjs").innerText=``
66
- // }
67
- }
68
- if(localStorage.getItem("blogTheme")=="acrylic"){
69
- document.getElementById("css").href="";
70
- }
71
- switchTheme=function(){
72
- if(document.getElementById("css").href==window.location.protocol+"//"+window.location.host+"/css/stylessimple.css"){
73
- document.getElementById("css").href=""
74
- localStorage.setItem("blogTheme","acrylic");
75
- }else{
76
- document.getElementById("css").href="/css/stylessimple.css"
77
- localStorage.setItem("blogTheme","simple");
78
- }
79
- }
80
- setColor=function(c){
81
- document.getElementById("themeColor").innerText=`:root{--story-theme:var(--story-${c})!important;--story-theme-op:var(--story-${c}-op;)!important;--story-theme-deep:var(--story-${c}-deep;)!important;--story-theme-none:var(--story-${c}-none;)!important}`;
82
- localStorage.setItem("themeColor",c);
83
-
84
- }
85
- setFont=function(n){
86
- localStorage.setItem("font",n);
87
- if(n=="main"){
88
- var s=document.querySelectorAll("body,.aplayer")
89
- for(var i = 0; i <s.length; i++) {
90
- s[i].style.fontFamily="-apple-system, IBM Plex Mono ,monospace,'寰蒋闆呴粦', sans-serif"
91
- }
92
- }
93
- else if(n=="HYPailou"){
94
- var s=document.querySelectorAll("body,.aplayer")
95
- for(var i = 0; i <s.length; i++) {
96
- s[i].style.fontFamily="Fredoka,HYPailou,KyoukashoProL,-apple-system, IBM Plex Mono ,monospace,'寰蒋闆呴粦', sans-serif"
97
- }
98
- }
99
- else{
100
- var s=document.querySelectorAll("body,.aplayer")
101
- for(var i = 0; i <s.length; i++) {
102
- s[i].style.fontFamily="var(--global-font),KyoukashoProL,-apple-system, IBM Plex Mono ,monosapce,\"寰蒋闆呴粦\", sans-serif"
103
- }
104
- document.body.style.fontFamily="var(--global-font),KyoukashoProL,-apple-system, IBM Plex Mono ,monosapce,'寰蒋闆呴粦', sans-serif"
105
- document.documentElement.style.setProperty('--global-font', n)
106
- }
107
- }
108
- if(localStorage.getItem("themeColor")==undefined){
109
- localStorage.setItem("themeColor","orange");
110
- }
111
-
112
- setColor(localStorage.getItem("themeColor"));
113
-
114
-
115
-
116
- if(localStorage.getItem("hideRightside")==undefined){
117
- localStorage.setItem("hideRightside","0");
118
- }
119
-
120
- if(localStorage.getItem("hideRightside")=="1"){
121
- $("#rightside").toggle()
122
- }
123
- toggleRightside=function(){
124
- $("#rightside").toggle();
125
- localStorage.setItem("hideRightside",Math.abs(Number(localStorage.getItem("hideRightside"))-1))
126
- }
127
- if(localStorage.getItem("font")==undefined){
128
- localStorage.setItem("font","HYTMR")
129
- }
130
- setFont(localStorage.getItem("font"))
131
- // 瀛樻暟鎹�
132
- // name锛氬懡鍚� data锛氭暟鎹�
133
- saveData=function(name, data) {
134
- localStorage.setItem(name, JSON.stringify({ 'time': Date.now(), 'data': data }))
135
- }
136
-
137
- // 鍙栨暟鎹�
138
- // name锛氬懡鍚� time锛氳繃鏈熸椂闀�,鍗曚綅鍒嗛挓,濡備紶鍏�30,鍗冲姞杞芥暟鎹椂濡傛灉瓒呭嚭30鍒嗛挓杩斿洖0,鍚﹀垯杩斿洖鏁版嵁
139
- loadData=function(name, time) {
140
- let d = JSON.parse(localStorage.getItem(name));
141
- // 杩囨湡鎴栨湁閿欒杩斿洖 0 鍚﹀垯杩斿洖鏁版嵁
142
- if (d) {
143
- let t = Date.now() - d.time
144
- if (t < (time * 60 * 1000) && t > -1) return d.data;
145
- }
146
- return 0;
147
- }
148
- // 鍒囨崲鑳屾櫙鍑芥暟
149
- // 姝ゅ鐨刦lag鏄负浜嗘瘡娆¤鍙栨椂閮介噸鏂板瓨鍌ㄤ竴娆�,瀵艰嚧杩囨湡鏃堕棿涓嶇ǔ瀹�
150
- // 濡傛灉flag涓�0鍒欏瓨鍌�,鍗宠缃儗鏅�. 涓�1鍒欎笉瀛樺偍,鍗虫瘡娆″姞杞借嚜鍔ㄨ鍙栬儗鏅�.
151
- changeBg=function(s, flag) {
152
- let bg = document.getElementById('web_bg')
153
- if (s.charAt(0) == '#') {
154
- bg.style.backgroundColor = s
155
- bg.style.backgroundImage = 'none'
156
- } else bg.style.backgroundImage = s
157
- if (!flag) { saveData('blogbg', s) }
158
- }
159
- // 涓婇潰涓や釜鍑芥暟濡傛灉浣犳湁鍏朵粬闇€瑕佸瓨鍙栨暟鎹殑鍔熻兘锛屼篃鍙互鐩存帴浣跨敤
160
-
161
- // 璇诲彇鑳屾櫙
162
- try {
163
- let data = loadData('blogbg', 1440)
164
- if (data) changeBg(data, 1)
165
- else localStorage.removeItem('blogbg');
166
- } catch (error) { localStorage.removeItem('blogbg'); }
167
-
168
-
169
-
170
- fpssw=function(){
171
- if(localStorage.getItem("fpson")=="1"){
172
- localStorage.setItem("fpson","0");
173
- }else{
174
- localStorage.setItem("fpson","1");
175
- }
176
- }
177
- $(".asetting").hide();
178
- $('#backer').hide();
179
- $('#stt-style').hide();
180
- $('#stt-font').hide();
181
- $('#stt-background').hide();
182
- $('#stt-count').hide();
183
- $('#stt-about').hide();
184
- $("#"+localStorage.getItem("themeColor")).attr("checked", true);
185
- if(localStorage.getItem("blur")=="false"){
186
- document.getElementById("blur").checked=true;
187
- }
188
- if(localStorage.getItem("yjjs")=="true"){
189
- document.getElementById("yjjs").checked=true;
190
- }
191
- if(localStorage.getItem("fpson")=="1"){
192
- document.getElementById("fpson").checked=true;
193
- }
194
-
195
-
196
- if(localStorage.getItem("sakurahide")=="false"){
197
- document.getElementById("hideSakura").checked=true;
198
- isSakura=1;
199
- }
200
- else if(localStorage.getItem("sakurahide")==null){
201
- localStorage.setItem("sakurahide","false");
202
- document.getElementById("hideSakura").checked=true;
203
- isSakura=1;
204
- }
205
- else{
206
- setTimeout(
207
- stopp,1000);
208
- isSakura=0;
209
- }
210
- if(localStorage.getItem("aplayerhide")=="true"){
211
- document.getElementById("hideAplayer").checked=false;
212
- var playerid = document.getElementById('guiguiplayer');
213
- var playertips = document.getElementById('guiguiTips');
214
- var playerksc = document.getElementById('guiguiKsc');
215
- var playerlrc = document.getElementById('guiguiKsc');
216
- var playerjs = document.getElementById('xplayer');
217
- if(playerjs && playerid && playertips && playerksc && playerlrc){
218
- playerid.style.visibility = 'hidden';
219
- playertips.style.visibility = 'hidden';
220
- playerksc.style.visibility = 'hidden';
221
- playerlrc.style.visibility = 'hidden';
222
- hasgeci = false;
223
- $("li", $albumList).eq(albumId).addClass(cur).find(".artist").html("暂停播放 > ").parent().siblings().removeClass(cur).find(".artist").html("").parent();
224
- guiguiTips.show("暂停播放 - " + songSheetList[albumId].songNames[songId]);
225
- $cover.removeClass("coverplay");
226
- audio.pause();
227
- var obj = document.getElementsByClassName('pause');
228
- obj[0].style.display = "none";
229
-
230
- var play_obj = document.getElementsByClassName('play');
231
- play_obj[0].style.display = "block";
232
-
233
- $.cookie("auto_playre", "no")
234
- }else{
235
- setTimeout(() =>
236
- Snackbar.show({
237
- text: '本站配合音乐播放器最佳(可在设置里关闭)',
238
- pos: 'bottom-right',
239
- actionText: "开启播放器",
240
- onActionClick: function (element) {
241
- toggleAplayer()
242
- },
243
- }),
244
- 15000)
245
- }
246
- }
247
- else if(localStorage.getItem("aplayerhide")==null){
248
- localStorage.setItem("aplayerhide","true");
249
- document.getElementById("hideAplayer").checked=false;
250
- }else{
251
- document.getElementById("hideAplayer").checked=true;
252
- var playerid = document.getElementById('guiguiplayer');
253
- var playertips = document.getElementById('guiguiTips');
254
- var playerksc = document.getElementById('guiguiKsc');
255
- var playerlrc = document.getElementById('guiguiKsc');
256
- var playerjs = document.getElementById('xplayer');
257
- if(playerjs && playerid && playertips && playerksc && playerlrc){
258
- playerid.style.visibility = 'visible';
259
- playertips.style.visibility = 'visible';
260
- playerksc.style.visibility = 'visible';
261
- playerlrc.style.visibility = 'visible';
262
- }else{
263
- var script = document.createElement('script');
264
- script.id = 'xplayer';
265
- script.src = 'https://y.cenguigui.cn/Static/player13/js/player.js';
266
- script.setAttribute('key',GLOBAL_CONFIG.player.key);
267
- script.setAttribute('m',GLOBAL_CONFIG.player.mobile);
268
- document.getElementsByTagName('body')[0].appendChild(script);
269
- }
270
- }
271
-
272
- document.getElementsByClassName("reSettings")[0].onclick=function(){
273
- localStorage.clear()
274
- window.location.reload()
275
- }
276
-
277
- toggleWinbox=function(){
278
- $("#settingWindow").fadeToggle();
279
- if(document.getElementById("settingWindow").style.display!="none"){
280
- document.getElementById("settingWindow").style.display="flex";
281
- }
282
- }
283
- fullScreen=function() {
284
- if (document.fullscreenElement) document.exitFullscreen()
285
- else document.documentElement.requestFullscreen();
286
- }
287
- toggleAside=function(){
288
- const $htmlDom = document.documentElement.classList
289
- $htmlDom.contains('hide-aside')
290
- ? saveToLocal.set('aside-status', 'show', 2)
291
- : saveToLocal.set('aside-status', 'hide', 2)
292
- $htmlDom.toggle('hide-aside')
293
- }
294
- toggleAplayer=function(){
295
- if(localStorage.getItem("aplayerhide")=="true"){
296
- localStorage.setItem("aplayerhide",false);
297
- var playerid = document.getElementById('guiguiplayer');
298
- var playertips = document.getElementById('guiguiTips');
299
- var playerksc = document.getElementById('guiguiKsc');
300
- var playerlrc = document.getElementById('guiguiKsc');
301
- var playerjs = document.getElementById('xplayer');
302
- if(playerjs && playerid && playertips && playerksc && playerlrc){
303
- playerid.style.visibility = 'visible';
304
- playertips.style.visibility = 'visible';
305
- playerksc.style.visibility = 'visible';
306
- playerlrc.style.visibility = 'visible';
307
- }else{
308
- var script = document.createElement('script');
309
- script.id = 'xplayer';
310
- script.src = 'https://y.cenguigui.cn/Static/player13/js/player.js';
311
- script.setAttribute('key',GLOBAL_CONFIG.player.key);
312
- script.setAttribute('m',GLOBAL_CONFIG.player.mobile);
313
- document.getElementsByTagName('body')[0].appendChild(script);
314
- }
315
- }
316
- else{
317
- localStorage.setItem("aplayerhide",true);
318
- var playerjs = document.getElementById('xplayer');
319
- var playerid = document.getElementById('guiguiplayer');
320
- var playertips = document.getElementById('guiguiTips');
321
- var playerksc = document.getElementById('guiguiKsc');
322
- var playerlrc = document.getElementById('guiguiKsc');
323
- if(playerjs && playerid && playertips && playerksc && playerlrc){
324
- playerid.style.visibility = 'hidden';
325
- playertips.style.visibility = 'hidden';
326
- playerksc.style.visibility = 'hidden';
327
- playerlrc.style.visibility = 'hidden';
328
- hasgeci = false;
329
- $("li", $albumList).eq(albumId).addClass(cur).find(".artist").html("暂停播放 > ").parent().siblings().removeClass(cur).find(".artist").html("").parent();
330
- guiguiTips.show("暂停播放 - " + songSheetList[albumId].songNames[songId]);
331
- $cover.removeClass("coverplay");
332
- audio.pause();
333
- var obj = document.getElementsByClassName('pause');
334
- obj[0].style.display = "none";
335
-
336
- var play_obj = document.getElementsByClassName('play');
337
- play_obj[0].style.display = "block";
338
-
339
- $.cookie("auto_playre", "no")
340
- }else{
341
- setTimeout(() =>
342
- Snackbar.show({
343
- text: '本站配合音乐播放器最佳(可在设置里关闭)',
344
- pos: 'bottom-right',
345
- actionText: "开启播放器",
346
- onActionClick: function (element) {
347
- toggleAplayer()
348
- },
349
- }),
350
- 15000)
351
- }
352
- }
353
- }
354
- // position = $(window).scrollTop();
355
- // $(window).scroll(function () {
356
-
357
- // scroll = $(window).scrollTop();
358
-
359
- // if (scroll > position) {
360
- // document.getElementsByTagName("header")[0].style.transform="translateY(58px)";
361
- // } else {
362
-
363
-
364
- // document.getElementsByTagName("header")[0].style.transform="";
365
-
366
- // }
367
-
368
- // position = scroll;
369
- // });
370
- toggleSakuras=function(){
371
- isSakura=!isSakura;
372
- stopp(isSakura);
373
- if(localStorage.getItem("sakurahide")=="true"){
374
- localStorage.setItem("sakurahide",false);
375
- }
376
- else{
377
- localStorage.setItem("sakurahide",true);
378
- }
379
- }
380
- switchAside=function(){
381
- if(left){
382
- document.getElementById("aside-content").classList.add("right");
383
- document.querySelector(".layout > div:first-child").classList.add("left");
384
- localStorage.setItem("leftAside","false");
385
- }
386
- else{
387
- document.getElementById("aside-content").className="aside-content";
388
- document.querySelector(".layout > div:first-child").className="";
389
- try{
390
- document.querySelector("#recent-posts").className="recent-posts";
391
- }catch(err){}localStorage.setItem("leftAside","true");}
392
- left=!left;
393
- }
394
- left=1;
395
- if(localStorage.getItem("leftAside")=="true"||localStorage.getItem("leftAside")==null){
396
-
397
- }else{
398
- switchAside();
399
- }
400
- if(localStorage.getItem("autoTheme")=="true"){
401
- localStorage.setItem("autoTheme","false");
402
- document.getElementById("autoTheme").checked=true;
403
- var time=new Date();
404
- if(time.getHours()<=7||time.getHours()>=19){
405
- activateDarkMode()
406
- saveToLocal.set('theme', 'dark', 2)
407
- GLOBAL_CONFIG.Snackbar !== undefined && btf.snackbarShow(GLOBAL_CONFIG.Snackbar.day_to_night)
408
- }
409
- else{
410
- activateLightMode()
411
- saveToLocal.set('theme', 'light', 2)
412
- GLOBAL_CONFIG.Snackbar !== undefined && btf.snackbarShow(GLOBAL_CONFIG.Snackbar.night_to_day)
413
- }
414
- }
415
- toggleAutoTheme=()=>{
416
- if(localStorage.getItem("autoTheme")=="false"){
417
- localStorage.setItem("autoTheme","true");
418
- $("#con-mode").show();
419
- }
420
- else{
421
- localStorage.setItem("autoTheme","false");
422
- var time=new Date();
423
- if(time.getHours()<=7||time.getHours()>=19){
424
- activateDarkMode()
425
- saveToLocal.set('theme', 'dark', 2)
426
- GLOBAL_CONFIG.Snackbar !== undefined && btf.snackbarShow(GLOBAL_CONFIG.Snackbar.day_to_night)
427
- }
428
- else{
429
- activateLightMode()
430
- saveToLocal.set('theme', 'light', 2)
431
- GLOBAL_CONFIG.Snackbar !== undefined && btf.snackbarShow(GLOBAL_CONFIG.Snackbar.night_to_day)
432
- }
433
- $("#con-mode").hide();
434
- }
435
- }
436
- }
437
- switchDarkMode = function () {
438
- const nowMode = document.documentElement.getAttribute('data-theme') === 'dark' ? 'dark' : 'light'
439
- if (nowMode === 'light') {
440
- activateDarkMode()
441
- saveToLocal.set('theme', 'dark', 2)
442
- GLOBAL_CONFIG.Snackbar !== undefined && btf.snackbarShow(GLOBAL_CONFIG.Snackbar.day_to_night)
443
- } else {
444
- activateLightMode()
445
- saveToLocal.set('theme', 'light', 2)
446
- GLOBAL_CONFIG.Snackbar !== undefined && btf.snackbarShow(GLOBAL_CONFIG.Snackbar.night_to_day)
447
- }
448
- // handle some cases
449
- typeof utterancesTheme === 'function' && utterancesTheme()
450
- typeof FB === 'object' && window.loadFBComment()
451
- window.DISQUS && document.getElementById('disqus_thread').children.length && setTimeout(() => window.disqusReset(), 200)
452
- };
1
+ function tosetting(){$("#settingWindow").hide(),"false"==localStorage.getItem("blur")?blur=0:blur=1,"true"==localStorage.getItem("yjjs")?yjjs=1:yjjs=0,null==localStorage.getItem("fpson")&&localStorage.setItem("fpson","1"),blur?document.getElementById("settingStyle").innerText="":document.getElementById("settingStyle").innerText="\n *,*:not(.card-info)::before,*::after{\n -webkit-backdrop-filter: none!important;\n backdrop-filter: none!important;\n -webkit-filter: none!important;\n filter: none!important;\n }",setBlur=function(){blur=!blur,localStorage.setItem("blur",blur),blur?document.getElementById("settingStyle").innerText="":document.getElementById("settingStyle").innerText="\n *{\n -webkit-backdrop-filter: none!important;\n backdrop-filter: none!important;\n -webkit-filter: none!important;\n filter: none!important;\n }"},yjjs1=function(){yjjs=!yjjs,localStorage.setItem("yjjs",yjjs)},"acrylic"==localStorage.getItem("blogTheme")&&(document.getElementById("css").href=""),switchTheme=function(){document.getElementById("css").href==window.location.protocol+"//"+window.location.host+"/css/stylessimple.css"?(document.getElementById("css").href="",localStorage.setItem("blogTheme","acrylic")):(document.getElementById("css").href="/css/stylessimple.css",localStorage.setItem("blogTheme","simple"))},setColor=function(e){document.getElementById("themeColor").innerText=`:root{--story-theme:var(--story-${e})!important;--story-theme-op:var(--story-${e}-op;)!important;--story-theme-deep:var(--story-${e}-deep;)!important;--story-theme-none:var(--story-${e}-none;)!important}`,localStorage.setItem("themeColor",e)},setFont=function(e){if(localStorage.setItem("font",e),"main"==e)for(var t=document.querySelectorAll("body,.aplayer"),o=0;o<t.length;o++)t[o].style.fontFamily="-apple-system, IBM Plex Mono ,monospace,'寰蒋闆呴粦', sans-serif";else if("HYPailou"==e)for(t=document.querySelectorAll("body,.aplayer"),o=0;o<t.length;o++)t[o].style.fontFamily="Fredoka,HYPailou,KyoukashoProL,-apple-system, IBM Plex Mono ,monospace,'寰蒋闆呴粦', sans-serif";else{for(t=document.querySelectorAll("body,.aplayer"),o=0;o<t.length;o++)t[o].style.fontFamily='var(--global-font),KyoukashoProL,-apple-system, IBM Plex Mono ,monosapce,"寰蒋闆呴粦", sans-serif';document.body.style.fontFamily="var(--global-font),KyoukashoProL,-apple-system, IBM Plex Mono ,monosapce,'寰蒋闆呴粦', sans-serif",document.documentElement.style.setProperty("--global-font",e)}},null==localStorage.getItem("themeColor")&&localStorage.setItem("themeColor","orange"),setColor(localStorage.getItem("themeColor")),null==localStorage.getItem("hideRightside")&&localStorage.setItem("hideRightside","0"),"1"==localStorage.getItem("hideRightside")&&$("#rightside").toggle(),toggleRightside=function(){$("#rightside").toggle(),localStorage.setItem("hideRightside",Math.abs(Number(localStorage.getItem("hideRightside"))-1))},null==localStorage.getItem("font")&&localStorage.setItem("font","HYTMR"),setFont(localStorage.getItem("font")),saveData=function(e,t){localStorage.setItem(e,JSON.stringify({time:Date.now(),data:t}))},loadData=function(e,t){let o=JSON.parse(localStorage.getItem(e));if(o){let e=Date.now()-o.time;if(e<60*t*1e3&&e>-1)return o.data}return 0},changeBg=function(e,t){let o=document.getElementById("web_bg");"#"==e.charAt(0)?(o.style.backgroundColor=e,o.style.backgroundImage="none"):o.style.backgroundImage=e,t||saveData("blogbg",e)};try{let e=loadData("blogbg",1440);e?changeBg(e,1):localStorage.removeItem("blogbg")}catch(e){localStorage.removeItem("blogbg")}if(fpssw=function(){"1"==localStorage.getItem("fpson")?localStorage.setItem("fpson","0"):localStorage.setItem("fpson","1")},$(".asetting").hide(),$("#backer").hide(),$("#stt-style").hide(),$("#stt-font").hide(),$("#stt-background").hide(),$("#stt-count").hide(),$("#stt-about").hide(),$("#"+localStorage.getItem("themeColor")).attr("checked",!0),"false"==localStorage.getItem("blur")&&(document.getElementById("blur").checked=!0),"true"==localStorage.getItem("yjjs")&&(document.getElementById("yjjs").checked=!0),"1"==localStorage.getItem("fpson")&&(document.getElementById("fpson").checked=!0),"false"==localStorage.getItem("sakurahide")?(document.getElementById("hideSakura").checked=!0,isSakura=1):null==localStorage.getItem("sakurahide")?(localStorage.setItem("sakurahide","false"),document.getElementById("hideSakura").checked=!0,isSakura=1):(setTimeout(stopp,1e3),isSakura=0),"true"==localStorage.getItem("aplayerhide")){document.getElementById("hideAplayer").checked=!1;var e=document.getElementById("guiguiplayer"),t=document.getElementById("guiguiTips"),o=document.getElementById("guiguiKsc"),l=document.getElementById("guiguiKsc");if(document.getElementById("xplayer")&&e&&t&&o&&l)e.style.visibility="hidden",t.style.visibility="hidden",o.style.visibility="hidden",l.style.visibility="hidden",hasgeci=!1,$("li",$albumList).eq(albumId).addClass(cur).find(".artist").html("暂停播放 > ").parent().siblings().removeClass(cur).find(".artist").html("").parent(),guiguiTips.show("暂停播放 - "+songSheetList[albumId].songNames[songId]),$cover.removeClass("coverplay"),audio.pause(),document.getElementsByClassName("pause")[0].style.display="none",document.getElementsByClassName("play")[0].style.display="block",$.cookie("auto_playre","no");else setTimeout((()=>Snackbar.show({text:"本站配合音乐播放器最佳(可在设置里关闭)",pos:"bottom-right",actionText:"开启播放器",onActionClick:function(e){toggleAplayer()}})),15e3)}else if(null==localStorage.getItem("aplayerhide"))localStorage.setItem("aplayerhide","true"),document.getElementById("hideAplayer").checked=!1;else{document.getElementById("hideAplayer").checked=!0;e=document.getElementById("guiguiplayer"),t=document.getElementById("guiguiTips"),o=document.getElementById("guiguiKsc"),l=document.getElementById("guiguiKsc");if(document.getElementById("xplayer")&&e&&t&&o&&l)e.style.visibility="visible",t.style.visibility="visible",o.style.visibility="visible",l.style.visibility="visible";else{var a=document.createElement("script");a.id="xplayer",a.src="https://y.cenguigui.cn/Static/player13/js/player.js",a.setAttribute("key",GLOBAL_CONFIG.player.key),a.setAttribute("m",GLOBAL_CONFIG.player.mobile),document.getElementsByTagName("body")[0].appendChild(a)}}if(document.getElementsByClassName("reSettings")[0].onclick=function(){localStorage.clear(),window.location.reload()},toggleWinbox=function(){$("#settingWindow").fadeToggle(),"none"!=document.getElementById("settingWindow").style.display&&(document.getElementById("settingWindow").style.display="flex")},fullScreen=function(){document.fullscreenElement?document.exitFullscreen():document.documentElement.requestFullscreen()},toggleAside=function(){const e=document.documentElement.classList;e.contains("hide-aside")?saveToLocal.set("aside-status","show",2):saveToLocal.set("aside-status","hide",2),e.toggle("hide-aside")},toggleAplayer=function(){if("true"==localStorage.getItem("aplayerhide")){localStorage.setItem("aplayerhide",!1);var e=document.getElementById("guiguiplayer"),t=document.getElementById("guiguiTips"),o=document.getElementById("guiguiKsc"),l=document.getElementById("guiguiKsc");if((i=document.getElementById("xplayer"))&&e&&t&&o&&l)e.style.visibility="visible",t.style.visibility="visible",o.style.visibility="visible",l.style.visibility="visible";else{var a=document.createElement("script");a.id="xplayer",a.src="https://y.cenguigui.cn/Static/player13/js/player.js",a.setAttribute("key",GLOBAL_CONFIG.player.key),a.setAttribute("m",GLOBAL_CONFIG.player.mobile),document.getElementsByTagName("body")[0].appendChild(a)}}else{localStorage.setItem("aplayerhide",!0);var i=document.getElementById("xplayer");e=document.getElementById("guiguiplayer"),t=document.getElementById("guiguiTips"),o=document.getElementById("guiguiKsc"),l=document.getElementById("guiguiKsc");if(i&&e&&t&&o&&l)e.style.visibility="hidden",t.style.visibility="hidden",o.style.visibility="hidden",l.style.visibility="hidden",hasgeci=!1,$("li",$albumList).eq(albumId).addClass(cur).find(".artist").html("暂停播放 > ").parent().siblings().removeClass(cur).find(".artist").html("").parent(),guiguiTips.show("暂停播放 - "+songSheetList[albumId].songNames[songId]),$cover.removeClass("coverplay"),audio.pause(),document.getElementsByClassName("pause")[0].style.display="none",document.getElementsByClassName("play")[0].style.display="block",$.cookie("auto_playre","no");else setTimeout((()=>Snackbar.show({text:"本站配合音乐播放器最佳(可在设置里关闭)",pos:"bottom-right",actionText:"开启播放器",onActionClick:function(e){toggleAplayer()}})),15e3)}},toggleSakuras=function(){isSakura=!isSakura,stopp(isSakura),"true"==localStorage.getItem("sakurahide")?localStorage.setItem("sakurahide",!1):localStorage.setItem("sakurahide",!0)},switchAside=function(){if(left)document.getElementById("aside-content").classList.add("right"),document.querySelector(".layout > div:first-child").classList.add("left"),localStorage.setItem("leftAside","false");else{document.getElementById("aside-content").className="aside-content",document.querySelector(".layout > div:first-child").className="";try{document.querySelector("#recent-posts").className="recent-posts"}catch(e){}localStorage.setItem("leftAside","true")}left=!left},left=1,"true"==localStorage.getItem("leftAside")||null==localStorage.getItem("leftAside")||switchAside(),"true"==localStorage.getItem("autoTheme")){localStorage.setItem("autoTheme","false"),document.getElementById("autoTheme").checked=!0;var i=new Date;i.getHours()<=7||i.getHours()>=19?(activateDarkMode(),saveToLocal.set("theme","dark",2),void 0!==GLOBAL_CONFIG.Snackbar&&btf.snackbarShow(GLOBAL_CONFIG.Snackbar.day_to_night)):(activateLightMode(),saveToLocal.set("theme","light",2),void 0!==GLOBAL_CONFIG.Snackbar&&btf.snackbarShow(GLOBAL_CONFIG.Snackbar.night_to_day))}toggleAutoTheme=()=>{if("false"==localStorage.getItem("autoTheme"))localStorage.setItem("autoTheme","true"),$("#con-mode").show();else{localStorage.setItem("autoTheme","false");var e=new Date;e.getHours()<=7||e.getHours()>=19?(activateDarkMode(),saveToLocal.set("theme","dark",2),void 0!==GLOBAL_CONFIG.Snackbar&&btf.snackbarShow(GLOBAL_CONFIG.Snackbar.day_to_night)):(activateLightMode(),saveToLocal.set("theme","light",2),void 0!==GLOBAL_CONFIG.Snackbar&&btf.snackbarShow(GLOBAL_CONFIG.Snackbar.night_to_day)),$("#con-mode").hide()}}}document.addEventListener("pjax:complete",tosetting),document.addEventListener("DOMContentLoaded",tosetting),switchDarkMode=function(){"light"===("dark"===document.documentElement.getAttribute("data-theme")?"dark":"light")?(activateDarkMode(),saveToLocal.set("theme","dark",2),void 0!==GLOBAL_CONFIG.Snackbar&&btf.snackbarShow(GLOBAL_CONFIG.Snackbar.day_to_night)):(activateLightMode(),saveToLocal.set("theme","light",2),void 0!==GLOBAL_CONFIG.Snackbar&&btf.snackbarShow(GLOBAL_CONFIG.Snackbar.night_to_day)),"function"==typeof utterancesTheme&&utterancesTheme(),"object"==typeof FB&&window.loadFBComment(),window.DISQUS&&document.getElementById("disqus_thread").children.length&&setTimeout((()=>window.disqusReset()),200)};