q78kgblog 0.0.0-1720429643771 → 0.0.0-1720441708496
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.
- package/.github/workflows/HexoSeoAutoPush.yml +12 -8
- package/404.html +4 -4
- package/about/index.html +6 -6
- package/archives/2023/02/index.html +5 -5
- package/archives/2023/04/index.html +5 -5
- package/archives/2023/05/index.html +5 -5
- package/archives/2023/08/index.html +5 -5
- package/archives/2023/09/index.html +5 -5
- package/archives/2023/index.html +5 -5
- package/archives/2024/01/index.html +5 -5
- package/archives/2024/02/index.html +5 -5
- package/archives/2024/index.html +5 -5
- package/archives/index.html +5 -5
- package/atom.xml +9 -9
- package/bangumis/index.html +7 -6
- package/bigpie/index.html +4 -4
- package/categories/Hexo/index.html +5 -5
- package/categories/index.html +4 -4
- package/categories//345/271/264/347/273/210/346/200/273/347/273/223/index.html +5 -5
- package/categories//347/264/240/346/235/220/index.html +5 -5
- package/categories//351/227/262/350/201/212/346/235/202/350/260/210/index.html +5 -5
- package/content.json +1 -1
- package/css/ariasakablog.css +6669 -0
- package/css/danmaku.css +2 -0
- package/fcircle/index.html +4 -4
- package/fontawesome/index.html +4 -4
- package/index.html +12 -12
- package/js/commentBarrage.js +201 -201
- package/js/day.js +110 -110
- package/js/dianzan.js +5 -5
- package/js/dis.js +241 -242
- package/js/fps.js +54 -55
- package/js/gitalker.js +1 -1
- package/js/heimu.js +15 -16
- package/js/hide.show.js +5 -5
- package/js/languages.js +510 -510
- package/js/lunar.js +517 -517
- package/js/main.js +8 -8
- package/js/resizeTop.js +31 -31
- package/js/settings.js +302 -303
- package/js/sitetime.js +11 -11
- package/js/welcomeconsole.js +8 -9
- package/links/index.html +4 -4
- package/othersite/index.html +4 -4
- package/package.json +1 -1
- package/posts/164ef646/index.html +6 -6
- package/posts/228c2ef8/index.html +6 -6
- package/posts/a9a6c1fb/index.html +6 -6
- package/posts/c262e439/index.html +6 -6
- package/posts/c81531cf/index.html +6 -6
- package/posts/ccdf7cfc/index.html +6 -6
- package/posts/de1f83f4/index.html +6 -6
- package/posts/e54f7476/index.html +6 -6
- package/random.html +2 -2
- package/sitemap.txt +2 -2
- package/sitemap.xml +6 -6
- package/tags/AI/index.html +6 -6
- package/tags/Butterfly/index.html +6 -6
- package/tags/Cloudflare/index.html +6 -6
- package/tags/DiffSinger/index.html +6 -6
- package/tags/Hexo/index.html +6 -6
- package/tags/Next/index.html +6 -6
- package/tags/RAID/index.html +6 -6
- package/tags/Vercel/index.html +6 -6
- package/tags/Workers/index.html +6 -6
- package/tags/index.html +4 -4
- package/tags//344/270/273/351/242/230/index.html +6 -6
- package/tags//345/206/231/344/275/234/index.html +6 -6
- package/tags//345/245/263/346/200/247/346/204/217/350/257/206/index.html +6 -6
- package/tags//345/255/246/344/271/240/index.html +6 -6
- package/tags//345/256/266/351/207/214/344/272/221/index.html +6 -6
- package/tags//345/271/264/347/273/210/346/200/273/347/273/223/index.html +6 -6
- package/tags//346/212/230/350/205/276/index.html +6 -6
- package/tags//346/227/245/345/270/270/index.html +6 -6
- package/tags//346/234/215/345/212/241/345/231/250/index.html +6 -6
- package/tags//346/265/252/346/275/256/index.html +6 -6
- package/tags//347/256/200/347/210/261/index.html +6 -6
- package/tags//350/207/252/345/212/250/346/240/207/346/263/250/index.html +6 -6
- package/tags//350/256/272/346/226/207/index.html +6 -6
- package/tags//350/260/267/346/255/214/347/277/273/350/257/221/index.html +6 -6
- package/tags//350/264/237/350/275/275/345/235/207/350/241/241/index.html +6 -6
- package/tags//351/207/221/345/217/245/index.html +6 -6
- package/tags//351/255/224/346/224/271/index.html +6 -6
package/js/settings.js
CHANGED
@@ -1,354 +1,353 @@
|
|
1
1
|
document.addEventListener('pjax:complete', tosetting);
|
2
2
|
document.addEventListener('DOMContentLoaded', tosetting);
|
3
|
-
function tosetting()
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
}
|
8
|
-
blur
|
9
|
-
|
10
|
-
}
|
11
|
-
if
|
12
|
-
yjjs
|
13
|
-
}
|
14
|
-
yjjs
|
15
|
-
|
16
|
-
}
|
17
|
-
if
|
18
|
-
localStorage.setItem("fpson",
|
19
|
-
}
|
20
|
-
|
21
|
-
|
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
22
|
*,*:not(.card-info)::before,*::after{
|
23
23
|
-webkit-backdrop-filter: none!important;
|
24
24
|
backdrop-filter: none!important;
|
25
25
|
-webkit-filter: none!important;
|
26
26
|
filter: none!important;
|
27
27
|
}`}
|
28
|
-
else
|
29
|
-
document.getElementById("settingStyle").innerText
|
30
|
-
}
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
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
36
|
*{
|
37
37
|
-webkit-backdrop-filter: none!important;
|
38
38
|
backdrop-filter: none!important;
|
39
39
|
-webkit-filter: none!important;
|
40
40
|
filter: none!important;
|
41
41
|
}`}
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
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)
|
46
58
|
// if(yjjs){
|
47
|
-
//
|
48
|
-
//
|
49
|
-
//
|
50
|
-
//
|
51
|
-
//
|
52
|
-
//
|
53
|
-
//
|
54
|
-
//
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
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{--lyx-theme:var(--lyx-${c})!important}`;
|
82
|
-
localStorage.setItem("themeColor", c);
|
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{--lyx-theme:var(--lyx-${c})!important}`;
|
82
|
+
localStorage.setItem("themeColor",c);
|
83
83
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
}
|
84
|
+
}
|
85
|
+
setFont=function(n){
|
86
|
+
localStorage.setItem("font",n);
|
87
|
+
if(n=="main"){
|
88
|
+
var s=document.querySelectorAll("body,.wv-lt-location>a[data-v-4b9dcab4],.wv-lt-location>span[data-v-4b9dcab4],.wv-n-h-now-tmp>span[data-v-5f4c0628],.wv-n-h-now-txt>span[data-v-5f4c0628],.wv-n-h-now-rain>a[data-v-5f4c0628], .wv-n-h-now-rain>span[data-v-5f4c0628],.wv-f-forecast-date>a[data-v-66693262],.wv-f-a,.wv-lt-location>a[data-v-4b9dcab4],.wv-lt-location>span[data-v-4b9dcab4],.wv-n-h-now-tmp>span[data-v-5f4c0628],.wv-n-h-now-txt>span[data-v-5f4c0628],.wv-n-h-now-rain>a[data-v-5f4c0628], .wv-n-h-now-rain>span[data-v-5f4c0628],.wv-f-forecast-date>a[data-v-66693262],.wv-f-a,.aplayer")
|
89
|
+
for(var i = 0; i <s.length; i++) {
|
90
|
+
s[i].style.fontFamily="-apple-system, IBM Plex Mono ,monospace,'微软雅黑', sans-serif"
|
92
91
|
}
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
}
|
99
|
-
else {
|
100
|
-
var s = document.querySelectorAll("body,.wv-lt-location>a[data-v-4b9dcab4],.wv-lt-location>span[data-v-4b9dcab4],.wv-n-h-now-tmp>span[data-v-5f4c0628],.wv-n-h-now-txt>span[data-v-5f4c0628],.wv-n-h-now-rain>a[data-v-5f4c0628], .wv-n-h-now-rain>span[data-v-5f4c0628],.wv-f-forecast-date>a[data-v-66693262],.wv-f-a,.wv-lt-location>a[data-v-4b9dcab4],.wv-lt-location>span[data-v-4b9dcab4],.wv-n-h-now-tmp>span[data-v-5f4c0628],.wv-n-h-now-txt>span[data-v-5f4c0628],.wv-n-h-now-rain>a[data-v-5f4c0628], .wv-n-h-now-rain>span[data-v-5f4c0628],.wv-f-forecast-date>a[data-v-66693262],.wv-f-a,.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)
|
92
|
+
}
|
93
|
+
else if(n=="HYPailou"){
|
94
|
+
var s=document.querySelectorAll("body,.wv-lt-location>a[data-v-4b9dcab4],.wv-lt-location>span[data-v-4b9dcab4],.wv-n-h-now-tmp>span[data-v-5f4c0628],.wv-n-h-now-txt>span[data-v-5f4c0628],.wv-n-h-now-rain>a[data-v-5f4c0628], .wv-n-h-now-rain>span[data-v-5f4c0628],.wv-f-forecast-date>a[data-v-66693262],.wv-f-a,.wv-lt-location>a[data-v-4b9dcab4],.wv-lt-location>span[data-v-4b9dcab4],.wv-n-h-now-tmp>span[data-v-5f4c0628],.wv-n-h-now-txt>span[data-v-5f4c0628],.wv-n-h-now-rain>a[data-v-5f4c0628], .wv-n-h-now-rain>span[data-v-5f4c0628],.wv-f-forecast-date>a[data-v-66693262],.wv-f-a,.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"
|
106
97
|
}
|
107
98
|
}
|
108
|
-
|
109
|
-
|
99
|
+
else{
|
100
|
+
var s=document.querySelectorAll("body,.wv-lt-location>a[data-v-4b9dcab4],.wv-lt-location>span[data-v-4b9dcab4],.wv-n-h-now-tmp>span[data-v-5f4c0628],.wv-n-h-now-txt>span[data-v-5f4c0628],.wv-n-h-now-rain>a[data-v-5f4c0628], .wv-n-h-now-rain>span[data-v-5f4c0628],.wv-f-forecast-date>a[data-v-66693262],.wv-f-a,.wv-lt-location>a[data-v-4b9dcab4],.wv-lt-location>span[data-v-4b9dcab4],.wv-n-h-now-tmp>span[data-v-5f4c0628],.wv-n-h-now-txt>span[data-v-5f4c0628],.wv-n-h-now-rain>a[data-v-5f4c0628], .wv-n-h-now-rain>span[data-v-5f4c0628],.wv-f-forecast-date>a[data-v-66693262],.wv-f-a,.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)
|
110
106
|
}
|
107
|
+
}
|
108
|
+
if(localStorage.getItem("themeColor")==undefined){
|
109
|
+
localStorage.setItem("themeColor","pink");
|
110
|
+
}
|
111
111
|
|
112
|
-
|
112
|
+
setColor(localStorage.getItem("themeColor"));
|
113
113
|
|
114
114
|
|
115
115
|
|
116
|
-
|
117
|
-
|
118
|
-
|
116
|
+
if(localStorage.getItem("hideRightside")==undefined){
|
117
|
+
localStorage.setItem("hideRightside","0");
|
118
|
+
}
|
119
119
|
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
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
136
|
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
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
|
+
// 此处的flag是为了每次读取时都重新存储一次,导致过期时间不稳定
|
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
160
|
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
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
|
-
$("#" + localStorage.getItem("themeColor")).attr("checked", true);
|
180
|
-
if (localStorage.getItem("blur") == "false") {
|
181
|
-
document.getElementById("blur").checked = true;
|
182
|
-
}
|
183
|
-
if (localStorage.getItem("yjjs") == "true") {
|
184
|
-
document.getElementById("yjjs").checked = true;
|
185
|
-
}
|
186
|
-
if (localStorage.getItem("fpson") == "1") {
|
187
|
-
document.getElementById("fpson").checked = true;
|
188
|
-
}
|
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'); }
|
189
167
|
|
190
168
|
|
191
|
-
if (localStorage.getItem("sakurahide") == "false") {
|
192
|
-
document.getElementById("hideSakura").checked = true;
|
193
|
-
isSakura = 1;
|
194
|
-
}
|
195
|
-
else if (localStorage.getItem("sakurahide") == null) {
|
196
|
-
localStorage.setItem("sakurahide", "false");
|
197
|
-
document.getElementById("hideSakura").checked = true;
|
198
|
-
isSakura = 1;
|
199
|
-
}
|
200
|
-
else {
|
201
|
-
setTimeout(
|
202
|
-
stopp, 1000);
|
203
|
-
isSakura = 0;
|
204
|
-
}
|
205
|
-
if (localStorage.getItem("aplayerhide") == "false") {
|
206
|
-
document.getElementById("hideAplayer").checked = true;
|
207
|
-
}
|
208
|
-
else if (localStorage.getItem("aplayerhide") == null) {
|
209
|
-
localStorage.setItem("aplayerhide", "false");
|
210
|
-
document.getElementById("hideAplayer").checked = true;
|
211
|
-
}
|
212
|
-
else {
|
213
|
-
doStuff = function () {
|
214
|
-
flag = 0;
|
215
|
-
try {
|
216
|
-
ap = aplayers[0];
|
217
|
-
ap.list;
|
218
|
-
flag = 1;
|
219
|
-
} catch {
|
220
|
-
setTimeout(doStuff, 50);
|
221
|
-
return;
|
222
|
-
}
|
223
|
-
if (flag) {
|
224
|
-
$(".aplayer-fixed").hide()
|
225
|
-
}
|
226
|
-
}
|
227
|
-
doStuff();
|
228
169
|
|
229
|
-
|
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
|
+
$("#"+localStorage.getItem("themeColor")).attr("checked", true);
|
180
|
+
if(localStorage.getItem("blur")=="false"){
|
181
|
+
document.getElementById("blur").checked=true;
|
182
|
+
}
|
183
|
+
if(localStorage.getItem("yjjs")=="true"){
|
184
|
+
document.getElementById("yjjs").checked=true;
|
185
|
+
}
|
186
|
+
if(localStorage.getItem("fpson")=="1"){
|
187
|
+
document.getElementById("fpson").checked=true;
|
188
|
+
}
|
230
189
|
|
231
|
-
document.getElementsByClassName("reSettings")[0].onclick = function () {
|
232
|
-
localStorage.clear()
|
233
|
-
window.location.reload()
|
234
|
-
}
|
235
190
|
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
191
|
+
if(localStorage.getItem("sakurahide")=="false"){
|
192
|
+
document.getElementById("hideSakura").checked=true;
|
193
|
+
isSakura=1;
|
194
|
+
}
|
195
|
+
else if(localStorage.getItem("sakurahide")==null){
|
196
|
+
localStorage.setItem("sakurahide","false");
|
197
|
+
document.getElementById("hideSakura").checked=true;
|
198
|
+
isSakura=1;
|
199
|
+
}
|
200
|
+
else{
|
201
|
+
setTimeout(
|
202
|
+
stopp,1000);
|
203
|
+
isSakura=0;
|
204
|
+
}
|
205
|
+
if(localStorage.getItem("aplayerhide")=="false"){
|
206
|
+
document.getElementById("hideAplayer").checked=true;
|
207
|
+
}
|
208
|
+
else if(localStorage.getItem("aplayerhide")==null){
|
209
|
+
localStorage.setItem("aplayerhide","false");
|
210
|
+
document.getElementById("hideAplayer").checked=true;
|
211
|
+
}
|
212
|
+
else{
|
213
|
+
doStuff=function() {
|
214
|
+
flag=0;
|
215
|
+
try{
|
216
|
+
ap=aplayers[0];
|
217
|
+
ap.list;
|
218
|
+
flag=1;
|
219
|
+
}catch{
|
220
|
+
setTimeout(doStuff, 50);
|
221
|
+
return;
|
257
222
|
}
|
258
|
-
|
259
|
-
|
223
|
+
if(flag){
|
224
|
+
$(".aplayer-fixed").hide()
|
260
225
|
}
|
261
226
|
}
|
262
|
-
|
263
|
-
|
227
|
+
doStuff();
|
228
|
+
|
229
|
+
}
|
264
230
|
|
265
|
-
|
231
|
+
document.getElementsByClassName("reSettings")[0].onclick=function(){
|
232
|
+
localStorage.clear()
|
233
|
+
window.location.reload()
|
234
|
+
}
|
266
235
|
|
267
|
-
|
268
|
-
|
269
|
-
|
236
|
+
toggleWinbox=function(){
|
237
|
+
$("#settingWindow").fadeToggle();
|
238
|
+
if(document.getElementById("settingWindow").style.display!="none"){
|
239
|
+
document.getElementById("settingWindow").style.display="flex";
|
240
|
+
}
|
241
|
+
}
|
242
|
+
fullScreen=function() {
|
243
|
+
if (document.fullscreenElement) document.exitFullscreen()
|
244
|
+
else document.documentElement.requestFullscreen();
|
245
|
+
}
|
246
|
+
toggleAside=function(){
|
247
|
+
const $htmlDom = document.documentElement.classList
|
248
|
+
$htmlDom.contains('hide-aside')
|
249
|
+
? saveToLocal.set('aside-status', 'show', 2)
|
250
|
+
: saveToLocal.set('aside-status', 'hide', 2)
|
251
|
+
$htmlDom.toggle('hide-aside')
|
252
|
+
}
|
253
|
+
toggleAplayer=function(){
|
254
|
+
$(".aplayer-fixed").toggle()
|
255
|
+
if(localStorage.getItem("aplayerhide")=="true"){
|
256
|
+
localStorage.setItem("aplayerhide",false);
|
257
|
+
}
|
258
|
+
else{
|
259
|
+
localStorage.setItem("aplayerhide",true);
|
260
|
+
}
|
261
|
+
}
|
262
|
+
// position = $(window).scrollTop();
|
263
|
+
// $(window).scroll(function () {
|
270
264
|
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
265
|
+
// scroll = $(window).scrollTop();
|
266
|
+
|
267
|
+
// if (scroll > position) {
|
268
|
+
// document.getElementsByTagName("header")[0].style.transform="translateY(58px)";
|
269
|
+
// } else {
|
270
|
+
|
271
|
+
|
272
|
+
// document.getElementsByTagName("header")[0].style.transform="";
|
273
|
+
|
274
|
+
// }
|
275
|
+
|
276
|
+
// position = scroll;
|
277
|
+
// });
|
278
|
+
toggleSakuras=function(){
|
279
|
+
isSakura=!isSakura;
|
280
|
+
stopp(isSakura);
|
281
|
+
if(localStorage.getItem("sakurahide")=="true"){
|
282
|
+
localStorage.setItem("sakurahide",false);
|
283
|
+
}
|
284
|
+
else{
|
285
|
+
localStorage.setItem("sakurahide",true);
|
286
|
+
}
|
287
|
+
}
|
288
|
+
switchAside=function(){
|
289
|
+
if(left){
|
290
|
+
document.getElementById("aside-content").classList.add("right");
|
291
|
+
document.querySelector(".layout > div:first-child").classList.add("left");
|
292
|
+
localStorage.setItem("leftAside","false");
|
293
|
+
}
|
294
|
+
else{
|
295
|
+
document.getElementById("aside-content").className="aside-content";
|
296
|
+
document.querySelector(".layout > div:first-child").className="";
|
297
|
+
try{
|
298
|
+
document.querySelector("#recent-posts").className="recent-posts";
|
299
|
+
}catch(err){}localStorage.setItem("leftAside","true");}
|
300
|
+
left=!left;
|
301
|
+
}
|
302
|
+
left=1;
|
303
|
+
if(localStorage.getItem("leftAside")=="true"||localStorage.getItem("leftAside")==null){
|
304
|
+
|
305
|
+
}else{
|
306
|
+
switchAside();
|
307
|
+
}
|
308
|
+
if(localStorage.getItem("autoTheme")=="true"){
|
309
|
+
document.getElementById("autoTheme").checked=true;
|
310
|
+
$("#con-mode,.rightMenu-item:has(.fa-moon)").hide();
|
311
|
+
var time=new Date();
|
312
|
+
if(time.getHours()<=7||time.getHours()>=19){
|
314
313
|
activateDarkMode()
|
315
314
|
localStorage.removeItem("theme");
|
316
315
|
}
|
317
|
-
else
|
316
|
+
else{
|
318
317
|
activateLightMode()
|
319
318
|
localStorage.removeItem("theme");
|
320
319
|
}
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
}
|
320
|
+
}
|
321
|
+
if(location.href.indexOf('posts')!=-1){
|
322
|
+
var xhr = new XMLHttpRequest();
|
323
|
+
var url = document.querySelector('#page-header').style.backgroundImage.split('url("')[1].split('")')[0];
|
324
|
+
xhr.open("GET","https://apis.yisous.xyz/api/imageColor?imgurl="+url, true);
|
325
|
+
xhr.send();
|
326
|
+
xhr.onreadystatechange = function () {
|
327
|
+
if (xhr.readyState===4) {
|
328
|
+
if(xhr.status===200) {
|
329
|
+
document.getElementById("themeColor").innerText=`:root{--lyx-theme:${xhr.responseText}!important}`;
|
332
330
|
}
|
333
331
|
}
|
334
332
|
}
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
333
|
+
}
|
334
|
+
toggleAutoTheme=()=>{
|
335
|
+
if(localStorage.getItem("autoTheme")=="true"){
|
336
|
+
localStorage.setItem("autoTheme","false");
|
337
|
+
$("#con-mode,.rightMenu-item:has(.fa-moon)").show();
|
338
|
+
}
|
339
|
+
else{
|
340
|
+
localStorage.setItem("autoTheme","true");
|
341
|
+
var time=new Date();
|
342
|
+
if(time.getHours()<=7||time.getHours()>=19){
|
343
|
+
activateDarkMode()
|
344
|
+
localStorage.removeItem("theme");
|
339
345
|
}
|
340
|
-
else
|
341
|
-
|
342
|
-
|
343
|
-
if (time.getHours() <= 7 || time.getHours() >= 19) {
|
344
|
-
activateDarkMode()
|
345
|
-
localStorage.removeItem("theme");
|
346
|
-
}
|
347
|
-
else {
|
348
|
-
activateLightMode()
|
349
|
-
localStorage.removeItem("theme");
|
350
|
-
}
|
351
|
-
$("#con-mode,.rightMenu-item:has(.fa-moon)").hide();
|
346
|
+
else{
|
347
|
+
activateLightMode()
|
348
|
+
localStorage.removeItem("theme");
|
352
349
|
}
|
350
|
+
$("#con-mode,.rightMenu-item:has(.fa-moon)").hide();
|
353
351
|
}
|
352
|
+
}
|
354
353
|
}
|