sinzmise-cetastories 1.6.0-1716714525505
Sign up to get free protection for your applications and to get access to all the features.
- package/404/index.html +1 -0
- package/404.html +1 -0
- package/BingSiteAuth.xml +4 -0
- package/about/index.html +1 -0
- package/album/index.html +1 -0
- package/archives/2021/12/index.html +1 -0
- package/archives/2021/index.html +1 -0
- package/archives/2022/12/index.html +1 -0
- package/archives/2022/index.html +1 -0
- package/archives/2023/01/index.html +1 -0
- package/archives/2023/02/index.html +1 -0
- package/archives/2023/03/index.html +1 -0
- package/archives/2023/04/index.html +1 -0
- package/archives/2023/07/index.html +1 -0
- package/archives/2023/08/index.html +1 -0
- package/archives/2023/09/index.html +1 -0
- package/archives/2023/10/index.html +1 -0
- package/archives/2023/11/index.html +1 -0
- package/archives/2023/12/index.html +1 -0
- package/archives/2023/index.html +1 -0
- package/archives/2023/page/2/index.html +1 -0
- package/archives/2023/page/3/index.html +1 -0
- package/archives/2024/01/index.html +1 -0
- package/archives/2024/02/index.html +1 -0
- package/archives/2024/03/index.html +1 -0
- package/archives/2024/04/index.html +1 -0
- package/archives/2024/05/index.html +1 -0
- package/archives/2024/index.html +1 -0
- package/archives/2024/page/2/index.html +1 -0
- package/archives/index.html +1 -0
- package/archives/page/2/index.html +1 -0
- package/archives/page/3/index.html +1 -0
- package/archives/page/4/index.html +1 -0
- package/article.json +1 -0
- package/assets/algolia/algoliasearch.js +10 -0
- package/assets/algolia/algoliasearch.min.js +4 -0
- package/assets/algolia/algoliasearchLite.js +10 -0
- package/assets/algolia/algoliasearchLite.min.js +3 -0
- package/atom.xml +532 -0
- package/baidu_verify_codeva-NA6uDlCuZg.html +1 -0
- package/baidusitemap.xml +139 -0
- package/bangumis/index.html +1 -0
- package/bbs/index.html +1 -0
- package/cacheList.json +1 -0
- package/categories/index.html +1 -0
- package/categories//344/270/252/344/272/272/345/260/217/350/256/260/index.html +1 -0
- package/categories//344/270/252/344/272/272/345/260/217/350/256/260/page/2/index.html +1 -0
- package/categories//346/255/214/346/233/262/346/224/266/351/233/206/index.html +1 -0
- package/categories//346/270/270/346/210/217/347/233/270/345/205/263/index.html +1 -0
- package/categories//347/253/231/347/202/271/346/212/230/350/205/276/index.html +1 -0
- package/categories//347/253/231/347/202/271/346/212/230/350/205/276/page/2/index.html +1 -0
- package/categories//351/241/271/347/233/256/346/212/230/350/205/276/index.html +1 -0
- package/charts/index.html +1 -0
- package/comments/index.html +1 -0
- package/css/404.css +1 -0
- package/css/anzhiyu-var.css +1 -0
- package/css/bywind-var.css +1 -0
- package/css/categoryBar.css +1 -0
- package/css/console.css +1 -0
- package/css/custom.css +1 -0
- package/css/essay_page.css +1 -0
- package/css/footer.css +1 -0
- package/css/heo-var.css +1 -0
- package/css/icat-var.css +1 -0
- package/css/iconfont.css +1 -0
- package/css/iconfont.ttf +0 -0
- package/css/iconfont.woff +0 -0
- package/css/iconfont.woff2 +0 -0
- package/css/index.css +1 -0
- package/css/orlike.css +1 -0
- package/css/rightmenu.css +1 -0
- package/css/var.css +0 -0
- package/essay/index.html +1 -0
- package/fcircle/index.html +1 -0
- package/google8073542809160a67.html +1 -0
- package/images/favicon.ico +0 -0
- package/images/siteicon/16.png +0 -0
- package/images/siteicon/32.png +0 -0
- package/images/siteicon/apple-icon-180.png +0 -0
- package/images/siteicon/manifest-icon-192.maskable.png +0 -0
- package/images/siteicon/manifest-icon-512.maskable.png +0 -0
- package/img/404.jpg +0 -0
- package/img/512.png +0 -0
- package/img/avatar.png +0 -0
- package/img/bili.jpg +0 -0
- package/img/dark.jpg +0 -0
- package/img/favicon.png +0 -0
- package/img/footer-social-link.svg +1 -0
- package/img/friend_404.gif +0 -0
- package/img/icon-dark.png +0 -0
- package/img/icon-light.png +0 -0
- package/img/icons/api.svg +1 -0
- package/img/icons/diary.svg +1 -0
- package/img/icons/homepage.svg +1 -0
- package/img/icons/navi.svg +1 -0
- package/img/icons/pan.svg +1 -0
- package/img/icons/rtalk.svg +1 -0
- package/img/light.jpg +0 -0
- package/img/link.png +0 -0
- package/img/load-dark.png +0 -0
- package/img/load-light.png +0 -0
- package/img/longnian.webp +0 -0
- package/img/longnian1.webp +0 -0
- package/img/longnian2.webp +0 -0
- package/img/longnian3.webp +0 -0
- package/img/siteicon/android-chrome-144x144.png +0 -0
- package/img/siteicon/android-chrome-192x192.png +0 -0
- package/img/siteicon/android-chrome-256x256.png +0 -0
- package/img/siteicon/android-chrome-36x36.png +0 -0
- package/img/siteicon/android-chrome-384x384.png +0 -0
- package/img/siteicon/android-chrome-48x48.png +0 -0
- package/img/siteicon/android-chrome-512x512.png +0 -0
- package/img/siteicon/android-chrome-72x72.png +0 -0
- package/img/siteicon/android-chrome-96x96.png +0 -0
- package/img/siteicon/apple-splash-1125-2436.jpg +0 -0
- package/img/siteicon/apple-splash-1136-640.jpg +0 -0
- package/img/siteicon/apple-splash-1170-2532.jpg +0 -0
- package/img/siteicon/apple-splash-1179-2556.jpg +0 -0
- package/img/siteicon/apple-splash-1242-2208.jpg +0 -0
- package/img/siteicon/apple-splash-1242-2688.jpg +0 -0
- package/img/siteicon/apple-splash-1284-2778.jpg +0 -0
- package/img/siteicon/apple-splash-1290-2796.jpg +0 -0
- package/img/siteicon/apple-splash-1334-750.jpg +0 -0
- package/img/siteicon/apple-splash-1536-2048.jpg +0 -0
- package/img/siteicon/apple-splash-1620-2160.jpg +0 -0
- package/img/siteicon/apple-splash-1668-2224.jpg +0 -0
- package/img/siteicon/apple-splash-1668-2388.jpg +0 -0
- package/img/siteicon/apple-splash-1792-828.jpg +0 -0
- package/img/siteicon/apple-splash-2048-1536.jpg +0 -0
- package/img/siteicon/apple-splash-2048-2732.jpg +0 -0
- package/img/siteicon/apple-splash-2160-1620.jpg +0 -0
- package/img/siteicon/apple-splash-2208-1242.jpg +0 -0
- package/img/siteicon/apple-splash-2224-1668.jpg +0 -0
- package/img/siteicon/apple-splash-2388-1668.jpg +0 -0
- package/img/siteicon/apple-splash-2436-1125.jpg +0 -0
- package/img/siteicon/apple-splash-2532-1170.jpg +0 -0
- package/img/siteicon/apple-splash-2556-1179.jpg +0 -0
- package/img/siteicon/apple-splash-2688-1242.jpg +0 -0
- package/img/siteicon/apple-splash-2732-2048.jpg +0 -0
- package/img/siteicon/apple-splash-2778-1284.jpg +0 -0
- package/img/siteicon/apple-splash-2796-1290.jpg +0 -0
- package/img/siteicon/apple-splash-640-1136.jpg +0 -0
- package/img/siteicon/apple-splash-750-1334.jpg +0 -0
- package/img/siteicon/apple-splash-828-1792.jpg +0 -0
- package/img/siteicon/apple-touch-icon.png +0 -0
- package/img/siteicon/favicon-16x16.png +0 -0
- package/img/siteicon/favicon-32x32.png +0 -0
- package/img/siteicon/favicon.ico +0 -0
- package/img/siteicon/mstile-150x150.png +0 -0
- package/img/siteicon/safari-pinned-tab.svg +247 -0
- package/img/theta.svg +1 -0
- package/index.html +1 -0
- package/js/about.js +1 -0
- package/js/autoload.js +1 -0
- package/js/categoryBar.js +1 -0
- package/js/comments.js +1 -0
- package/js/console.js +452 -0
- package/js/custom.js +69 -0
- package/js/day.js +1 -0
- package/js/fish.js +1 -0
- package/js/fps.js +1 -0
- package/js/hometop.js +1 -0
- package/js/kslink.js +1 -0
- package/js/lunar.js +1 -0
- package/js/main.js +1 -0
- package/js/nav.js +1 -0
- package/js/newyear.js +1 -0
- package/js/orlike.js +1 -0
- package/js/owobig.js +1 -0
- package/js/random-friends-post.js +1 -0
- package/js/randompost.js +1 -0
- package/js/rightmenu.js +1 -0
- package/js/sakura.js +1 -0
- package/js/search/algolia.js +1 -0
- package/js/search/local-search.js +1 -0
- package/js/tw_cn.js +1 -0
- package/js/txmap.js +1 -0
- package/js/utils.js +1 -0
- package/js/waifu-tips.json +1 -0
- package/js/waterfall/waterfall.js +1 -0
- package/js/welcome.js +1 -0
- package/lib/tag_plugins.css +1 -0
- package/link/index.html +1 -0
- package/manifest.json +1 -0
- package/music/index.html +1 -0
- package/package.json +1 -0
- package/page/2/index.html +1 -0
- package/page/3/index.html +1 -0
- package/page/4/index.html +1 -0
- package/posts/10045/index.html +1 -0
- package/posts/10996/index.html +1 -0
- package/posts/12779/index.html +1 -0
- package/posts/13624/index.html +1 -0
- package/posts/15748/index.html +1 -0
- package/posts/15842/index.html +1 -0
- package/posts/16107/index.html +1 -0
- package/posts/18063/index.html +1 -0
- package/posts/20412/index.html +1 -0
- package/posts/21375/index.html +1 -0
- package/posts/22945/index.html +1 -0
- package/posts/23021/index.html +1 -0
- package/posts/27531/index.html +1 -0
- package/posts/27762/index.html +1 -0
- package/posts/28536/index.html +1 -0
- package/posts/28733/index.html +1 -0
- package/posts/29196/index.html +1 -0
- package/posts/38917/index.html +1 -0
- package/posts/38964/index.html +1 -0
- package/posts/42487/index.html +1 -0
- package/posts/42580/index.html +1 -0
- package/posts/45875/index.html +1 -0
- package/posts/48762/index.html +1 -0
- package/posts/50710/index.html +1 -0
- package/posts/52677/index.html +1 -0
- package/posts/53662/index.html +1 -0
- package/posts/54386/index.html +1 -0
- package/posts/54481/index.html +1 -0
- package/posts/54787/index.html +1 -0
- package/posts/56467/index.html +1 -0
- package/posts/57692/index.html +1 -0
- package/posts/58203/index.html +1 -0
- package/posts/61417/index.html +1 -0
- package/posts/646/index.html +1 -0
- package/robots.txt +11 -0
- package/seas/index.html +1 -0
- package/sitemap.xml +627 -0
- package/sw-dom.js +1 -0
- package/sw.js +1 -0
- package/tags/Flash/347/233/270/345/205/263/index.html +1 -0
- package/tags/Steam/346/270/270/346/210/217/index.html +1 -0
- package/tags/Windows/350/275/257/344/273/266/index.html +1 -0
- package/tags/index.html +1 -0
- package/tags//344/270/252/344/272/272/345/260/217/350/256/260/index.html +1 -0
- package/tags//344/270/252/344/272/272/345/260/217/350/256/260/page/2/index.html +1 -0
- package/tags//345/205/266/345/256/203/346/270/270/346/210/217/index.html +1 -0
- 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 -0
- package/tags//346/255/214/346/233/262/346/224/266/351/233/206/index.html +1 -0
- package/tags//346/270/270/346/210/217/347/233/270/345/205/263/index.html +1 -0
- package/tags//347/253/231/347/202/271/345/272/225/351/203/250/351/255/224/346/224/271/index.html +1 -0
- package/tags//347/253/231/347/202/271/346/212/230/350/205/276/index.html +1 -0
- package/tags//347/253/231/347/202/271/346/212/230/350/205/276/page/2/index.html +1 -0
- package/tags//350/207/252/345/273/272/351/203/250/347/275/262/index.html +1 -0
- package/tags//351/241/265/351/235/242/351/255/224/346/224/271/index.html +1 -0
- package/tags//351/241/271/347/233/256/346/212/230/350/205/276/index.html +1 -0
- package/test.json +1 -0
- package/update/index.html +1 -0
- package/update.json +1 -0
- package/weichuncai/chuncai.json +1 -0
- package/weichuncai/css/style.css +1 -0
- package/weichuncai/imgs/chat_bottom.gif +0 -0
- package/weichuncai/imgs/chat_top.gif +0 -0
- package/weichuncai/imgs/loading.gif +0 -0
- package/weichuncai/imgs/menu.jpg +0 -0
- package/weichuncai/imgs/ok.jpg +0 -0
- package/weichuncai/js/common.js +1 -0
- package/weichuncai/js/jquery.js +16 -0
- package/weichuncai/skin/default/face1.gif +0 -0
- package/weichuncai/skin/default/face2.gif +0 -0
- package/weichuncai/skin/default/face3.gif +0 -0
- package/weichuncai/skin/ikamusume/ikamusume001.gif +0 -0
- package/weichuncai/skin/ikamusume/ikamusume002.gif +0 -0
- package/weichuncai/skin/ikamusume/ikamusume003.gif +0 -0
- package/weichuncai/skin/rakutori/face1.gif +0 -0
- package/weichuncai/skin/rakutori/face2.gif +0 -0
- package/weichuncai/skin/rakutori/face3.gif +0 -0
- package/weichuncai/wcc-config.js +1 -0
package/js/console.js
ADDED
@@ -0,0 +1,452 @@
|
|
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
|
+
};
|
package/js/custom.js
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
function whenDOMReady() {
|
2
|
+
if (location.pathname == '/essay/') document.addEventListener('DOMContentLoaded', function () {setTimeout(() => { changeTime(), btf.loadLightbox(document.querySelectorAll('#icat-bber img')), window.lazyLoadInstance && window.lazyLoadInstance.update(), reflashWaterFall();}, 300)})
|
3
|
+
}
|
4
|
+
whenDOMReady()
|
5
|
+
document.addEventListener("pjax:complete", whenDOMReady)
|
6
|
+
|
7
|
+
// 适配pjax
|
8
|
+
|
9
|
+
window.onresize = () => {
|
10
|
+
waterfall('#waterfall');
|
11
|
+
};
|
12
|
+
|
13
|
+
// 自适应
|
14
|
+
|
15
|
+
function timeDiff(timeObj, today) => {
|
16
|
+
const timeObjUTC = Date.UTC(timeObj.getFullYear(), timeObj.getMonth(), timeObj.getDate());
|
17
|
+
const todayUTC = Date.UTC(today.getFullYear(), today.getMonth(), today.getDate());
|
18
|
+
|
19
|
+
const timeDiff = todayUTC - timeObjUTC;
|
20
|
+
return Math.floor(timeDiff / (1000 * 3600 * 24));
|
21
|
+
}
|
22
|
+
function changeTime() {
|
23
|
+
const timeElements = Array.from(document.getElementsByTagName("time"));
|
24
|
+
const currentDate = new Date();
|
25
|
+
|
26
|
+
timeElements.forEach(timeElement => {
|
27
|
+
const datetime = timeElement.getAttribute("datetime");
|
28
|
+
const timeObj = new Date(datetime);
|
29
|
+
const daysDiff = timeDiff(timeObj, currentDate);
|
30
|
+
|
31
|
+
let timeString;
|
32
|
+
if (daysDiff === 0) {
|
33
|
+
timeString = `最近`;
|
34
|
+
} else if (daysDiff === 1) {
|
35
|
+
timeString = `昨天`;
|
36
|
+
} else if (daysDiff === 2) {
|
37
|
+
timeString = `前天`;
|
38
|
+
} else if (daysDiff <= 7) {
|
39
|
+
timeString = `${daysDiff}天前`;
|
40
|
+
} else {
|
41
|
+
if (timeObj.getFullYear() !== currentDate.getFullYear()) {
|
42
|
+
timeString = `${timeObj.getFullYear()}/${timeObj.getMonth() + 1}/${timeObj.getDate()}`;
|
43
|
+
} else {
|
44
|
+
timeString = `${timeObj.getMonth() + 1}/${timeObj.getDate()}`;
|
45
|
+
}
|
46
|
+
}
|
47
|
+
timeElement.textContent = timeString;
|
48
|
+
});
|
49
|
+
}
|
50
|
+
function reflashWaterFall() {
|
51
|
+
document.querySelector("#waterfall") &&
|
52
|
+
setTimeout(function() {
|
53
|
+
waterfall("#waterfall");
|
54
|
+
document.getElementById("waterfall")
|
55
|
+
.classList.add("show");
|
56
|
+
}, 500);
|
57
|
+
} // 加载显示 - 即刻短文
|
58
|
+
function commentText(txt) {
|
59
|
+
const inputs = ["#wl-edit", ".el-textarea__inner"];
|
60
|
+
for (let i = 0; i < inputs.length; i++) {
|
61
|
+
let el = document.querySelector(inputs[i]);
|
62
|
+
if (el != null) {
|
63
|
+
el.dispatchEvent(new Event('input', { bubble: true, cancelable: true }));
|
64
|
+
el.value = '> ' + txt.replace(/\n/g, '\n> ') + '\n\n';
|
65
|
+
el.focus();
|
66
|
+
el.setSelectionRange(-1, -1);
|
67
|
+
}
|
68
|
+
}
|
69
|
+
} // 引用评论跳转 - 即刻短文
|
package/js/day.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
var d=new Date;function randomNum(o,e){switch(arguments.length){case 1:return parseInt(Math.random()*o+1,10);case 2:return parseInt(Math.random()*(e-o+1)+o,10);default:return 0}}m=d.getMonth()+1,dd=d.getDate(),y=d.getFullYear(),9==m&&18==dd&&(console.log("勿忘国耻,振兴中华!\n\n今天是1931年9月18日九一八事变"+(y-1931).toString()+"周年纪念日!\n================================================================="),document.getElementsByTagName("html")[0].setAttribute("style","filter: grayscale(100%);"),"1"!=sessionStorage.getItem("isPopupWindow")&&(Swal.fire("今天是1931年9月18日九一八事变"+(y-1931).toString()+"周年纪念日。\n勿忘国耻,振兴中华!"),sessionStorage.setItem("isPopupWindow","1"))),7==m&&7==dd&&(console.log("勿忘国耻,振兴中华!\n\n今天是1937年7月7日卢沟桥事变"+(y-1937).toString()+"周年纪念日!\n================================================================="),document.getElementsByTagName("html")[0].setAttribute("style","filter: grayscale(100%);"),"1"!=sessionStorage.getItem("isPopupWindow")&&(Swal.fire("今天是1937年7月7日卢沟桥事变"+(y-1937).toString()+"周年纪念日。\n勿忘国耻,振兴中华!"),sessionStorage.setItem("isPopupWindow","1"))),12==m&&13==dd&&(console.log("勿忘国耻,振兴中华!\n\n今天是1937年12月13日南京大屠杀"+(y-1931).toString()+"周年纪念日!为遇难的无辜同胞们缅怀!\n================================================================="),document.getElementsByTagName("html")[0].setAttribute("style","filter: grayscale(100%);"),"1"!=sessionStorage.getItem("isPopupWindow")&&(Swal.fire("今天是1937年12月13日南京大屠杀"+(y-1937).toString()+"周年纪念日,希望你能停下来缅怀遇难的无辜同胞们。\n勿忘国耻,振兴中华!"),sessionStorage.setItem("isPopupWindow","1"))),8==m&&14==dd&&(console.log("勿忘国耻,振兴中华!\n\n今天是8月14日世界慰安妇纪念日!\n================================================================="),document.getElementsByTagName("html")[0].setAttribute("style","filter: grayscale(100%);"),"1"!=sessionStorage.getItem("isPopupWindow")&&(Swal.fire("今天是8月14日世界慰安妇纪念日,希望你能停下来了解一下来为历史作证,为曾经的无辜妇女发声。\n勿忘国耻,振兴中华!"),sessionStorage.setItem("isPopupWindow","1"))),10==m&&dd<=5&&(console.log("祖国"+(y-1949).toString()+"岁生日快乐!"),"1"!=sessionStorage.getItem("isPopupWindow")&&(Swal.fire("祖国"+(y-1949).toString()+"岁生日快乐!"),sessionStorage.setItem("isPopupWindow","1"))),8==m&&15==dd&&(console.log("鬼子投降"+(y-1945).toString()+"年了!"),"1"!=sessionStorage.getItem("isPopupWindow")&&(Swal.fire("鬼子投降"+(y-1945).toString()+"年了!"),sessionStorage.setItem("isPopupWindow","1"))),1==m&&1==dd&&(console.log(y.toString()+"年元旦快乐!"),"1"!=sessionStorage.getItem("isPopupWindow")&&(Swal.fire(y.toString()+"年元旦快乐!"),sessionStorage.setItem("isPopupWindow","1"))),3==m&&8==dd&&(console.log("各位女神们,妇女节快乐!"),"1"!=sessionStorage.getItem("isPopupWindow")&&(Swal.fire("各位女神们,妇女节快乐!"),sessionStorage.setItem("isPopupWindow","1"))),l=["震惊!微软让Minecraft Java免费了!","Minecraft竟然违背Mojang的原则发布2.0!","非常抱歉,因为不可控原因,博客将于明天停止运营,再见","好消息,日本没了!","美国垮了,背后原因竟是时刻心心念念想着祖国的川普!","微软垮了!"],console.log(m,dd),4==m&&1==dd&&(console.log(l[randomNum(0,l.length-1)]),"1"!=sessionStorage.getItem("isPopupWindow")&&(Swal.fire(l[randomNum(0,l.length-1)]),sessionStorage.setItem("isPopupWindow","1"))),5==m&&1==dd&&(console.log("劳动节快乐!为助力各行各业发展辛勤工作的人们致敬!"),"1"!=sessionStorage.getItem("isPopupWindow")&&(Swal.fire("劳动节快乐!为助力各行各业发展辛勤工作的人们致敬!"),sessionStorage.setItem("isPopupWindow","1"))),5==m&&1==dd&&(console.log("劳动节快乐!为助力各行各业发展辛勤工作的人们致敬!"),"1"!=sessionStorage.getItem("isPopupWindow")&&(Swal.fire("劳动节快乐!为助力各行各业发展辛勤工作的人们致敬!"),sessionStorage.setItem("isPopupWindow","1"))),5==m&&4==dd&&(console.log("为有思想政治觉悟,拥护中国共产党,追求无产阶级、共产主义、马克思主义的青年们致敬!"),"1"!=sessionStorage.getItem("isPopupWindow")&&(Swal.fire("为有思想政治觉悟,拥护中国共产党,追求无产阶级、共产主义、马克思主义的青年们致敬"),sessionStorage.setItem("isPopupWindow","1"))),6==m&&1==dd&&(console.log("各位小朋友们,儿童节快乐!"),"1"!=sessionStorage.getItem("isPopupWindow")&&(Swal.fire("各位小朋友们,儿童节快乐!"),sessionStorage.setItem("isPopupWindow","1"))),7==m&&1==dd&&(console.log("中国共产党"+(y-1921).toString()+"岁生日快乐"),"1"!=sessionStorage.getItem("isPopupWindow")&&(Swal.fire("中国共产党"+(y-1921).toString()+"岁生日快乐"),sessionStorage.setItem("isPopupWindow","1"))),(4==m&&4==dd||4==m&&5==dd)&&(console.log("清明安康"),"1"!=sessionStorage.getItem("isPopupWindow")&&(Swal.fire("清明安康"),sessionStorage.setItem("isPopupWindow","1")));var lunar=calendarFormatter.solar2lunar();("正月"==lunar.IMonthCn&&"初六"==lunar.IDayCn||"正月"==lunar.IMonthCn&&"初五"==lunar.IDayCn||"正月"==lunar.IMonthCn&&"初四"==lunar.IDayCn||"正月"==lunar.IMonthCn&&"初三"==lunar.IDayCn||"正月"==lunar.IMonthCn&&"初二"==lunar.IDayCn||"正月"==lunar.IMonthCn&&"初一"==lunar.IDayCn||"腊月"==lunar.IMonthCn&&"三十"==lunar.IDayCn||"腊月"==lunar.IMonthCn&&"廿九"==lunar.IDayCn)&&(console.log(y.toString()+"年新年快乐!"),"1"!=sessionStorage.getItem("isPopupWindow")&&(Swal.fire(y.toString()+"年新年快乐!"),sessionStorage.setItem("isPopupWindow","1"))),"正月"==lunar.IMonthCn&&"十五"==lunar.IDayCn&&(console.log("元宵节快乐!"),"1"!=sessionStorage.getItem("isPopupWindow")&&(Swal.fire("元宵节快乐!"),sessionStorage.setItem("isPopupWindow","1"))),"正月"==lunar.IMonthCn&&"十五"==lunar.IDayCn&&(console.log("元宵节快乐!"),"1"!=sessionStorage.getItem("isPopupWindow")&&(Swal.fire("元宵节快乐!"),sessionStorage.setItem("isPopupWindow","1"))),"五月"==lunar.IMonthCn&&"初五"==lunar.IDayCn&&(console.log("端午节快乐!"),"1"!=sessionStorage.getItem("isPopupWindow")&&(Swal.fire("端午节快乐!"),sessionStorage.setItem("isPopupWindow","1"))),"七月"==lunar.IMonthCn&&"初七"==lunar.IDayCn&&(console.log("七夕节快乐!"),"1"!=sessionStorage.getItem("isPopupWindow")&&(Swal.fire("七夕节快乐!"),sessionStorage.setItem("isPopupWindow","1"))),"八月"==lunar.IMonthCn&&"十五"==lunar.IDayCn&&(console.log("中秋节快乐!"),"1"!=sessionStorage.getItem("isPopupWindow")&&(Swal.fire("中秋节快乐!"),sessionStorage.setItem("isPopupWindow","1"))),"九月"==lunar.IMonthCn&&"初九"==lunar.IDayCn&&(console.log("重阳节快乐!"),"1"!=sessionStorage.getItem("isPopupWindow")&&(Swal.fire("重阳节快乐!"),sessionStorage.setItem("isPopupWindow","1")));
|
package/js/fish.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
var RENDERER={POINT_INTERVAL:5,FISH_COUNT:3,MAX_INTERVAL_COUNT:50,INIT_HEIGHT_RATE:.5,THRESHOLD:50,init:function(){this.setParameters(),this.reconstructMethods(),this.setup(),this.bindEvent(),this.render()},setParameters:function(){this.$window=$(window),this.$container=$("#jsi-flying-fish-container"),this.$canvas=$("<canvas />"),this.context=this.$canvas.appendTo(this.$container).get(0).getContext("2d"),this.points=[],this.fishes=[],this.watchIds=[]},createSurfacePoints:function(){var t=Math.round(this.width/this.POINT_INTERVAL);this.pointInterval=this.width/(t-1),this.points.push(new SURFACE_POINT(this,0));for(var i=1;i<t;i++){var e=new SURFACE_POINT(this,i*this.pointInterval),h=this.points[i-1];e.setPreviousPoint(h),h.setNextPoint(e),this.points.push(e)}},reconstructMethods:function(){this.watchWindowSize=this.watchWindowSize.bind(this),this.jdugeToStopResize=this.jdugeToStopResize.bind(this),this.startEpicenter=this.startEpicenter.bind(this),this.moveEpicenter=this.moveEpicenter.bind(this),this.reverseVertical=this.reverseVertical.bind(this),this.render=this.render.bind(this)},setup:function(){this.points.length=0,this.fishes.length=0,this.watchIds.length=0,this.intervalCount=this.MAX_INTERVAL_COUNT,this.width=this.$container.width(),this.height=this.$container.height(),this.fishCount=this.FISH_COUNT*this.width/500*this.height/500,this.$canvas.attr({width:this.width,height:this.height}),this.reverse=!1,this.fishes.push(new FISH(this)),this.createSurfacePoints()},watchWindowSize:function(){this.clearTimer(),this.tmpWidth=this.$window.width(),this.tmpHeight=this.$window.height(),this.watchIds.push(setTimeout(this.jdugeToStopResize,this.WATCH_INTERVAL))},clearTimer:function(){for(;this.watchIds.length>0;)clearTimeout(this.watchIds.pop())},jdugeToStopResize:function(){var t=this.$window.width(),i=this.$window.height(),e=t==this.tmpWidth&&i==this.tmpHeight;this.tmpWidth=t,this.tmpHeight=i,e&&this.setup()},bindEvent:function(){this.$window.on("resize",this.watchWindowSize),this.$container.on("mouseenter",this.startEpicenter),this.$container.on("mousemove",this.moveEpicenter),this.$container.on("click",this.reverseVertical)},getAxis:function(t){var i=this.$container.offset();return{x:t.clientX-i.left+this.$window.scrollLeft(),y:t.clientY-i.top+this.$window.scrollTop()}},startEpicenter:function(t){this.axis=this.getAxis(t)},moveEpicenter:function(t){var i=this.getAxis(t);this.axis||(this.axis=i),this.generateEpicenter(i.x,i.y,i.y-this.axis.y),this.axis=i},generateEpicenter:function(t,i,e){if(!(i<this.height/2-this.THRESHOLD||i>this.height/2+this.THRESHOLD)){var h=Math.round(t/this.pointInterval);h<0||h>=this.points.length||this.points[h].interfere(i,e)}},reverseVertical:function(){this.reverse=!this.reverse;for(var t=0,i=this.fishes.length;t<i;t++)this.fishes[t].reverseVertical()},controlStatus:function(){for(var t=0,i=this.points.length;t<i;t++)this.points[t].updateSelf();for(t=0,i=this.points.length;t<i;t++)this.points[t].updateNeighbors();this.fishes.length<this.fishCount&&0==--this.intervalCount&&(this.intervalCount=this.MAX_INTERVAL_COUNT,this.fishes.push(new FISH(this)))},render:function(){requestAnimationFrame(this.render),this.controlStatus(),this.context.clearRect(0,0,this.width,this.height),this.context.fillStyle="#177ecd";for(var t=0,i=this.fishes.length;t<i;t++)this.fishes[t].render(this.context);this.context.save(),this.context.globalCompositeOperation="xor",this.context.beginPath(),this.context.moveTo(0,this.reverse?0:this.height);for(t=0,i=this.points.length;t<i;t++)this.points[t].render(this.context);this.context.lineTo(this.width,this.reverse?0:this.height),this.context.closePath(),this.context.fill(),this.context.restore()}},SURFACE_POINT=function(t,i){this.renderer=t,this.x=i,this.init()};SURFACE_POINT.prototype={SPRING_CONSTANT:.03,SPRING_FRICTION:.9,WAVE_SPREAD:.3,ACCELARATION_RATE:.01,init:function(){this.initHeight=this.renderer.height*this.renderer.INIT_HEIGHT_RATE,this.height=this.initHeight,this.fy=0,this.force={previous:0,next:0}},setPreviousPoint:function(t){this.previous=t},setNextPoint:function(t){this.next=t},interfere:function(t,i){this.fy=this.renderer.height*this.ACCELARATION_RATE*(this.renderer.height-this.height-t>=0?-1:1)*Math.abs(i)},updateSelf:function(){this.fy+=this.SPRING_CONSTANT*(this.initHeight-this.height),this.fy*=this.SPRING_FRICTION,this.height+=this.fy},updateNeighbors:function(){this.previous&&(this.force.previous=this.WAVE_SPREAD*(this.height-this.previous.height)),this.next&&(this.force.next=this.WAVE_SPREAD*(this.height-this.next.height))},render:function(t){this.previous&&(this.previous.height+=this.force.previous,this.previous.fy+=this.force.previous),this.next&&(this.next.height+=this.force.next,this.next.fy+=this.force.next),t.lineTo(this.x,this.renderer.height-this.height)}};var FISH=function(t){this.renderer=t,this.init()};FISH.prototype={GRAVITY:.4,init:function(){this.direction=Math.random()<.5,this.x=this.direction?this.renderer.width+this.renderer.THRESHOLD:-this.renderer.THRESHOLD,this.previousY=this.y,this.vx=this.getRandomValue(4,10)*(this.direction?-1:1),this.renderer.reverse?(this.y=this.getRandomValue(1*this.renderer.height/10,4*this.renderer.height/10),this.vy=this.getRandomValue(2,5),this.ay=this.getRandomValue(.05,.2)):(this.y=this.getRandomValue(6*this.renderer.height/10,9*this.renderer.height/10),this.vy=this.getRandomValue(-5,-2),this.ay=this.getRandomValue(-.2,-.05)),this.isOut=!1,this.theta=0,this.phi=0},getRandomValue:function(t,i){return t+(i-t)*Math.random()},reverseVertical:function(){this.isOut=!this.isOut,this.ay*=-1},controlStatus:function(t){this.previousY=this.y,this.x+=this.vx,this.y+=this.vy,this.vy+=this.ay,this.renderer.reverse?this.y>this.renderer.height*this.renderer.INIT_HEIGHT_RATE?(this.vy-=this.GRAVITY,this.isOut=!0):(this.isOut&&(this.ay=this.getRandomValue(.05,.2)),this.isOut=!1):this.y<this.renderer.height*this.renderer.INIT_HEIGHT_RATE?(this.vy+=this.GRAVITY,this.isOut=!0):(this.isOut&&(this.ay=this.getRandomValue(-.2,-.05)),this.isOut=!1),this.isOut||(this.theta+=Math.PI/20,this.theta%=2*Math.PI,this.phi+=Math.PI/30,this.phi%=2*Math.PI),this.renderer.generateEpicenter(this.x+(this.direction?-1:1)*this.renderer.THRESHOLD,this.y,this.y-this.previousY),(this.vx>0&&this.x>this.renderer.width+this.renderer.THRESHOLD||this.vx<0&&this.x<-this.renderer.THRESHOLD)&&this.init()},render:function(t){t.save(),t.translate(this.x,this.y),t.rotate(Math.PI+Math.atan2(this.vy,this.vx)),t.scale(1,this.direction?1:-1),t.beginPath(),t.moveTo(-30,0),t.bezierCurveTo(-20,15,15,10,40,0),t.bezierCurveTo(15,-10,-20,-15,-30,0),t.fill(),t.save(),t.translate(40,0),t.scale(.9+.2*Math.sin(this.theta),1),t.beginPath(),t.moveTo(0,0),t.quadraticCurveTo(5,10,20,8),t.quadraticCurveTo(12,5,10,0),t.quadraticCurveTo(12,-5,20,-8),t.quadraticCurveTo(5,-10,0,0),t.fill(),t.restore(),t.save(),t.translate(-3,0),t.rotate((Math.PI/3+Math.PI/10*Math.sin(this.phi))*(this.renderer.reverse?-1:1)),t.beginPath(),this.renderer.reverse?(t.moveTo(5,0),t.bezierCurveTo(10,10,10,30,0,40),t.bezierCurveTo(-12,25,-8,10,0,0)):(t.moveTo(-5,0),t.bezierCurveTo(-10,-10,-10,-30,0,-40),t.bezierCurveTo(12,-25,8,-10,0,0)),t.closePath(),t.fill(),t.restore(),t.restore(),this.controlStatus(t)}},$((function(){RENDERER.init()}));
|
package/js/fps.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
function fps(){if("1"==window.localStorage.getItem("fpson")){var e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)},n=0,o=Date.now(),t=Date.now(),s=function(){var a=Date.now(),i=a-t,l=Math.round(1e3/i);if(t=a,n++,a>1e3+o){if((l=Math.round(1e3*n/(a-o)))<=6)var p='<span style="color:#bd0000">卡成ppt</span>';else if(l<=10)p='<span style="color:red">电竞级帧率</span>';else if(l<=14)p='<span style="color:yellow">难受</span>';else if(l<24)p='<span style="color:orange">卡</span>';else if(l<=40)p='<span style="color:green">...</span>';else p='<span style="color:#425aef">正常</span>';document.getElementById("fps").innerHTML=`FPS:${l} ${p}`,n=0,o=a}e(s)};s()}else $("#fps").hide()}document.addEventListener("pjax:complete",fps),document.addEventListener("DOMContentLoaded",fps);
|
package/js/hometop.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
var bywind={hideTodayCard:function(){document.getElementById("todayCard")&&document.getElementById("todayCard").classList.add("hide")}};$(".topGroup").hover((function(){}),(function(){document.getElementById("todayCard").classList.remove("hide"),document.getElementById("todayCard").style.zIndex=1}));
|
package/js/kslink.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
var leonus={linkCom:e=>{var t=document.querySelector(".el-textarea__inner");"bf"==e?(t.value="```yml\n",t.value+="- name: \n link: \n avatar: \n descr: \n rss: ",t.style.height="165px",t.value+="\n```",t.setSelectionRange(15,15)):(t.value="站点名称:\n站点地址:\n头像链接:\n站点描述:\nRSS地址:",t.style.height="205px",t.setSelectionRange(5,5)),t.focus()},owoBig:()=>{if(!document.getElementById("post-comment")||document.body.clientWidth<768)return;let e=1,t="",n=document.createElement("div"),o=document.querySelector("body");n.id="owo-big",o.appendChild(n),new MutationObserver((l=>{for(let i=0;i<l.length;i++){let s=l[i].addedNodes,a="";if(2==s.length&&"OwO-body"==s[1].className)a=s[1];else{if(1!=s.length||"tk-comment"!=s[0].className)continue;a=s[0]}a.onmouseover=l=>{e&&("OwO-body"==a.className&&"IMG"==l.target.tagName||"tk-owo-emotion"==l.target.className)&&(e=0,t=setTimeout((()=>{let e=3*l.path[0].clientHeight,t=3*l.path[0].clientWidth,i=l.x-l.offsetX-(t-l.path[0].clientWidth)/2,s=l.y-l.offsetY;i+t>o.clientWidth&&(i-=i+t-o.clientWidth+10),i<0&&(i=10),n.style.cssText=`display:flex; height:${e}px; width:${t}px; left:${i}px; top:${s}px;`,n.innerHTML=`<img src="${l.target.src}">`}),300))},a.onmouseout=()=>{n.style.display="none",e=1,clearTimeout(t)}}})).observe(document.getElementById("post-comment"),{subtree:!0,childList:!0})}};
|
package/js/lunar.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
var lunarInfo=[19416,19168,42352,21717,53856,55632,91476,22176,39632,21970,19168,42422,42192,53840,119381,46400,54944,44450,38320,84343,18800,42160,46261,27216,27968,109396,11104,38256,21234,18800,25958,54432,59984,28309,23248,11104,100067,37600,116951,51536,54432,120998,46416,22176,107956,9680,37584,53938,43344,46423,27808,46416,86869,19872,42416,83315,21168,43432,59728,27296,44710,43856,19296,43748,42352,21088,62051,55632,23383,22176,38608,19925,19152,42192,54484,53840,54616,46400,46752,103846,38320,18864,43380,42160,45690,27216,27968,44870,43872,38256,19189,18800,25776,29859,59984,27480,23232,43872,38613,37600,51552,55636,54432,55888,30034,22176,43959,9680,37584,51893,43344,46240,47780,44368,21977,19360,42416,86390,21168,43312,31060,27296,44368,23378,19296,42726,42208,53856,60005,54576,23200,30371,38608,19195,19152,42192,118966,53840,54560,56645,46496,22224,21938,18864,42359,42160,43600,111189,27936,44448,84835,37744,18936,18800,25776,92326,59984,27424,108228,43744,41696,53987,51552,54615,54432,55888,23893,22176,42704,21972,21200,43448,43344,46240,46758,44368,21920,43940,42416,21168,45683,26928,29495,27296,44368,84821,19296,42352,21732,53600,59752,54560,55968,92838,22224,19168,43476,41680,53584,62034,54560],solarMonth=[31,28,31,30,31,30,31,31,30,31,30,31],Gan=["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"],Zhi=["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"],Animals=["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"],solarTerm=["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"],sTermInfo=["9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c3598082c95f8c965cc920f","97bd0b06bdb0722c965ce1cfcc920f","b027097bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd0b06bdb0722c965ce1cfcc920f","b027097bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd0b06bdb0722c965ce1cfcc920f","b027097bd097c36b0b6fc9274c91aa","9778397bd19801ec9210c965cc920e","97b6b97bd19801ec95f8c965cc920f","97bd09801d98082c95f8e1cfcc920f","97bd097bd097c36b0b6fc9210c8dc2","9778397bd197c36c9210c9274c91aa","97b6b97bd19801ec95f8c965cc920e","97bd09801d98082c95f8e1cfcc920f","97bd097bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c91aa","97b6b97bd19801ec95f8c965cc920e","97bcf97c3598082c95f8e1cfcc920f","97bd097bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c3598082c95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c3598082c95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd097bd07f595b0b6fc920fb0722","9778397bd097c36b0b6fc9210c8dc2","9778397bd19801ec9210c9274c920e","97b6b97bd19801ec95f8c965cc920f","97bd07f5307f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c920e","97b6b97bd19801ec95f8c965cc920f","97bd07f5307f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c91aa","97b6b97bd19801ec9210c965cc920e","97bd07f1487f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c9274c920e","97bcf7f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c91aa","97b6b97bd197c36c9210c9274c920e","97bcf7f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c920e","97b6b7f0e47f531b0723b0b6fb0722","7f0e37f5307f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36b0b70c9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e37f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc9210c8dc2","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0787b0721","7f0e27f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c91aa","97b6b7f0e47f149b0723b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c8dc2","977837f0e37f149b0723b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e37f5307f595b0b0bc920fb0722","7f0e397bd097c35b0b6fc9210c8dc2","977837f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0721","7f0e37f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc9210c8dc2","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f149b0723b0787b0721","7f0e27f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14998082b0723b06bd","7f07e7f0e37f149b0723b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e37f1487f595b0b0bb0b6fb0722","7f0e37f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e37f1487f531b0b0bb0b6fb0722","7f0e37f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e37f1487f531b0b0bb0b6fb0722","7f0e37f0e37f14898082b072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e37f0e37f14898082b072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f149b0723b0787b0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14998082b0723b06bd","7f07e7f0e47f149b0723b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14998082b0723b06bd","7f07e7f0e37f14998083b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14898082b0723b02d5","7f07e7f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e36665b66aa89801e9808297c35","665f67f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e36665b66a449801e9808297c35","665f67f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e36665b66a449801e9808297c35","665f67f0e37f14898082b072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e26665b66a449801e9808297c35","665f67f0e37f1489801eb072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722"],nStr1=["日","一","二","三","四","五","六","七","八","九","十"],nStr2=["初","十","廿","卅"],nStr3=["正","二","三","四","五","六","七","八","九","十","冬","腊"];function lYearDays(b){var f,c=348;for(f=32768;f>8;f>>=1)c+=lunarInfo[b-1900]&f?1:0;return c+leapDays(b)}function leapMonth(b){return 15&lunarInfo[b-1900]}function leapDays(b){return leapMonth(b)?65536&lunarInfo[b-1900]?30:29:0}function monthDays(b,f){return f>12||f<1?-1:lunarInfo[b-1900]&65536>>f?30:29}function solarDays(b,f){if(f>12||f<1)return-1;var c=f-1;return 1===c?b%4==0&&b%100!=0||b%400==0?29:28:solarMonth[c]}function toGanZhiYear(b){var f=(b-3)%10,c=(b-3)%12;return 0===f&&(f=10),0===c&&(c=12),Gan[f-1]+Zhi[c-1]}function toAstro(b,f){return"魔羯水瓶双鱼白羊金牛双子巨蟹狮子处女天秤天蝎射手魔羯".substr(2*b-(f<[20,19,21,21,21,22,23,23,23,23,22,22][b-1]?2:0),2)+"座"}function toGanZhi(b){return Gan[b%10]+Zhi[b%12]}function getTerm(b,f){if(b<1900||b>2100)return-1;if(f<1||f>24)return-1;var c=sTermInfo[b-1900],e=[parseInt("0x"+c.substr(0,5)).toString(),parseInt("0x"+c.substr(5,5)).toString(),parseInt("0x"+c.substr(10,5)).toString(),parseInt("0x"+c.substr(15,5)).toString(),parseInt("0x"+c.substr(20,5)).toString(),parseInt("0x"+c.substr(25,5)).toString()],a=[e[0].substr(0,1),e[0].substr(1,2),e[0].substr(3,1),e[0].substr(4,2),e[1].substr(0,1),e[1].substr(1,2),e[1].substr(3,1),e[1].substr(4,2),e[2].substr(0,1),e[2].substr(1,2),e[2].substr(3,1),e[2].substr(4,2),e[3].substr(0,1),e[3].substr(1,2),e[3].substr(3,1),e[3].substr(4,2),e[4].substr(0,1),e[4].substr(1,2),e[4].substr(3,1),e[4].substr(4,2),e[5].substr(0,1),e[5].substr(1,2),e[5].substr(3,1),e[5].substr(4,2)];return parseInt(a[f-1])}function toChinaMonth(b){if(b>12||b<1)return-1;var f=nStr3[b-1];return f+="月"}function toChinaDay(b){var f;switch(b){case 10:f="初十";break;case 20:f="二十";break;case 30:f="三十";break;default:f=nStr2[Math.floor(b/10)],f+=nStr1[b%10]}return f}function getAnimal(b){return Animals[(b-4)%12]}function solar2lunar(b,f,c){if(b<1900||b>2100)return-1;if(1900===b&&1===f&&c<31)return-1;var e,a,r=null,t=0;b=(r=b?new Date(b,parseInt(f)-1,c):new Date).getFullYear(),f=r.getMonth()+1,c=r.getDate();var d=(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate())-Date.UTC(1900,0,31))/864e5;for(e=1900;e<2101&&d>0;e++)d-=t=lYearDays(e);d<0&&(d+=t,e--);var n=new Date,s=!1;n.getFullYear()===b&&n.getMonth()+1===f&&n.getDate()===c&&(s=!0);var u=r.getDay(),o=nStr1[u];0===u&&(u=7);var l=e;a=leapMonth(e);var i=!1;for(e=1;e<13&&d>0;e++)a>0&&e===a+1&&!1===i?(--e,i=!0,t=leapDays(l)):t=monthDays(l,e),!0===i&&e===a+1&&(i=!1),d-=t;0===d&&a>0&&e===a+1&&(i?i=!1:(i=!0,--e)),d<0&&(d+=t,--e);var h=e,D=d+1,g=f-1,v=toGanZhiYear(l),y=getTerm(b,2*f-1),m=getTerm(b,2*f),p=toGanZhi(12*(b-1900)+f+11);c>=y&&(p=toGanZhi(12*(b-1900)+f+12));var M=!1,T=null;y===c&&(M=!0,T=solarTerm[2*f-2]),m===c&&(M=!0,T=solarTerm[2*f-1]);var I=toGanZhi(Date.UTC(b,g,1,0,0,0,0)/864e5+25567+10+c-1),C=toAstro(f,c);return{lYear:l,lMonth:h,lDay:D,Animal:getAnimal(l),IMonthCn:(i?"闰":"")+toChinaMonth(h),IDayCn:toChinaDay(D),cYear:b,cMonth:f,cDay:c,gzYear:v,gzMonth:p,gzDay:I,isToday:s,isLeap:i,nWeek:u,ncWeek:"星期"+o,isTerm:M,Term:T,astro:C}}var calendarFormatter={solar2lunar:function(b,f,c){return solar2lunar(b,f,c)},lunar2solar:function(b,f,c,e){if((e=!!e)&&leapMonth!==f)return-1;if(2100===b&&12===f&&c>1||1900===b&&1===f&&c<31)return-1;var a=monthDays(b,f),r=a;if(e&&(r=leapDays(b,f)),b<1900||b>2100||c>r)return-1;for(var t=0,d=1900;d<b;d++)t+=lYearDays(d);var n=0,s=!1;for(d=1;d<f;d++)n=leapMonth(b),s||n<=d&&n>0&&(t+=leapDays(b),s=!0),t+=monthDays(b,d);e&&(t+=a);var u=Date.UTC(1900,1,30,0,0,0),o=new Date(864e5*(t+c-31)+u);return solar2lunar(o.getUTCFullYear(),o.getUTCMonth()+1,o.getUTCDate())}};
|
package/js/main.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
document.addEventListener("DOMContentLoaded",(function(){let t,e,n=!1;const o=n=>{const o=t=>{let e=0;return t.length&&Array.from(t).forEach((t=>{e+=t.offsetWidth})),e};if(n){const n=o(document.querySelector("#blog-info > a").children),i=o(document.getElementById("menus").children);t=n+i,e=document.getElementById("nav")}let i="";i=window.innerWidth<=768||t>e.offsetWidth-120,i?e.classList.add("hide-menu"):e.classList.remove("hide-menu")},i=()=>{btf.sidebarPaddingR(),document.body.style.overflow="hidden",btf.animateIn(document.getElementById("menu-mask"),"to_show 0.5s"),document.getElementById("sidebar-menus").classList.add("open"),n=!0},c=()=>{const t=document.body;t.style.overflow="",t.style.paddingRight="",btf.animateOut(document.getElementById("menu-mask"),"to_hide 0.5s"),document.getElementById("sidebar-menus").classList.remove("open"),n=!1},s=function(){const t=GLOBAL_CONFIG.highlight;if(!t)return;const e=t.highlightCopy,n=t.highlightLang,o=GLOBAL_CONFIG_SITE.isHighlightShrink,i=t.highlightHeightLimit,c=e||n||void 0!==o,s="highlighjs"===t.plugin?document.querySelectorAll("figure.highlight"):document.querySelectorAll('pre[class*="language-"]');if(!c&&!i||!s.length)return;const a="prismjs"===t.plugin;let l="",r="";const d=!0===o?"closed":"";void 0!==o&&(l=`<i class="fas fa-angle-down expand ${d}"></i>`),e&&(r='<div class="copy-notice"></div><i class="fas fa-paste copy-button"></i>');const u=t=>{const e=t.parentNode;e.classList.add("copy-true");const n=window.getSelection(),o=document.createRange();a?o.selectNodeContents(e.querySelectorAll("pre code")[0]):o.selectNodeContents(e.querySelectorAll("table .code pre")[0]),n.removeAllRanges(),n.addRange(o);n.toString();((t,e)=>{if(document.queryCommandSupported&&document.queryCommandSupported("copy"))if(document.execCommand("copy"),void 0!==GLOBAL_CONFIG.Snackbar)btf.snackbarShow(GLOBAL_CONFIG.copy.success);else{const t=e.previousElementSibling;t.innerText=GLOBAL_CONFIG.copy.success,t.style.opacity=1,setTimeout((()=>{t.style.opacity=0}),700)}else void 0!==GLOBAL_CONFIG.Snackbar?btf.snackbarShow(GLOBAL_CONFIG.copy.noSupport):e.previousElementSibling.innerText=GLOBAL_CONFIG.copy.noSupport})(0,t.lastChild),n.removeAllRanges(),e.classList.remove("copy-true")},m=function(t){const e=t.target.classList;e.contains("expand")?(t=>{const e=[...t.parentNode.children].slice(1);t.firstChild.classList.toggle("closed"),btf.isHidden(e[e.length-1])?e.forEach((t=>{t.style.display="block"})):e.forEach((t=>{t.style.display="none"}))})(this):e.contains("copy-button")&&u(this)},g=function(){this.classList.toggle("expand-done")};function f(t,e,n){const o=document.createDocumentFragment();if(c){const e=document.createElement("div");e.className=`highlight-tools ${d}`,e.innerHTML=l+t+r,e.addEventListener("click",m),o.appendChild(e)}if(i&&e.offsetHeight>i+30){const t=document.createElement("div");t.className="code-expand-btn",t.innerHTML='<i class="fas fa-angle-double-down"></i>',t.addEventListener("click",g),o.appendChild(t)}"hl"===n?e.insertBefore(o,e.firstChild):e.parentNode.insertBefore(o,e)}n?a?s.forEach((function(t){const e=`<div class="code-lang">${t.getAttribute("data-language")?t.getAttribute("data-language"):"Code"}</div>`;btf.wrap(t,"figure",{class:"highlight"}),f(e,t)})):s.forEach((function(t){let e=t.getAttribute("class").split(" ")[1];"plain"!==e&&void 0!==e||(e="Code");f(`<div class="code-lang">${e}</div>`,t,"hl")})):a?s.forEach((function(t){btf.wrap(t,"figure",{class:"highlight"}),f("",t)})):s.forEach((function(t){f("",t,"hl")}))};const a=function(){const t=document.getElementById("rightside"),e=window.innerHeight+56;if(document.body.scrollHeight<=e)return void(t.style.cssText="opacity: 1; transform: translateX(-58px)");let n=0,o=!0;const i=document.getElementById("page-header"),c="function"==typeof chatBtnHide,s="function"==typeof chatBtnShow,a=GLOBAL_CONFIG.percent.rightside,l=btf.throttle((()=>{const l=window.scrollY||document.documentElement.scrollTop,r=function(t){const e=t>n;return n=t,e}(l);l>56?(i.classList.add("is-top-bar"),r?(i.classList.contains("nav-visible")&&i.classList.remove("nav-visible"),s&&!0===o&&(chatBtnHide(),o=!1)):(i.classList.contains("nav-visible")||i.classList.add("nav-visible"),c&&!1===o&&(chatBtnShow(),o=!0)),i.classList.add("nav-fixed"),"0"===window.getComputedStyle(t).getPropertyValue("opacity")&&(t.style.cssText="opacity: 0.8; transform: translateX(-58px)")):(0===l&&i.classList.remove("is-top-bar"),t.style.cssText="opacity: ''; transform: ''"),a&&(t=>{const e=btf.getScrollPercent(t,document.body),n=document.getElementById("go-up");e<95?(n.classList.add("show-percent"),n.querySelector(".scroll-percent").textContent=e):n.classList.remove("show-percent")})(l),document.body.scrollHeight<=e&&(t.style.cssText="opacity: 0.8; transform: translateX(-58px)")}),200);window.scrollCollect=l,window.addEventListener("scroll",scrollCollect)},l=function(){const t=GLOBAL_CONFIG_SITE.isToc,e=GLOBAL_CONFIG.isAnchor,n=document.getElementById("article-container");if(!n||!t&&!e)return;let o,i,c,s,a;if(t){const t=document.getElementById("card-toc");i=t.getElementsByClassName("toc-content")[0],o=i.querySelectorAll(".toc-link"),s=t.querySelector(".toc-percentage"),a=i.classList.contains("is-expand"),window.mobileToc={open:()=>{t.style.cssText="animation: toc-open .3s; opacity: 1; right: 55px"},close:()=>{t.style.animation="toc-close .2s",setTimeout((()=>{t.style.cssText="opacity:''; animation: ''; right: ''"}),100)}},i.addEventListener("click",(t=>{t.preventDefault();const e=t.target.classList;if(e.contains("toc-content"))return;const n=e.contains("toc-link")?t.target:t.target.parentElement;btf.scrollToDest(btf.getEleTop(document.getElementById(decodeURI(n.getAttribute("href")).replace("#",""))),300),window.innerWidth<900&&window.mobileToc.close()})),c=t=>{const e=t.getBoundingClientRect().top,n=i.scrollTop;e>document.documentElement.clientHeight-100&&(i.scrollTop=n+150),e<100&&(i.scrollTop=n-150)}}const l=n.querySelectorAll("h1,h2,h3,h4,h5,h6");let r="";window.tocScrollFn=btf.throttle((()=>{const d=window.scrollY||document.documentElement.scrollTop;t&&GLOBAL_CONFIG.percent.toc&&(s.textContent=btf.getScrollPercent(d,n)),function(n){if(0===n)return!1;let s="",d="";if(l.forEach((function(t,e){if(n>btf.getEleTop(t)-80){const n=t.id;s=n?"#"+encodeURI(n):"",d=e}})),r!==d&&(e&&btf.updateAnchor(s),r=d,t)){if(i.querySelectorAll(".active").forEach((t=>{t.classList.remove("active")})),""===s)return;const t=o[d];if(t.classList.add("active"),setTimeout((()=>{c(t)}),0),a)return;let e=t.parentNode;for(;!e.matches(".toc");e=e.parentNode)e.matches("li")&&e.classList.add("active")}}(d)}),100),window.addEventListener("scroll",tocScrollFn)},r=()=>{const t=document.body;t.classList.add("read-mode");const e=document.createElement("button");e.type="button",e.className="fas fa-sign-out-alt exit-readmode",t.appendChild(e),e.addEventListener("click",(function n(){t.classList.remove("read-mode"),e.remove(),e.removeEventListener("click",n)}))},d=()=>{"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(),"function"==typeof changeGiscusTheme&&changeGiscusTheme(),"object"==typeof FB&&window.loadFBComment&&window.loadFBComment(),"function"==typeof runMermaid&&window.runMermaid()},u=t=>{const e=document.getElementById("rightside-config-hide").classList;e.toggle("show"),t.classList.contains("show")&&(e.add("status"),setTimeout((()=>{e.remove("status")}),300)),t.classList.toggle("show")},m=()=>{btf.scrollToDest(0,500)},g=()=>{const t=document.documentElement.classList;t.contains("hide-aside")?saveToLocal.set("aside-status","show",2):saveToLocal.set("aside-status","hide",2),t.toggle("hide-aside")},f=()=>{"0"===window.getComputedStyle(document.getElementById("card-toc")).getPropertyValue("opacity")?window.mobileToc.open():window.mobileToc.close()};document.getElementById("rightside").addEventListener("click",(function(t){const e=t.target.id?t.target:t.target.parentNode;switch(e.id){case"go-up":m();break;case"rightside_config":u(e);break;case"mobile-toc-button":f();break;case"readmode":r();break;case"darkmode":d();break;case"hide-aside-btn":g()}}));const h=()=>{document.querySelectorAll("#sidebar-menus .site-page.group").forEach((function(t){t.addEventListener("click",(function(){this.classList.toggle("hide")}))}))},p=function(){document.querySelectorAll("#article-container .tab > button").forEach((function(t){t.addEventListener("click",(function(t){const e=this,n=e.parentNode;if(!n.classList.contains("active")){const t=n.parentNode.nextElementSibling,o=btf.siblings(n,".active")[0];o&&o.classList.remove("active"),n.classList.add("active");const i=e.getAttribute("data-href").replace("#","");[...t.children].forEach((t=>{t.id===i?t.classList.add("active"):t.classList.remove("active")}));const c=t.querySelectorAll(`#${i} .fj-gallery`);c.length>0&&btf.initJustifiedGallery(c)}}))}))},y=()=>{document.querySelectorAll("#article-container .tabs .tab-to-top").forEach((function(t){t.addEventListener("click",(function(){btf.scrollToDest(btf.getEleTop(btf.getParents(this,".tabs")),300)}))}))},L=function(t){t.forEach((t=>{const e=t,n=e.getAttribute("datetime");e.innerText=btf.diffDate(n,!0),e.style.display="inline"}))};window.refreshFn=function(){o(!0),e.classList.add("show"),GLOBAL_CONFIG_SITE.isPost?(void 0!==GLOBAL_CONFIG.noticeOutdate&&function(){const t=GLOBAL_CONFIG.noticeOutdate,e=btf.diffDate(GLOBAL_CONFIG_SITE.postUpdate);if(e>=t.limitDay){const n=document.createElement("div");n.className="post-outdate-notice",n.textContent=t.messagePrev+" "+e+" "+t.messageNext;const o=document.getElementById("article-container");"top"===t.position?o.insertBefore(n,o.firstChild):o.appendChild(n)}}(),GLOBAL_CONFIG.relativeDate.post&&L(document.querySelectorAll("#post-meta time"))):(GLOBAL_CONFIG.relativeDate.homepage&&L(document.querySelectorAll("#recent-posts time")),GLOBAL_CONFIG.runtime&&(()=>{const t=document.getElementById("runtimeshow");if(t){const e=t.getAttribute("data-publishDate");t.innerText=btf.diffDate(e)+" "+GLOBAL_CONFIG.runtime}})(),(()=>{const t=document.getElementById("last-push-date");if(t){const e=t.getAttribute("data-lastPushDate");t.innerText=btf.diffDate(e,!0)}})(),function(){const t=document.querySelectorAll("#aside-cat-list .card-category-list-item.parent i");t.length&&t.forEach((function(t){t.addEventListener("click",(function(t){t.preventDefault(),this.classList.toggle("expand");const e=this.parentNode.nextElementSibling;btf.isHidden(e)?e.style.display="block":e.style.display="none"}))}))}()),l(),GLOBAL_CONFIG_SITE.isHome&&(()=>{const t=document.getElementById("scroll-down");t&&t.addEventListener("click",(function(){btf.scrollToDest(document.getElementById("content-inner").offsetTop,300)}))})(),s(),GLOBAL_CONFIG.isPhotoFigcaption&&document.querySelectorAll("#article-container img").forEach((function(t){const e=t.parentNode,n=t.title||t.alt;if(n&&!e.parentNode.classList.contains("justified-gallery")){const o=document.createElement("div");o.className="img-alt is-center",o.textContent=n,e.insertBefore(o,t.nextSibling)}})),a();const t=document.querySelectorAll("#article-container .fj-gallery");t.length&&function(t){const e=t=>{let e="";const n=t=>t.replace(/"/g,""");return t.forEach((t=>{const o=t.alt?`alt="${n(t.alt)}"`:"",i=t.title?`title="${n(t.title)}"`:"";e+=`<div class="fj-gallery-item"><img src="${t.url}" ${o+i}"></div>`})),e},n=(t,n)=>{const o=t.getAttribute("data-limit"),i=n.length;return i>o?t.insertAdjacentHTML("beforeend",e(n.splice(0,o))):(t.insertAdjacentHTML("beforeend",e(n)),t.classList.remove("lazyload")),i>o?o:i};t.forEach((t=>{const o=JSON.parse(t.querySelector(".gallery-data").textContent);if(t.classList.contains("lazyload")){n(t,o);const e=t.getAttribute("data-limit"),i=()=>{const c=n(t,o);fjGallery(t,"appendImages",t.querySelectorAll(`.fj-gallery-item:nth-last-child(-n+${c})`)),btf.loadLightbox(t.querySelectorAll("img")),c<e&&t.nextElementSibling.removeEventListener("click",i)};t.nextElementSibling.addEventListener("click",i)}else t.innerHTML=e(o)})),window.fjGallery?setTimeout((()=>{btf.initJustifiedGallery(t)}),100):(getCSS(`${GLOBAL_CONFIG.source.justifiedGallery.css}`),getScript(`${GLOBAL_CONFIG.source.justifiedGallery.js}`).then((()=>{btf.initJustifiedGallery(t)})))}(t),btf.loadLightbox(document.querySelectorAll("#article-container img:not(.no-lightbox)")),(()=>{const t=document.querySelectorAll("#article-container :not(.highlight) > table, #article-container > table");t.length&&t.forEach((t=>{btf.wrap(t,"div",{class:"table-wrap"})}))})(),function(){const t=document.querySelectorAll("#article-container .hide-button");t.length&&t.forEach((function(t){t.addEventListener("click",(function(t){this.classList.add("open");const e=this.nextElementSibling.querySelectorAll(".fj-gallery");e.length&&btf.initJustifiedGallery(e)}))}))}(),p(),y(),function(){let t=!1;const e=document.querySelector("#comment-switch > .switch-btn");e&&e.addEventListener("click",(function(){this.classList.toggle("move"),document.querySelectorAll("#post-comment > .comment-wrap > div").forEach((function(t){btf.isHidden(t)?t.style.cssText="display: block;animation: tabshow .5s":t.style.cssText="display: none;animation: ''"})),t||"function"!=typeof loadOtherComment||(t=!0,loadOtherComment())}))}(),document.getElementById("toggle-menu").addEventListener("click",(()=>{i()}))},refreshFn(),window.addEventListener("resize",(()=>{o(!1),btf.isHidden(document.getElementById("toggle-menu"))&&n&&c()})),document.getElementById("menu-mask").addEventListener("click",(t=>{c()})),h(),GLOBAL_CONFIG.islazyload&&(window.lazyLoadInstance=new LazyLoad({elements_selector:"img",threshold:0,data_src:"lazy-src"})),void 0!==GLOBAL_CONFIG.copyright&&(()=>{const t=GLOBAL_CONFIG.copyright;document.body.oncopy=e=>{let n;e.preventDefault();const o=window.getSelection(0).toString();return n=o.length>t.limitCount?o+"\n\n\n"+t.languages.author+"\n"+t.languages.link+window.location.href+"\n"+t.languages.source+"\n"+t.languages.info:o,e.clipboardData?e.clipboardData.setData("text",n):window.clipboardData.setData("text",n)}})()}));
|