q78kgblog 1.0.0
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 +36 -0
- package/404.html +933 -0
- package/BingSiteAuth.xml +4 -0
- package/CNAME +1 -0
- package/about/index.html +1096 -0
- package/archives/2022/06/index.html +942 -0
- package/archives/2022/index.html +942 -0
- package/archives/2023/02/index.html +942 -0
- package/archives/2023/04/index.html +942 -0
- package/archives/2023/05/index.html +942 -0
- package/archives/2023/08/index.html +942 -0
- package/archives/2023/09/index.html +942 -0
- package/archives/2023/index.html +942 -0
- package/archives/2024/01/index.html +942 -0
- package/archives/2024/02/index.html +942 -0
- package/archives/2024/index.html +942 -0
- package/archives/index.html +942 -0
- package/assets/css/APlayer.min.css +3 -0
- package/assets/douban-loading.gif +0 -0
- package/assets/js/APlayer.min.js +2 -0
- package/assets/js/Meting.min.js +1 -0
- package/atom.xml +311 -0
- package/baidusitemap.xml +43 -0
- package/bangumis/index.html +1247 -0
- package/bigpie/index.html +714 -0
- package/bing.json +1 -0
- package/categories/Hello-World/index.html +954 -0
- package/categories/Hexo/index.html +954 -0
- package/categories/index.html +710 -0
- package/categories//345/271/264/347/273/210/346/200/273/347/273/223/index.html +954 -0
- package/categories//346/201/260/351/245/255/index.html +954 -0
- package/categories//347/264/240/346/235/220/index.html +954 -0
- package/categories//351/227/262/350/201/212/346/235/202/350/260/210/index.html +954 -0
- package/content.json +1 -0
- package/css/404page.css +65 -0
- package/css/ariasakablog.css +5632 -0
- package/css/commentBarrage.css +111 -0
- package/css/danmaku.css +89 -0
- package/css/essay.css +306 -0
- package/css/iconfont.css +55 -0
- package/css/iconfont.ttf +0 -0
- package/css/iconfont.woff +0 -0
- package/css/iconfont.woff2 +0 -0
- package/css/index.css +7006 -0
- package/css/people.css +18 -0
- package/css/stylessimple.css +40 -0
- package/css/swiper.min.css +701 -0
- package/css/swiperstyle.css +567 -0
- package/css/var.css +0 -0
- package/essay/index.html +701 -0
- package/favicon.ico +0 -0
- package/fcircle/index.html +733 -0
- package/fontawesome/index.html +716 -0
- package/google.txt +10 -0
- package/googlebe706248808ee393.html +1 -0
- package/img/144.png +0 -0
- package/img/16.png +0 -0
- package/img/1666416625095-iPhone X.png +0 -0
- package/img/1666416702650-Macbook Pro 2016 (1).png +0 -0
- package/img/1666416764216-Nexus 9.png +0 -0
- package/img/180.png +0 -0
- package/img/192.png +0 -0
- package/img/20200904222157.png +0 -0
- package/img/20200924153652.png +0 -0
- package/img/256.png +0 -0
- package/img/36.png +0 -0
- package/img/48.png +0 -0
- package/img/512.png +0 -0
- package/img/72.png +0 -0
- package/img/72645310.jpg +0 -0
- package/img/8DSTSS20990281646044689944.PNG +0 -0
- package/img/96.png +0 -0
- package/img/O35HOG22090681654187900371.jpg +0 -0
- package/img/a.webp +0 -0
- package/img/ad.png +0 -0
- package/img/apple-touch-icon.png +0 -0
- package/img/avatar.jpg +0 -0
- package/img/buYgVO22990681624844309044.jpg +0 -0
- package/img/comment.png +0 -0
- package/img/favicon.ico +0 -0
- package/img/favicon.jpg +0 -0
- package/img/friend_404.gif +0 -0
- package/img/mqaizf23990681654186719414.jpeg +0 -0
- package/img/nyancat.gif +0 -0
- package/img/siteshot.png +0 -0
- package/img/uTools_1666416859497-iMac.png +0 -0
- package/img-col/index.html +802 -0
- package/index.html +1056 -0
- package/js/aplayersave.js +268 -0
- package/js/baiduhistory.js +76 -0
- package/js/bbtalk.js +11354 -0
- package/js/bbtalklunbo.js +78 -0
- package/js/browser.js +35 -0
- package/js/calendar.js +380 -0
- package/js/cate.js +22 -0
- package/js/commentBarrage.js +240 -0
- package/js/commentsCount.js +43 -0
- package/js/copy.js +23 -0
- package/js/countup.js +209 -0
- package/js/cursor.js +82 -0
- package/js/danmaku.js +106 -0
- package/js/day.js +199 -0
- package/js/dianzan.js +249 -0
- package/js/dis.js +255 -0
- package/js/dist/baiduhistory.dev.js +102 -0
- package/js/dist/bbtalk.dev.js +12876 -0
- package/js/dist/bbtalklunbo.dev.js +45 -0
- package/js/dist/calendar.dev.js +395 -0
- package/js/dist/fixbugpjax.dev.js +8 -0
- package/js/dist/gongnong.dev.js +565 -0
- package/js/dist/heimu.dev.js +19 -0
- package/js/dist/links.dev.js +13 -0
- package/js/dist/main.dev.js +845 -0
- package/js/dist/resizeTop.dev.js +50 -0
- package/js/dist/seo.dev.js +33 -0
- package/js/dist/twikoo.all.min.dev.js +1 -0
- package/js/fixbugpjax.js +7 -0
- package/js/fixed_card_widget.js +46 -0
- package/js/fps.js +58 -0
- package/js/gitalker.js +11 -0
- package/js/gsap.min.js +11 -0
- package/js/heimu.js +16 -0
- package/js/hide.show.js +17 -0
- package/js/jike.js +121 -0
- package/js/jikewater.js +60 -0
- package/js/languages.js +511 -0
- package/js/latest.js +49 -0
- package/js/local-search.js +476 -0
- package/js/lunar.js +1071 -0
- package/js/lyxTalk.js +12 -0
- package/js/main.js +783 -0
- package/js/nav.js +30 -0
- package/js/noie.js +3 -0
- package/js/owo.js +52 -0
- package/js/people.js +175 -0
- package/js/pikaday.js +109 -0
- package/js/random.js +1 -0
- package/js/randomFriend.js +95 -0
- package/js/resizeTop.js +43 -0
- package/js/rightmenu.js +335 -0
- package/js/sakura.js +164 -0
- package/js/search/algolia.js +155 -0
- package/js/search/local-search.js +188 -0
- package/js/settings.js +353 -0
- package/js/sitetime.js +25 -0
- package/js/smooth-scrolling.js +546 -0
- package/js/sw-toolbox.js +16 -0
- package/js/swiperinit.js +23 -0
- package/js/tw_cn.js +100 -0
- package/js/twikoo.all.min.js +2 -0
- package/js/utils.js +278 -0
- package/js/welcome.js +107 -0
- package/js/welcomeconsole.js +23 -0
- package/links/index.html +842 -0
- package/live2d-widget/LICENSE +674 -0
- package/live2d-widget/README.md +188 -0
- package/live2d-widget/assets/screenshot-1.png +0 -0
- package/live2d-widget/assets/screenshot-2.png +0 -0
- package/live2d-widget/assets/screenshot-3.png +0 -0
- package/live2d-widget/autoload.js +63 -0
- package/live2d-widget/demo/demo.html +34 -0
- package/live2d-widget/demo/login.html +271 -0
- package/live2d-widget/live2d.min.js +1 -0
- package/live2d-widget/package.json +31 -0
- package/live2d-widget/rollup.config.js +38 -0
- package/live2d-widget/src/index.js +178 -0
- package/live2d-widget/src/message.js +22 -0
- package/live2d-widget/src/model.js +75 -0
- package/live2d-widget/src/tools.js +78 -0
- package/live2d-widget/src/utils.js +5 -0
- package/live2d-widget/src/waifu-tips.js +3 -0
- package/live2d-widget/waifu-tips.js +5 -0
- package/live2d-widget/waifu-tips.json +255 -0
- package/live2d-widget/waifu.css +310 -0
- package/manifest.json +1 -0
- package/noie.html +69 -0
- package/othersite/index.html +779 -0
- package/owo.json +1 -0
- package/package.json +1 -0
- package/people.html +24 -0
- package/posts/164ef646/index.html +1027 -0
- package/posts/228c2ef8/index.html +1014 -0
- package/posts/4a17b156/index.html +1010 -0
- package/posts/6f3c565b/index.html +1013 -0
- package/posts/7da7c3f6/index.html +1070 -0
- package/posts/a9a6c1fb/index.html +1041 -0
- package/posts/c262e439/index.html +1002 -0
- package/posts/c81531cf/index.html +1080 -0
- package/posts/da2093a1/index.html +1022 -0
- package/posts/e54f7476/index.html +1052 -0
- package/projects.html +424 -0
- package/random.html +32 -0
- package/robots.txt +17 -0
- package/search.xml +309 -0
- package/sitemap.txt +62 -0
- package/sitemap.xml +488 -0
- package/sw.js +190 -0
- package/swReg.js +29 -0
- package/tags/AI/index.html +955 -0
- package/tags/Butterfly/index.html +955 -0
- package/tags/Cloudflare/index.html +955 -0
- package/tags/DiffSinger/index.html +955 -0
- package/tags/Hexo/index.html +955 -0
- package/tags/Next/index.html +955 -0
- package/tags/RAID/index.html +955 -0
- package/tags/VPS/index.html +955 -0
- package/tags/Vercel/index.html +955 -0
- package/tags/Workers/index.html +955 -0
- package/tags/hello-world/index.html +955 -0
- package/tags/index.html +710 -0
- package/tags//344/270/273/351/242/230/index.html +955 -0
- package/tags//344/272/221/346/234/215/345/212/241/345/231/250/index.html +955 -0
- package/tags//344/276/277/345/256/234/index.html +955 -0
- package/tags//345/206/231/344/275/234/index.html +955 -0
- package/tags//345/245/263/346/200/247/346/204/217/350/257/206/index.html +955 -0
- package/tags//345/255/246/344/271/240/index.html +955 -0
- package/tags//345/256/266/351/207/214/344/272/221/index.html +955 -0
- package/tags//345/271/264/347/273/210/346/200/273/347/273/223/index.html +955 -0
- package/tags//346/200/247/344/273/267/346/257/224/index.html +955 -0
- package/tags//346/212/230/350/205/276/index.html +955 -0
- package/tags//346/217/220/344/276/233/345/225/206/index.html +955 -0
- package/tags//346/227/245/345/270/270/index.html +955 -0
- package/tags//346/234/215/345/212/241/345/231/250/index.html +955 -0
- package/tags//346/265/252/346/275/256/index.html +955 -0
- package/tags//347/256/200/347/210/261/index.html +955 -0
- package/tags//350/207/252/345/212/250/346/240/207/346/263/250/index.html +955 -0
- package/tags//350/256/272/346/226/207/index.html +955 -0
- package/tags//350/260/267/346/255/214/347/277/273/350/257/221/index.html +955 -0
- package/tags//350/264/237/350/275/275/345/235/207/350/241/241/index.html +955 -0
- package/tags//351/207/221/345/217/245/index.html +955 -0
- package/tags//351/255/224/346/224/271/index.html +955 -0
package/js/danmaku.js
ADDED
@@ -0,0 +1,106 @@
|
|
1
|
+
// //这里可以定义弹幕的背景色与字体色
|
2
|
+
// const danmakuColors = [
|
3
|
+
// ['#0008','white']
|
4
|
+
// ]
|
5
|
+
// //这两个是与随机位置的范围相关的
|
6
|
+
// const maxdanmakuWidth = 150;
|
7
|
+
// const maxdanmakuHeight = 100;
|
8
|
+
// //每个弹幕的间隔时间
|
9
|
+
// const danmakuTime = 1000;
|
10
|
+
// //我用的是Vercel部署,这里链接就是Vercel的链接,腾讯云的自己琢磨一下哈,应该也差不多
|
11
|
+
// const twikooUrl = "https://tkapi.yisous.xyz";
|
12
|
+
// //token要手动获取(反正我是开发者工具里获取的,教程在下面
|
13
|
+
// const accessToken = "1059857c25a2ce9fba9cff298f4f33ee";
|
14
|
+
// const pageUrl = "/messageboard/"
|
15
|
+
|
16
|
+
// //同屏密度限制
|
17
|
+
// const maxdanmaku=25;
|
18
|
+
|
19
|
+
// const danmakuTimer = [];
|
20
|
+
// let danmakuList = [];
|
21
|
+
// let danmakuIndex = 0;
|
22
|
+
|
23
|
+
// function getStyle(obj,name){
|
24
|
+
// if(window.getComputedStyle){
|
25
|
+
// return getComputedStyle(obj,null)[name];
|
26
|
+
// }else{
|
27
|
+
// return obj.currentStyle[name];
|
28
|
+
// }
|
29
|
+
// }
|
30
|
+
|
31
|
+
// const danmakuDom = document.getElementById('danmaku-container');
|
32
|
+
// window.addEventListener('load',()=>{
|
33
|
+
|
34
|
+
// var data = JSON.stringify({
|
35
|
+
// "event": "COMMENT_GET",
|
36
|
+
// "accessToken": accessToken,
|
37
|
+
// "url": pageUrl
|
38
|
+
// });
|
39
|
+
|
40
|
+
// var xhr = new XMLHttpRequest();
|
41
|
+
// xhr.withCredentials = true;
|
42
|
+
|
43
|
+
// xhr.addEventListener("readystatechange", function() {
|
44
|
+
// if(this.readyState === 4) {
|
45
|
+
// danmakuList = linkFilter(JSON.parse(this.responseText).data);
|
46
|
+
// danmakuDom.innerHTML = '';
|
47
|
+
// }
|
48
|
+
// });
|
49
|
+
|
50
|
+
// xhr.open("POST", twikooUrl);
|
51
|
+
// xhr.setRequestHeader("Content-Type", "application/json");
|
52
|
+
|
53
|
+
// xhr.send(data);
|
54
|
+
|
55
|
+
// setInterval(()=>{
|
56
|
+
// if(danmakuList.length){
|
57
|
+
// popdanmaku(danmakuList[danmakuIndex]);
|
58
|
+
// danmakuIndex += 1;
|
59
|
+
// danmakuIndex %= danmakuList.length;
|
60
|
+
// }
|
61
|
+
|
62
|
+
// if(danmakuTimer.length > (danmakuList.length > maxdanmaku?maxdanmaku:danmakuList.length)){
|
63
|
+
// removedanmaku(danmakuTimer.shift())
|
64
|
+
// }
|
65
|
+
// },danmakuTime)
|
66
|
+
// })
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
// function toggleDanmaku(){
|
73
|
+
// $("#danmaku-container").toggle()
|
74
|
+
// }
|
75
|
+
// function linkFilter(data){
|
76
|
+
// const newData = data.filter((comment)=>{
|
77
|
+
// return !comment.master;
|
78
|
+
// })
|
79
|
+
// return newData;
|
80
|
+
// }
|
81
|
+
// function popdanmaku(data){
|
82
|
+
// let danmaku = document.createElement('div');
|
83
|
+
// let width = danmakuDom.clientWidth;
|
84
|
+
// let height = danmakuDom.clientHeight;
|
85
|
+
// danmaku.className = 'danmaku'
|
86
|
+
// danmaku.style.top = Math.floor(Math.random()*(height - maxdanmakuHeight))+'px';
|
87
|
+
// danmaku.style.left = width+'px';
|
88
|
+
// let ran = Math.floor(Math.random()*danmakuColors.length)
|
89
|
+
// danmaku.style.background = danmakuColors[ran][0];
|
90
|
+
// danmaku.style.color = danmakuColors[ran][1];
|
91
|
+
// danmaku.innerHTML = `
|
92
|
+
// <div class="danmakuHead">
|
93
|
+
// <div class="danmakuNick">${data.nick}</div>
|
94
|
+
// <img class="danmakuAvatar" src="https://cravatar.cn/avatar/${data.mailMd5}"/>
|
95
|
+
// </div>
|
96
|
+
// <div class="danmakuContent">${data.comment}</div>
|
97
|
+
// `
|
98
|
+
// danmakuTimer.push(danmaku);
|
99
|
+
// danmakuDom.append(danmaku);
|
100
|
+
// setTimeout(()=>{
|
101
|
+
// danmaku.style.left=-(danmaku.clientWidth*3+500).toString()+"px";
|
102
|
+
// setTimeout(()=>{
|
103
|
+
// danmaku.style.left=-(danmaku.clientWidth*3+500).toString()+"px";
|
104
|
+
// },15000)
|
105
|
+
// },50)
|
106
|
+
// }
|
package/js/day.js
ADDED
@@ -0,0 +1,199 @@
|
|
1
|
+
var d = new Date();
|
2
|
+
m=d.getMonth()+1;
|
3
|
+
dd=d.getDate();
|
4
|
+
y=d.getFullYear();
|
5
|
+
//cookie函数
|
6
|
+
|
7
|
+
|
8
|
+
function randomNum(minNum,maxNum){
|
9
|
+
switch(arguments.length){
|
10
|
+
case 1:
|
11
|
+
return parseInt(Math.random()*minNum+1,10);
|
12
|
+
break;
|
13
|
+
case 2:
|
14
|
+
return parseInt(Math.random()*(maxNum-minNum+1)+minNum,10);
|
15
|
+
break;
|
16
|
+
default:
|
17
|
+
return 0;
|
18
|
+
break;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
//纪念日
|
22
|
+
|
23
|
+
if(m==9&&dd==18){
|
24
|
+
console.log("勿忘国耻,振兴中华!\n\n今天是1931年9月18日九一八事变"+(y-1931).toString()+"周年纪念日!\n=================================================================")
|
25
|
+
document.getElementById("grays").innerText=":root{filter: grayscale(100%);}";
|
26
|
+
if(sessionStorage.getItem("isPopupWindow")!="1"){
|
27
|
+
Swal.fire("今天是1931年9月18日九一八事变"+(y-1931).toString()+"周年纪念日。\n勿忘国耻,振兴中华!");
|
28
|
+
sessionStorage.setItem("isPopupWindow","1");
|
29
|
+
}
|
30
|
+
}
|
31
|
+
if(m==7&&dd==7){
|
32
|
+
console.log("勿忘国耻,振兴中华!\n\n今天是1937年7月7日卢沟桥事变"+(y-1937).toString()+"周年纪念日!\n=================================================================")
|
33
|
+
document.getElementById("grays").innerText=":root{filter: grayscale(100%);}";
|
34
|
+
if(sessionStorage.getItem("isPopupWindow")!="1"){
|
35
|
+
Swal.fire("今天是1937年7月7日卢沟桥事变"+(y-1937).toString()+"周年纪念日。\n勿忘国耻,振兴中华!");
|
36
|
+
sessionStorage.setItem("isPopupWindow","1");
|
37
|
+
}
|
38
|
+
}
|
39
|
+
if(m==12&&dd==13){
|
40
|
+
console.log("勿忘国耻,振兴中华!\n\n今天是1937年12月13日南京大屠杀"+(y-1931).toString()+"周年纪念日!为遇难的无辜同胞们缅怀!\n=================================================================")
|
41
|
+
document.getElementById("grays").innerText=":root{filter: grayscale(100%);}";
|
42
|
+
if(sessionStorage.getItem("isPopupWindow")!="1"){
|
43
|
+
Swal.fire("今天是1937年12月13日南京大屠杀"+(y-1937).toString()+"周年纪念日,希望你能停下来缅怀遇难的无辜同胞们。\n勿忘国耻,振兴中华!");
|
44
|
+
sessionStorage.setItem("isPopupWindow","1");
|
45
|
+
}
|
46
|
+
}
|
47
|
+
if(m==8&&dd==14){
|
48
|
+
console.log("勿忘国耻,振兴中华!\n\n今天是8月14日世界慰安妇纪念日!\n=================================================================")
|
49
|
+
document.getElementById("grays").innerText=":root{filter: grayscale(100%);}";
|
50
|
+
if(sessionStorage.getItem("isPopupWindow")!="1"){
|
51
|
+
Swal.fire("今天是8月14日世界慰安妇纪念日,希望你能停下来了解一下来为历史作证,为曾经的无辜妇女发声。\n勿忘国耻,振兴中华!");
|
52
|
+
sessionStorage.setItem("isPopupWindow","1");
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
//节假日
|
57
|
+
|
58
|
+
if(m==10&&dd<=5){//国庆节
|
59
|
+
console.log("祖国"+(y-1949).toString()+"岁生日快乐!");
|
60
|
+
if(sessionStorage.getItem("isPopupWindow")!="1"){
|
61
|
+
Swal.fire("祖国"+(y-1949).toString()+"岁生日快乐!");
|
62
|
+
sessionStorage.setItem("isPopupWindow","1");
|
63
|
+
}
|
64
|
+
}
|
65
|
+
if(m==8&&dd==15){//搞来玩的,鬼子投降
|
66
|
+
console.log("鬼子投降"+(y-1945).toString()+"年了!");
|
67
|
+
if(sessionStorage.getItem("isPopupWindow")!="1"){
|
68
|
+
Swal.fire("鬼子投降"+(y-1945).toString()+"年了!");
|
69
|
+
sessionStorage.setItem("isPopupWindow","1");
|
70
|
+
}
|
71
|
+
}
|
72
|
+
if(m==1&&dd==1){//元旦节
|
73
|
+
console.log(y.toString()+"年元旦快乐!");
|
74
|
+
if(sessionStorage.getItem("isPopupWindow")!="1"){
|
75
|
+
Swal.fire(y.toString()+"年元旦快乐!");
|
76
|
+
sessionStorage.setItem("isPopupWindow","1");
|
77
|
+
}
|
78
|
+
}
|
79
|
+
if(m==3&&dd==8){//妇女节
|
80
|
+
console.log("各位女神们,妇女节快乐!");
|
81
|
+
if(sessionStorage.getItem("isPopupWindow")!="1"){
|
82
|
+
Swal.fire("各位女神们,妇女节快乐!");
|
83
|
+
sessionStorage.setItem("isPopupWindow","1");
|
84
|
+
}
|
85
|
+
}
|
86
|
+
l=["震惊!微软让Minecraft Java免费了!","Minecraft竟然违背Mojang的原则发布2.0!","非常抱歉,因为不可控原因,博客将于明天停止运营,再见","好消息,日本没了!","美国垮了,背后原因竟是时刻心心念念想着祖国的川普!","微软垮了!","?!"]
|
87
|
+
console.log(m,dd);
|
88
|
+
if(m==4&&dd==1){//愚人节,随机谎话
|
89
|
+
console.log(l[randomNum(0,l.length-1)]);
|
90
|
+
if(sessionStorage.getItem("isPopupWindow")!="1"){
|
91
|
+
Swal.fire(l[randomNum(0,l.length-1)]);
|
92
|
+
sessionStorage.setItem("isPopupWindow","1");
|
93
|
+
}
|
94
|
+
}
|
95
|
+
if(m==5&&dd==1){//劳动节
|
96
|
+
console.log("劳动节快乐!为助力各行各业发展辛勤工作的人们致敬!");
|
97
|
+
if(sessionStorage.getItem("isPopupWindow")!="1"){
|
98
|
+
Swal.fire("劳动节快乐!为助力各行各业发展辛勤工作的人们致敬!");
|
99
|
+
sessionStorage.setItem("isPopupWindow","1");
|
100
|
+
}
|
101
|
+
}
|
102
|
+
if(m==5&&dd==4){//青年节
|
103
|
+
console.log("为有思想政治觉悟,拥护中国共产党,追求无产阶级、共产主义、马克思主义的青年们致敬!");
|
104
|
+
if(sessionStorage.getItem("isPopupWindow")!="1"){
|
105
|
+
Swal.fire("为有思想政治觉悟,拥护中国共产党,追求无产阶级、共产主义、马克思主义的青年们致敬");
|
106
|
+
sessionStorage.setItem("isPopupWindow","1");
|
107
|
+
}
|
108
|
+
}
|
109
|
+
if(m==6&&dd==1){//儿童节
|
110
|
+
console.log("各位小朋友们,儿童节快乐!");
|
111
|
+
if(sessionStorage.getItem("isPopupWindow")!="1"){
|
112
|
+
Swal.fire("各位小朋友们,儿童节快乐!");
|
113
|
+
sessionStorage.setItem("isPopupWindow","1");
|
114
|
+
}
|
115
|
+
}
|
116
|
+
if(m==7&&dd==1){//建党节
|
117
|
+
console.log("中国共产党"+(y-1921).toString()+"岁生日快乐");
|
118
|
+
if(sessionStorage.getItem("isPopupWindow")!="1"){
|
119
|
+
Swal.fire("中国共产党"+(y-1921).toString()+"岁生日快乐");
|
120
|
+
sessionStorage.setItem("isPopupWindow","1");
|
121
|
+
}
|
122
|
+
}
|
123
|
+
|
124
|
+
//传统节日部分
|
125
|
+
|
126
|
+
if(m==4&&dd==4||(m==4&&dd==5)){//清明节
|
127
|
+
console.log("清明安康");
|
128
|
+
if(sessionStorage.getItem("isPopupWindow")!="1"){
|
129
|
+
Swal.fire("清明安康");
|
130
|
+
sessionStorage.setItem("isPopupWindow","1");
|
131
|
+
}
|
132
|
+
}
|
133
|
+
|
134
|
+
var lunar=calendarFormatter.solar2lunar();
|
135
|
+
|
136
|
+
//农历采用汉字计算,防止出现闰月导致问题
|
137
|
+
|
138
|
+
if((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"]=="廿九")){
|
139
|
+
//春节,本来只有大年三十到初六,但是有时候除夕是大年二十九,所以也加上了
|
140
|
+
console.log(y.toString()+"年新年快乐!");
|
141
|
+
if(sessionStorage.getItem("isPopupWindow")!="1"){
|
142
|
+
Swal.fire(y.toString()+"年新年快乐!");
|
143
|
+
sessionStorage.setItem("isPopupWindow","1");
|
144
|
+
}
|
145
|
+
}
|
146
|
+
if((lunar["IMonthCn"]=="正月"&&lunar["IDayCn"]=="十五")){
|
147
|
+
//元宵节
|
148
|
+
console.log("元宵节快乐!");
|
149
|
+
if(sessionStorage.getItem("isPopupWindow")!="1"){
|
150
|
+
Swal.fire("元宵节快乐!");
|
151
|
+
sessionStorage.setItem("isPopupWindow","1");
|
152
|
+
}
|
153
|
+
}
|
154
|
+
if((lunar["IMonthCn"]=="正月"&&lunar["IDayCn"]=="十五")){
|
155
|
+
//元宵节
|
156
|
+
console.log("元宵节快乐!");
|
157
|
+
if(sessionStorage.getItem("isPopupWindow")!="1"){
|
158
|
+
Swal.fire("元宵节快乐!");
|
159
|
+
sessionStorage.setItem("isPopupWindow","1");
|
160
|
+
}
|
161
|
+
}
|
162
|
+
if((lunar["IMonthCn"]=="五月"&&lunar["IDayCn"]=="初五")){
|
163
|
+
//端午节
|
164
|
+
console.log("端午节快乐!");
|
165
|
+
if(sessionStorage.getItem("isPopupWindow")!="1"){
|
166
|
+
Swal.fire("端午节快乐!");
|
167
|
+
sessionStorage.setItem("isPopupWindow","1");
|
168
|
+
}
|
169
|
+
}
|
170
|
+
if((lunar["IMonthCn"]=="七月"&&lunar["IDayCn"]=="初七")){
|
171
|
+
//七夕节
|
172
|
+
console.log("七夕节快乐!");
|
173
|
+
if(sessionStorage.getItem("isPopupWindow")!="1"){
|
174
|
+
Swal.fire("七夕节快乐!");
|
175
|
+
sessionStorage.setItem("isPopupWindow","1");
|
176
|
+
}
|
177
|
+
}
|
178
|
+
if((lunar["IMonthCn"]=="八月"&&lunar["IDayCn"]=="十五")){
|
179
|
+
//中秋节
|
180
|
+
console.log("中秋节快乐!");
|
181
|
+
if(sessionStorage.getItem("isPopupWindow")!="1"){
|
182
|
+
Swal.fire("中秋节快乐!");
|
183
|
+
sessionStorage.setItem("isPopupWindow","1");
|
184
|
+
}
|
185
|
+
}
|
186
|
+
if((lunar["IMonthCn"]=="九月"&&lunar["IDayCn"]=="初九")){
|
187
|
+
//重阳节
|
188
|
+
console.log("重阳节快乐!");
|
189
|
+
if(sessionStorage.getItem("isPopupWindow")!="1"){
|
190
|
+
Swal.fire("重阳节快乐!");
|
191
|
+
sessionStorage.setItem("isPopupWindow","1");
|
192
|
+
}
|
193
|
+
}
|
194
|
+
// console.log("江爷爷一路走好!🕯️🕯️🕯️\n=================================================================")
|
195
|
+
// document.getElementById("grays").innerText=":root{filter: grayscale(100%);}";
|
196
|
+
// if(sessionStorage.getItem("isPopupWindow")!="1"){
|
197
|
+
// Swal.fire("江爷爷一路走好!🕯️🕯️🕯️");
|
198
|
+
// sessionStorage.setItem("isPopupWindow","1");
|
199
|
+
// }
|
package/js/dianzan.js
ADDED
@@ -0,0 +1,249 @@
|
|
1
|
+
// function setCookie(cname, cvalue) {
|
2
|
+
// // var d = new Date();
|
3
|
+
// // d.setTime(d.getTime()+(exdays*24*60*60*1000));
|
4
|
+
// // var expires = "expires="+d.toGMTString();
|
5
|
+
// // document.cookie = cname + "=" + cvalue + "; " + expires;
|
6
|
+
// document.cookie = cname + "=" + cvalue + ";";
|
7
|
+
// }
|
8
|
+
// function getCookie(cname) {
|
9
|
+
// var name = cname + "=";
|
10
|
+
// var ca = document.cookie.split(';');
|
11
|
+
// for (var i = 0; i < ca.length; i++) {
|
12
|
+
// var c = ca[i].trim();
|
13
|
+
// if (c.indexOf(name) == 0) return c.substring(name.length, c.length);
|
14
|
+
// }
|
15
|
+
// return "";
|
16
|
+
// }
|
17
|
+
// function GetUrlRelativePath() {
|
18
|
+
// var url = document.location.toString();
|
19
|
+
// var arrUrl = url.split("//");
|
20
|
+
|
21
|
+
// var start = arrUrl[1].indexOf("/");
|
22
|
+
// var relUrl = arrUrl[1].substring(start);
|
23
|
+
|
24
|
+
// if (relUrl.indexOf("?") != -1) {
|
25
|
+
// relUrl = relUrl.split("?")[0];
|
26
|
+
// }
|
27
|
+
// return relUrl;
|
28
|
+
// }
|
29
|
+
// $(document).ready(function () {
|
30
|
+
// const {
|
31
|
+
// Query,
|
32
|
+
// User
|
33
|
+
// } = AV;
|
34
|
+
// AV.init({
|
35
|
+
// appId: "IvW3T1NjMoh7OmKEdAz1tM0o-gzGzoHsz",
|
36
|
+
// appKey: "vG8s9ukVO5bgozEHzR923dew",
|
37
|
+
// serverURL: "https://ivw3t1nj.lc-cn-n1-shared.com"
|
38
|
+
// });
|
39
|
+
// var dianzans = [];
|
40
|
+
// var hrefs = [];
|
41
|
+
// var ids = [];
|
42
|
+
// const query2 = new AV.Query('dianzan');
|
43
|
+
// query2.find().then((dzs) => {
|
44
|
+
// for (i = dzs.length - 1; i >= 0; i--) {
|
45
|
+
// dianzans.push(dzs[i]["attributes"]["count"]);
|
46
|
+
// hrefs.push(dzs[i]["attributes"]["href"]);
|
47
|
+
// ids.push(dzs[i]["id"])
|
48
|
+
// }
|
49
|
+
// index = hrefs.indexOf(GetUrlRelativePath());
|
50
|
+
// console.log(dianzans[index])
|
51
|
+
// if (dianzans[index] === undefined) {
|
52
|
+
// document.getElementsByClassName("dianzan-count")[0].innerText = "0";
|
53
|
+
// } else {
|
54
|
+
// document.getElementsByClassName("dianzan-count")[0].innerText = dianzans[index];
|
55
|
+
// }
|
56
|
+
// if (hrefs.indexOf(GetUrlRelativePath()) == -1) {
|
57
|
+
// const TestObject = AV.Object.extend('dianzan');
|
58
|
+
// const testObject = new TestObject();
|
59
|
+
// testObject.set('href', GetUrlRelativePath());
|
60
|
+
// testObject.set('count', 0);
|
61
|
+
// testObject.save();
|
62
|
+
// }
|
63
|
+
// });
|
64
|
+
// })
|
65
|
+
|
66
|
+
// function setCount() {
|
67
|
+
// var dianzans = [];
|
68
|
+
// var hrefs = [];
|
69
|
+
// var ids = [];
|
70
|
+
// const query2 = new AV.Query('dianzan');
|
71
|
+
// query2.find().then((dzs) => {
|
72
|
+
// for (i = dzs.length - 1; i >= 0; i--) {
|
73
|
+
// dianzans.push(dzs[i]["attributes"]["count"]);
|
74
|
+
// hrefs.push(dzs[i]["attributes"]["href"]);
|
75
|
+
// ids.push(dzs[i]["id"])
|
76
|
+
// }
|
77
|
+
// index = hrefs.indexOf(GetUrlRelativePath());
|
78
|
+
// console.log(dianzans[index])
|
79
|
+
// if (dianzans[index] === undefined) {
|
80
|
+
// document.getElementsByClassName("dianzan-count")[0].innerText = "0";
|
81
|
+
// } else {
|
82
|
+
// document.getElementsByClassName("dianzan-count")[0].innerText = dianzans[index];
|
83
|
+
// }
|
84
|
+
// });
|
85
|
+
// if (getCookie(GetUrlRelativePath() + "isZaned") == "1") {
|
86
|
+
// document.getElementsByClassName("fa-thumbs-up")[0].setAttribute("style", "color:var(--lyx-blue)!important")
|
87
|
+
// }
|
88
|
+
// else {
|
89
|
+
// document.getElementsByClassName("fa-thumbs-up")[0].setAttribute("style", "")
|
90
|
+
// }
|
91
|
+
// }
|
92
|
+
|
93
|
+
// function dianzan() {
|
94
|
+
// if (getCookie(GetUrlRelativePath() + "isZaned") != "1") {
|
95
|
+
// // try {
|
96
|
+
// var dianzans = [];
|
97
|
+
// var hrefs = [];
|
98
|
+
// var ids = [];
|
99
|
+
// const query = new AV.Query('dianzan');
|
100
|
+
// query.find().then((dzs) => {
|
101
|
+
// for (i = dzs.length - 1; i >= 0; i--) {
|
102
|
+
// dianzans.push(dzs[i]["attributes"]["count"]);
|
103
|
+
// hrefs.push(dzs[i]["attributes"]["href"]);
|
104
|
+
// ids.push(dzs[i]["id"])
|
105
|
+
// }
|
106
|
+
// index = hrefs.indexOf(GetUrlRelativePath());
|
107
|
+
// console.log(ids[index])
|
108
|
+
// query.get(ids[index]).then((todo) => {
|
109
|
+
// todo.set('count', dianzans[index] + 1);
|
110
|
+
// todo.save();
|
111
|
+
// setCookie(GetUrlRelativePath() + "isZaned", "1")
|
112
|
+
// setCount();
|
113
|
+
// });
|
114
|
+
|
115
|
+
// });
|
116
|
+
// // } catch (err) {
|
117
|
+
|
118
|
+
// // }
|
119
|
+
// }
|
120
|
+
// else {
|
121
|
+
// try {
|
122
|
+
// var dianzans = [];
|
123
|
+
// var hrefs = [];
|
124
|
+
// var ids = [];
|
125
|
+
// const query = new AV.Query('dianzan');
|
126
|
+
// query.find().then((dzs) => {
|
127
|
+
// for (i = dzs.length - 1; i >= 0; i--) {
|
128
|
+
// dianzans.push(dzs[i]["attributes"]["count"]);
|
129
|
+
// hrefs.push(dzs[i]["attributes"]["href"]);
|
130
|
+
// ids.push(dzs[i]["id"])
|
131
|
+
// }
|
132
|
+
// index = hrefs.indexOf(GetUrlRelativePath());
|
133
|
+
// console.log(ids[index])
|
134
|
+
// query.get(ids[index]).then((todo) => {
|
135
|
+
// todo.set('count', dianzans[index] - 1);
|
136
|
+
// todo.save();
|
137
|
+
// setCookie(GetUrlRelativePath() + "isZaned", "0");
|
138
|
+
// setCount();
|
139
|
+
// });
|
140
|
+
|
141
|
+
// });
|
142
|
+
// } catch (err) { }
|
143
|
+
// }
|
144
|
+
// }
|
145
|
+
|
146
|
+
function GetUrlRelativePath() {
|
147
|
+
var url = document.location.toString();
|
148
|
+
var arrUrl = url.split("//");
|
149
|
+
|
150
|
+
var start = arrUrl[1].indexOf("/");
|
151
|
+
var relUrl = arrUrl[1].substring(start);
|
152
|
+
|
153
|
+
if (relUrl.indexOf("?") != -1) {
|
154
|
+
relUrl = relUrl.split("?")[0];
|
155
|
+
}
|
156
|
+
return relUrl;
|
157
|
+
}
|
158
|
+
loadDianzan=(function () {
|
159
|
+
const {
|
160
|
+
Query,
|
161
|
+
User
|
162
|
+
} = AV;
|
163
|
+
AV.init({
|
164
|
+
appId: "IvW3T1NjMoh7OmKEdAz1tM0o-gzGzoHsz",
|
165
|
+
appKey: "vG8s9ukVO5bgozEHzR923dew",
|
166
|
+
serverURL: "https://ivw3t1nj.lc-cn-n1-shared.com"
|
167
|
+
});
|
168
|
+
var dianzans = [];
|
169
|
+
var hrefs = [];
|
170
|
+
var ids = [];
|
171
|
+
const query2 = new AV.Query('dianzan');
|
172
|
+
query2.find().then((dzs) => {
|
173
|
+
for (i = dzs.length - 1; i >= 0; i--) {
|
174
|
+
dianzans.push(dzs[i]["attributes"]["count"]);
|
175
|
+
hrefs.push(dzs[i]["attributes"]["href"]);
|
176
|
+
ids.push(dzs[i]["id"])
|
177
|
+
}
|
178
|
+
index = hrefs.indexOf(GetUrlRelativePath());
|
179
|
+
console.log(dianzans[index])
|
180
|
+
if (dianzans[index] === undefined) {
|
181
|
+
document.getElementsByClassName("dianzan-count")[0].innerText = "0";
|
182
|
+
} else {
|
183
|
+
document.getElementsByClassName("dianzan-count")[0].innerText = dianzans[index];
|
184
|
+
}
|
185
|
+
});
|
186
|
+
})
|
187
|
+
|
188
|
+
document.addEventListener("DOMContentLoaded",loadDianzan);
|
189
|
+
document.addEventListener("pjax:complete",loadDianzan);
|
190
|
+
|
191
|
+
function setCount() {
|
192
|
+
var dianzans = [];
|
193
|
+
var hrefs = [];
|
194
|
+
var ids = [];
|
195
|
+
const query2 = new AV.Query('dianzan');
|
196
|
+
query2.find().then((dzs) => {
|
197
|
+
for (i = dzs.length - 1; i >= 0; i--) {
|
198
|
+
dianzans.push(dzs[i]["attributes"]["count"]);
|
199
|
+
hrefs.push(dzs[i]["attributes"]["href"]);
|
200
|
+
ids.push(dzs[i]["id"])
|
201
|
+
}
|
202
|
+
index = hrefs.indexOf(GetUrlRelativePath());
|
203
|
+
console.log(dianzans[index])
|
204
|
+
if (dianzans[index] === undefined) {
|
205
|
+
document.getElementsByClassName("dianzan-count")[0].innerText = "1";
|
206
|
+
} else {
|
207
|
+
document.getElementsByClassName("dianzan-count")[0].innerText = dianzans[index] + 1;
|
208
|
+
}
|
209
|
+
});
|
210
|
+
}
|
211
|
+
|
212
|
+
function dianzan() {
|
213
|
+
try {
|
214
|
+
var dianzans = [];
|
215
|
+
var hrefs = [];
|
216
|
+
var ids = [];
|
217
|
+
const query = new AV.Query('dianzan');
|
218
|
+
query.find().then((dzs) => {
|
219
|
+
for (i = dzs.length - 1; i >= 0; i--) {
|
220
|
+
dianzans.push(dzs[i]["attributes"]["count"]);
|
221
|
+
hrefs.push(dzs[i]["attributes"]["href"]);
|
222
|
+
ids.push(dzs[i]["id"])
|
223
|
+
}
|
224
|
+
if (hrefs.indexOf(GetUrlRelativePath()) == -1) {
|
225
|
+
console.log(1)
|
226
|
+
const TestObject = AV.Object.extend('dianzan');
|
227
|
+
const testObject = new TestObject();
|
228
|
+
testObject.set('href', GetUrlRelativePath());
|
229
|
+
testObject.set('count', 1);
|
230
|
+
testObject.save();
|
231
|
+
} else {
|
232
|
+
index = hrefs.indexOf(GetUrlRelativePath());
|
233
|
+
console.log(ids[index])
|
234
|
+
query.get(ids[index]).then((todo) => {
|
235
|
+
todo.set('count', dianzans[index] + 1);
|
236
|
+
todo.save();
|
237
|
+
});
|
238
|
+
}
|
239
|
+
setCount();
|
240
|
+
});
|
241
|
+
} catch (err) {
|
242
|
+
const TestObject = AV.Object.extend('dianzan');
|
243
|
+
const testObject = new TestObject();
|
244
|
+
testObject.set('href', GetUrlRelativePath());
|
245
|
+
testObject.set('count', 1);
|
246
|
+
testObject.save();
|
247
|
+
}
|
248
|
+
|
249
|
+
}
|