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/dis.js
ADDED
@@ -0,0 +1,255 @@
|
|
1
|
+
document.addEventListener('pjax:complete', todis);
|
2
|
+
document.addEventListener('DOMContentLoaded', todis);
|
3
|
+
function todis(){
|
4
|
+
$.ajax({
|
5
|
+
type: 'get',
|
6
|
+
url: 'https://apis.map.qq.com/ws/location/v1/ip',
|
7
|
+
data: {
|
8
|
+
key: 'T3EBZ-TJ7LI-YRBG2-5ZLUR-KD3OS-U6BJO',
|
9
|
+
output: 'jsonp',
|
10
|
+
},
|
11
|
+
dataType: 'jsonp',
|
12
|
+
success: function (res) {
|
13
|
+
ipLoacation = res;
|
14
|
+
function getDistance(e1, n1, e2, n2) {
|
15
|
+
const R = 6371
|
16
|
+
const { sin, cos, asin, PI, hypot } = Math
|
17
|
+
|
18
|
+
let getPoint = (e, n) => {
|
19
|
+
e *= PI / 180
|
20
|
+
n *= PI / 180
|
21
|
+
return { x: cos(n) * cos(e), y: cos(n) * sin(e), z: sin(n) }
|
22
|
+
}
|
23
|
+
|
24
|
+
let a = getPoint(e1, n1)
|
25
|
+
let b = getPoint(e2, n2)
|
26
|
+
let c = hypot(a.x - b.x, a.y - b.y, a.z - b.z)
|
27
|
+
let r = asin(c / 2) * 2 * R
|
28
|
+
return Math.round(r);
|
29
|
+
}
|
30
|
+
|
31
|
+
function showWelcome() {
|
32
|
+
|
33
|
+
let dist = getDistance(113.89401, 22.59043, ipLoacation.result.location.lng, ipLoacation.result.location.lat);
|
34
|
+
|
35
|
+
let pos = ipLoacation.result.ad_info.nation;
|
36
|
+
let posdesc;
|
37
|
+
switch (ipLoacation.result.ad_info.nation) {
|
38
|
+
case "日本":
|
39
|
+
posdesc = "よろしく,一起去看樱花吗";
|
40
|
+
break;
|
41
|
+
case "美国":
|
42
|
+
posdesc = "Make America Great Again!";
|
43
|
+
break;
|
44
|
+
case "英国":
|
45
|
+
posdesc = "想同你一起夜乘伦敦眼";
|
46
|
+
break;
|
47
|
+
case "俄罗斯":
|
48
|
+
posdesc = "干了这瓶伏特加!";
|
49
|
+
break;
|
50
|
+
case "法国":
|
51
|
+
posdesc = "C'est La Vie";
|
52
|
+
break;
|
53
|
+
case "德国":
|
54
|
+
posdesc = "Die Zeit verging im Fluge.";
|
55
|
+
break;
|
56
|
+
case "澳大利亚":
|
57
|
+
posdesc = "一起去大堡礁吧!";
|
58
|
+
break;
|
59
|
+
case "加拿大":
|
60
|
+
posdesc = "拾起一片枫叶赠予你";
|
61
|
+
break;
|
62
|
+
case "中国":
|
63
|
+
pos = ipLoacation.result.ad_info.province + " " + ipLoacation.result.ad_info.city;
|
64
|
+
switch (ipLoacation.result.ad_info.province) {
|
65
|
+
case "北京市":
|
66
|
+
posdesc = "北——京——欢迎你~~~";
|
67
|
+
break;
|
68
|
+
case "天津市":
|
69
|
+
posdesc = "讲段相声吧。";
|
70
|
+
break;
|
71
|
+
case "重庆市":
|
72
|
+
posdesc = "老乡!!!"
|
73
|
+
break;
|
74
|
+
case "河北省":
|
75
|
+
posdesc = "山势巍巍成壁垒,天下雄关。铁马金戈由此向,无限江山。";
|
76
|
+
break;
|
77
|
+
case "山西省":
|
78
|
+
posdesc = "展开坐具长三尺,已占山河五百余。";
|
79
|
+
break;
|
80
|
+
case "内蒙古自治区":
|
81
|
+
posdesc = "天苍苍,野茫茫,风吹草低见牛羊。";
|
82
|
+
break;
|
83
|
+
case "辽宁省":
|
84
|
+
posdesc = "我想吃烤鸡架!";
|
85
|
+
break;
|
86
|
+
case "吉林省":
|
87
|
+
posdesc = "状元阁就是东北烧烤之王。";
|
88
|
+
break;
|
89
|
+
case "黑龙江省":
|
90
|
+
posdesc = "很喜欢哈尔滨大剧院。";
|
91
|
+
break;
|
92
|
+
case "上海市":
|
93
|
+
posdesc = "众所周知,中国只有两个城市。";
|
94
|
+
break;
|
95
|
+
case "江苏省":
|
96
|
+
switch (ipLoacation.result.ad_info.city) {
|
97
|
+
case "南京市":
|
98
|
+
posdesc = "欢迎来自安徽省南京市的小伙伴。";
|
99
|
+
break;
|
100
|
+
case "苏州市":
|
101
|
+
posdesc = "上有天堂,下有苏杭。";
|
102
|
+
break;
|
103
|
+
default:
|
104
|
+
posdesc = "散装是必须要散装的。";
|
105
|
+
break;
|
106
|
+
}
|
107
|
+
break;
|
108
|
+
case "浙江省":
|
109
|
+
posdesc = "东风渐绿西湖柳,雁已还人未南归。";
|
110
|
+
break;
|
111
|
+
case "安徽省":
|
112
|
+
posdesc = "蚌埠住了,芜湖起飞。";
|
113
|
+
break;
|
114
|
+
case "福建省":
|
115
|
+
posdesc = "井邑白云间,岩城远带山。";
|
116
|
+
break;
|
117
|
+
case "江西省":
|
118
|
+
posdesc = "落霞与孤鹜齐飞,秋水共长天一色。";
|
119
|
+
break;
|
120
|
+
case "山东省":
|
121
|
+
posdesc = "遥望齐州九点烟,一泓海水杯中泻。";
|
122
|
+
break;
|
123
|
+
case "湖北省":
|
124
|
+
posdesc = "来碗热干面!";
|
125
|
+
break;
|
126
|
+
case "湖南省":
|
127
|
+
posdesc = "74751,长沙斯塔克。";
|
128
|
+
break;
|
129
|
+
case "广东省":
|
130
|
+
posdesc = "老板来两斤福建人。";
|
131
|
+
break;
|
132
|
+
case "广西壮族自治区":
|
133
|
+
posdesc = "桂林山水甲天下。";
|
134
|
+
break;
|
135
|
+
case "海南省":
|
136
|
+
posdesc = "朝观日出逐白浪,夕看云起收霞光。";
|
137
|
+
break;
|
138
|
+
case "四川省":
|
139
|
+
posdesc = "康康川妹子。";
|
140
|
+
break;
|
141
|
+
case "贵州省":
|
142
|
+
posdesc = "茅台,学生,再塞200。";
|
143
|
+
break;
|
144
|
+
case "云南省":
|
145
|
+
posdesc = "玉龙飞舞云缠绕,万仞冰川直耸天。";
|
146
|
+
break;
|
147
|
+
case "西藏自治区":
|
148
|
+
posdesc = "躺在茫茫草原上,仰望蓝天。";
|
149
|
+
break;
|
150
|
+
case "陕西省":
|
151
|
+
posdesc = "来份臊子面加馍。";
|
152
|
+
break;
|
153
|
+
case "甘肃省":
|
154
|
+
posdesc = "羌笛何须怨杨柳,春风不度玉门关。";
|
155
|
+
break;
|
156
|
+
case "青海省":
|
157
|
+
posdesc = "牛肉干和老酸奶都好好吃。";
|
158
|
+
break;
|
159
|
+
case "宁夏回族自治区":
|
160
|
+
posdesc = "大漠孤烟直,长河落日圆。";
|
161
|
+
break;
|
162
|
+
case "新疆维吾尔自治区":
|
163
|
+
posdesc = "驼铃古道丝绸路,胡马犹闻唐汉风。";
|
164
|
+
break;
|
165
|
+
case "台湾省":
|
166
|
+
posdesc = "我在这头,大陆在那头。";
|
167
|
+
break;
|
168
|
+
case "香港特别行政区":
|
169
|
+
posdesc = "永定贼有残留地鬼嚎,迎击光非岁玉。";
|
170
|
+
break;
|
171
|
+
case "澳门特别行政区":
|
172
|
+
posdesc = "性感荷官,在线发牌。";
|
173
|
+
break;
|
174
|
+
default:
|
175
|
+
posdesc = "社会主义大法好。";
|
176
|
+
break;
|
177
|
+
}
|
178
|
+
break;
|
179
|
+
default:
|
180
|
+
posdesc = "带我去你的国家逛逛吧。";
|
181
|
+
break;
|
182
|
+
}
|
183
|
+
|
184
|
+
//判断时间
|
185
|
+
let timeChange;
|
186
|
+
let date = new Date();
|
187
|
+
if (date.getHours()>= 5 && date.getHours() < 11) timeChange = "<span>上午好</span>,一日之计在于晨";
|
188
|
+
else if (date.getHours()>= 1 && date.getHours() < 13) timeChange = "<span>中午好</span>,该摸鱼吃午饭了";
|
189
|
+
else if (date.getHours() >= 13 && date.getHours() < 15) timeChange = "<span>下午好</span>,懒懒地睡个午觉吧!";
|
190
|
+
else if (date.getHours() >= 15 && date.getHours() < 16) timeChange = "<span>三点几啦</span>,饮茶先啦!";
|
191
|
+
else if (date.getHours() >= 16 && date.getHours() < 19) timeChange = "<span>夕阳无限好!</span>";
|
192
|
+
else if (date.getHours() >= 19 && date.getHours() < 24) timeChange = "<span>晚上好</span>,夜生活嗨起来!";
|
193
|
+
else timeChange = "夜深了,早点休息,少熬夜";
|
194
|
+
|
195
|
+
document.getElementsByClassName("announcement_content")[0].innerHTML =
|
196
|
+
`欢迎来自<span>${pos}</span>的小伙伴,${timeChange}<br>
|
197
|
+
你距离Q78KG约有<span>${dist}</span>公里,${posdesc}
|
198
|
+
<br>
|
199
|
+
|
200
|
+
<br>
|
201
|
+
<a href="https://icp.gov.moe/?keyword=20220146" target="_blank">萌ICP备20220146号</a>
|
202
|
+
`;
|
203
|
+
}
|
204
|
+
showWelcome()
|
205
|
+
}
|
206
|
+
})
|
207
|
+
function switchPostChart () {
|
208
|
+
let color = document.documentElement.getAttribute('data-theme') === 'light' ? '#4C4948' : 'rgba(255,255,255,0.7)'
|
209
|
+
if (document.getElementById('posts-chart') && postsOption) {
|
210
|
+
try {
|
211
|
+
let postsOptionNew = postsOption
|
212
|
+
postsOptionNew.title.textStyle.color = color
|
213
|
+
postsOptionNew.xAxis.nameTextStyle.color = color
|
214
|
+
postsOptionNew.yAxis.nameTextStyle.color = color
|
215
|
+
postsOptionNew.xAxis.axisLabel.color = color
|
216
|
+
postsOptionNew.yAxis.axisLabel.color = color
|
217
|
+
postsOptionNew.xAxis.axisLine.lineStyle.color = color
|
218
|
+
postsOptionNew.yAxis.axisLine.lineStyle.color = color
|
219
|
+
postsOptionNew.series[0].markLine.data[0].label.color = color
|
220
|
+
postsChart.setOption(postsOptionNew)
|
221
|
+
} catch (error) {
|
222
|
+
console.log(error)
|
223
|
+
}
|
224
|
+
}
|
225
|
+
if (document.getElementById('tags-chart') && tagsOption) {
|
226
|
+
try {
|
227
|
+
let tagsOptionNew = tagsOption
|
228
|
+
tagsOptionNew.title.textStyle.color = color
|
229
|
+
tagsOptionNew.xAxis.nameTextStyle.color = color
|
230
|
+
tagsOptionNew.yAxis.nameTextStyle.color = color
|
231
|
+
tagsOptionNew.xAxis.axisLabel.color = color
|
232
|
+
tagsOptionNew.yAxis.axisLabel.color = color
|
233
|
+
tagsOptionNew.xAxis.axisLine.lineStyle.color = color
|
234
|
+
tagsOptionNew.yAxis.axisLine.lineStyle.color = color
|
235
|
+
tagsOptionNew.series[0].markLine.data[0].label.color = color
|
236
|
+
tagsChart.setOption(tagsOptionNew)
|
237
|
+
} catch (error) {
|
238
|
+
console.log(error)
|
239
|
+
}
|
240
|
+
}
|
241
|
+
if (document.getElementById('categories-chart') && categoriesOption) {
|
242
|
+
try {
|
243
|
+
let categoriesOptionNew = categoriesOption
|
244
|
+
categoriesOptionNew.title.textStyle.color = color
|
245
|
+
categoriesOptionNew.legend.textStyle.color = color
|
246
|
+
if (!categoryParentFlag) { categoriesOptionNew.series[0].label.color = color }
|
247
|
+
categoriesChart.setOption(categoriesOptionNew)
|
248
|
+
} catch (error) {
|
249
|
+
console.log(error)
|
250
|
+
}
|
251
|
+
}
|
252
|
+
}
|
253
|
+
document.querySelector(".rightMenu-item:has(.fa-moon)").addEventListener("click", function () { setTimeout(switchPostChart, 100) })
|
254
|
+
document.getElementById("con-mode").addEventListener("click", function () { setTimeout(switchPostChart, 100) })}
|
255
|
+
//
|
@@ -0,0 +1,102 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
if (document.getElementById('history-container')) {
|
4
|
+
var append = function append(parent, text) {
|
5
|
+
if (typeof text === 'string') {
|
6
|
+
var temp = document.createElement('div');
|
7
|
+
temp.innerHTML = text; // 防止元素太多 进行提速
|
8
|
+
|
9
|
+
var frag = document.createDocumentFragment();
|
10
|
+
|
11
|
+
while (temp.firstChild) {
|
12
|
+
frag.appendChild(temp.firstChild);
|
13
|
+
}
|
14
|
+
|
15
|
+
parent.appendChild(frag);
|
16
|
+
} else {
|
17
|
+
parent.appendChild(text);
|
18
|
+
}
|
19
|
+
};
|
20
|
+
|
21
|
+
var history_get_data = function history_get_data() {
|
22
|
+
var myDate = new Date();
|
23
|
+
var myMonth = myDate.getMonth() + 1;
|
24
|
+
|
25
|
+
if (myMonth < 10) {
|
26
|
+
getMonth = "0" + String(myMonth);
|
27
|
+
} else {
|
28
|
+
getMonth = String(myMonth);
|
29
|
+
}
|
30
|
+
|
31
|
+
var getDate = String(myDate.getDate());
|
32
|
+
|
33
|
+
if (getDate < 10) {
|
34
|
+
getDate = "0" + String(getDate);
|
35
|
+
} else {
|
36
|
+
getDate = String(getDate);
|
37
|
+
}
|
38
|
+
|
39
|
+
var getMonthDate = "S" + getMonth + getDate;
|
40
|
+
return ["https://jsd.anjiurine.top/gh/Zfour/Butterfly-card-history@latest/baiduhistory/json/" + getMonth + ".json", getMonthDate];
|
41
|
+
};
|
42
|
+
|
43
|
+
var history_data = history_get_data();
|
44
|
+
fetch(history_data[0]).then(function (data) {
|
45
|
+
return data.json();
|
46
|
+
}).then(function (data) {
|
47
|
+
console.log(data[history_data[1]]);
|
48
|
+
html_item = '';
|
49
|
+
var _iteratorNormalCompletion = true;
|
50
|
+
var _didIteratorError = false;
|
51
|
+
var _iteratorError = undefined;
|
52
|
+
|
53
|
+
try {
|
54
|
+
for (var _iterator = data[history_data[1]][Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
55
|
+
var item = _step.value;
|
56
|
+
html_item += '<div class="swiper-slide history_slide"><span class="history_slide_time">A.D.' + item.year + '</span>' + '<span class="history_slide_link">' + item.title + '</span></div>';
|
57
|
+
}
|
58
|
+
} catch (err) {
|
59
|
+
_didIteratorError = true;
|
60
|
+
_iteratorError = err;
|
61
|
+
} finally {
|
62
|
+
try {
|
63
|
+
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
64
|
+
_iterator["return"]();
|
65
|
+
}
|
66
|
+
} finally {
|
67
|
+
if (_didIteratorError) {
|
68
|
+
throw _iteratorError;
|
69
|
+
}
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
var history_container_wrapper = document.getElementById('history_container_wrapper');
|
74
|
+
append(history_container_wrapper, html_item);
|
75
|
+
var swiper_history = new Swiper('.history_swiper-container', {
|
76
|
+
passiveListeners: true,
|
77
|
+
spaceBetween: 30,
|
78
|
+
effect: 'coverflow',
|
79
|
+
coverflowEffect: {
|
80
|
+
rotate: 30,
|
81
|
+
slideShadows: false
|
82
|
+
},
|
83
|
+
loop: true,
|
84
|
+
direction: 'vertical',
|
85
|
+
autoplay: {
|
86
|
+
disableOnInteraction: true,
|
87
|
+
delay: 5000
|
88
|
+
},
|
89
|
+
mousewheel: false // autoHeight: true,
|
90
|
+
|
91
|
+
});
|
92
|
+
var history_comtainer = document.getElementById('history-container');
|
93
|
+
|
94
|
+
history_comtainer.onmouseenter = function () {
|
95
|
+
swiper_history.autoplay.stop();
|
96
|
+
};
|
97
|
+
|
98
|
+
history_comtainer.onmouseleave = function () {
|
99
|
+
swiper_history.autoplay.start();
|
100
|
+
};
|
101
|
+
});
|
102
|
+
}
|