q78kgblog 0.0.0-1720441708496 → 0.0.0-1720859005089
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/404.html +3 -3
- package/about/index.html +5 -5
- package/archives/2023/02/index.html +4 -4
- package/archives/2023/04/index.html +4 -4
- package/archives/2023/05/index.html +4 -4
- package/archives/2023/08/index.html +4 -4
- package/archives/2023/09/index.html +4 -4
- package/archives/2023/index.html +4 -4
- package/archives/2024/01/index.html +4 -4
- package/archives/2024/02/index.html +4 -4
- package/archives/2024/index.html +4 -4
- package/archives/index.html +4 -4
- package/atom.xml +9 -9
- package/baidusitemap.xml +8 -8
- package/bangumis/index.html +4 -4
- package/bigpie/index.html +3 -3
- package/categories/Hexo/index.html +4 -4
- package/categories/index.html +3 -3
- package/categories//345/271/264/347/273/210/346/200/273/347/273/223/index.html +4 -4
- package/categories//347/264/240/346/235/220/index.html +4 -4
- package/categories//351/227/262/350/201/212/346/235/202/350/260/210/index.html +4 -4
- package/content.json +1 -1
- package/css/404page.css +1 -65
- package/css/ariasakablog.css +1 -6669
- package/css/commentBarrage.css +1 -118
- package/css/danmaku.css +1 -106
- package/css/essay.css +1 -306
- package/css/iconfont.css +1 -55
- package/css/index.css +1 -7006
- package/css/people.css +1 -18
- package/css/stylessimple.css +1 -40
- package/css/swiperstyle.css +1 -567
- package/fcircle/index.html +3 -3
- package/fontawesome/index.html +3 -3
- package/index.html +11 -11
- package/js/aplayersave.js +1 -268
- package/js/baiduhistory.js +1 -76
- package/js/browser.js +1 -35
- package/js/calendar.js +1 -380
- package/js/cate.js +1 -22
- package/js/commentBarrage.js +17 -232
- package/js/commentsCount.js +1 -43
- package/js/copy.js +1 -23
- package/js/countup.js +1 -209
- package/js/cursor.js +1 -82
- package/js/danmaku.js +0 -106
- package/js/day.js +13 -195
- package/js/dianzan.js +1 -249
- package/js/dis.js +4 -252
- package/js/dist/baiduhistory.dev.js +1 -102
- package/js/dist/bbtalk.dev.js +159 -12872
- package/js/dist/bbtalklunbo.dev.js +1 -45
- package/js/dist/calendar.dev.js +1 -395
- package/js/dist/fixbugpjax.dev.js +1 -8
- package/js/dist/gongnong.dev.js +1 -565
- package/js/dist/heimu.dev.js +1 -19
- package/js/dist/links.dev.js +1 -13
- package/js/dist/main.dev.js +5 -843
- package/js/dist/resizeTop.dev.js +1 -50
- package/js/dist/seo.dev.js +1 -33
- package/js/dist/twikoo.all.min.dev.js +946 -1
- package/js/fixbugpjax.js +1 -7
- package/js/fixed_card_widget.js +1 -46
- package/js/fps.js +1 -58
- package/js/gitalker.js +1 -11
- package/js/heimu.js +1 -16
- package/js/hide.show.js +1 -17
- package/js/languages.js +1 -511
- package/js/latest.js +1 -49
- package/js/local-search.js +2 -476
- package/js/lunar.js +1 -1071
- package/js/lyxTalk.js +1 -12
- package/js/main.js +5 -781
- package/js/nav.js +1 -30
- package/js/noie.js +1 -3
- package/js/owo.js +1 -52
- package/js/people.js +2 -175
- package/js/randomFriend.js +1 -95
- package/js/resizeTop.js +1 -43
- package/js/rightmenu.js +3 -333
- package/js/sakura.js +1 -164
- package/js/search/algolia.js +4 -154
- package/js/search/local-search.js +1 -188
- package/js/settings.js +3 -343
- package/js/sitetime.js +1 -25
- package/js/smooth-scrolling.js +1 -546
- package/js/sw-toolbox.js +1 -16
- package/js/swiperinit.js +1 -23
- package/js/tw_cn.js +1 -100
- package/js/utils.js +1 -278
- package/js/welcome.js +1 -107
- package/js/welcomeconsole.js +1 -23
- package/links/index.html +3 -3
- package/othersite/index.html +3 -3
- package/package.json +1 -1
- package/posts/164ef646/index.html +6 -6
- package/posts/228c2ef8/index.html +6 -6
- package/posts/a9a6c1fb/index.html +6 -6
- package/posts/c262e439/index.html +6 -6
- package/posts/c81531cf/index.html +6 -6
- package/posts/ccdf7cfc/index.html +6 -6
- package/posts/de1f83f4/index.html +6 -6
- package/posts/e54f7476/index.html +6 -6
- package/sitemap.xml +49 -49
- package/sw.js +2 -193
- package/swReg.js +1 -29
- package/tags/AI/index.html +5 -5
- package/tags/Butterfly/index.html +5 -5
- package/tags/Cloudflare/index.html +5 -5
- package/tags/DiffSinger/index.html +5 -5
- package/tags/Hexo/index.html +5 -5
- package/tags/Next/index.html +5 -5
- package/tags/RAID/index.html +5 -5
- package/tags/Vercel/index.html +5 -5
- package/tags/Workers/index.html +5 -5
- package/tags/index.html +3 -3
- package/tags//344/270/273/351/242/230/index.html +5 -5
- package/tags//345/206/231/344/275/234/index.html +5 -5
- package/tags//345/245/263/346/200/247/346/204/217/350/257/206/index.html +5 -5
- package/tags//345/255/246/344/271/240/index.html +5 -5
- package/tags//345/256/266/351/207/214/344/272/221/index.html +5 -5
- package/tags//345/271/264/347/273/210/346/200/273/347/273/223/index.html +5 -5
- package/tags//346/212/230/350/205/276/index.html +5 -5
- package/tags//346/227/245/345/270/270/index.html +5 -5
- package/tags//346/234/215/345/212/241/345/231/250/index.html +5 -5
- package/tags//346/265/252/346/275/256/index.html +5 -5
- package/tags//347/256/200/347/210/261/index.html +5 -5
- package/tags//350/207/252/345/212/250/346/240/207/346/263/250/index.html +5 -5
- package/tags//350/256/272/346/226/207/index.html +5 -5
- package/tags//350/260/267/346/255/214/347/277/273/350/257/221/index.html +5 -5
- package/tags//350/264/237/350/275/275/345/235/207/350/241/241/index.html +5 -5
- package/tags//351/207/221/345/217/245/index.html +5 -5
- package/tags//351/255/224/346/224/271/index.html +5 -5
package/js/dis.js
CHANGED
@@ -1,255 +1,7 @@
|
|
1
|
-
document.addEventListener(
|
2
|
-
|
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}
|
1
|
+
document.addEventListener("pjax:complete",todis),document.addEventListener("DOMContentLoaded",todis);function todis(){$.ajax({type:"get",url:"https://apis.map.qq.com/ws/location/v1/ip",data:{key:"T3EBZ-TJ7LI-YRBG2-5ZLUR-KD3OS-U6BJO",output:"jsonp"},dataType:"jsonp",success:function(t){ipLoacation=t;function a(i,r,e,o){const{sin:u,cos:n,asin:m,PI:g,hypot:y}=Math;let d=(p,c)=>(p*=g/180,c*=g/180,{x:n(c)*n(p),y:n(c)*u(p),z:u(c)}),l=d(i,r),b=d(e,o),f=y(l.x-b.x,l.y-b.y,l.z-b.z),L=m(f/2)*2*6371;return Math.round(L)}function x(){let i=a(113.89401,22.59043,ipLoacation.result.location.lng,ipLoacation.result.location.lat),r=ipLoacation.result.ad_info.nation,e;switch(ipLoacation.result.ad_info.nation){case"\u65E5\u672C":e="\u3088\u308D\u3057\u304F\uFF0C\u4E00\u8D77\u53BB\u770B\u6A31\u82B1\u5417";break;case"\u7F8E\u56FD":e="Make America Great Again!";break;case"\u82F1\u56FD":e="\u60F3\u540C\u4F60\u4E00\u8D77\u591C\u4E58\u4F26\u6566\u773C";break;case"\u4FC4\u7F57\u65AF":e="\u5E72\u4E86\u8FD9\u74F6\u4F0F\u7279\u52A0\uFF01";break;case"\u6CD5\u56FD":e="C'est La Vie";break;case"\u5FB7\u56FD":e="Die Zeit verging im Fluge.";break;case"\u6FB3\u5927\u5229\u4E9A":e="\u4E00\u8D77\u53BB\u5927\u5821\u7901\u5427\uFF01";break;case"\u52A0\u62FF\u5927":e="\u62FE\u8D77\u4E00\u7247\u67AB\u53F6\u8D60\u4E88\u4F60";break;case"\u4E2D\u56FD":switch(r=ipLoacation.result.ad_info.province+" "+ipLoacation.result.ad_info.city,ipLoacation.result.ad_info.province){case"\u5317\u4EAC\u5E02":e="\u5317\u2014\u2014\u4EAC\u2014\u2014\u6B22\u8FCE\u4F60~~~";break;case"\u5929\u6D25\u5E02":e="\u8BB2\u6BB5\u76F8\u58F0\u5427\u3002";break;case"\u91CD\u5E86\u5E02":e="\u8001\u4E61\uFF01\uFF01\uFF01";break;case"\u6CB3\u5317\u7701":e="\u5C71\u52BF\u5DCD\u5DCD\u6210\u58C1\u5792\uFF0C\u5929\u4E0B\u96C4\u5173\u3002\u94C1\u9A6C\u91D1\u6208\u7531\u6B64\u5411\uFF0C\u65E0\u9650\u6C5F\u5C71\u3002";break;case"\u5C71\u897F\u7701":e="\u5C55\u5F00\u5750\u5177\u957F\u4E09\u5C3A\uFF0C\u5DF2\u5360\u5C71\u6CB3\u4E94\u767E\u4F59\u3002";break;case"\u5185\u8499\u53E4\u81EA\u6CBB\u533A":e="\u5929\u82CD\u82CD\uFF0C\u91CE\u832B\u832B\uFF0C\u98CE\u5439\u8349\u4F4E\u89C1\u725B\u7F8A\u3002";break;case"\u8FBD\u5B81\u7701":e="\u6211\u60F3\u5403\u70E4\u9E21\u67B6\uFF01";break;case"\u5409\u6797\u7701":e="\u72B6\u5143\u9601\u5C31\u662F\u4E1C\u5317\u70E7\u70E4\u4E4B\u738B\u3002";break;case"\u9ED1\u9F99\u6C5F\u7701":e="\u5F88\u559C\u6B22\u54C8\u5C14\u6EE8\u5927\u5267\u9662\u3002";break;case"\u4E0A\u6D77\u5E02":e="\u4F17\u6240\u5468\u77E5\uFF0C\u4E2D\u56FD\u53EA\u6709\u4E24\u4E2A\u57CE\u5E02\u3002";break;case"\u6C5F\u82CF\u7701":switch(ipLoacation.result.ad_info.city){case"\u5357\u4EAC\u5E02":e="\u6B22\u8FCE\u6765\u81EA\u5B89\u5FBD\u7701\u5357\u4EAC\u5E02\u7684\u5C0F\u4F19\u4F34\u3002";break;case"\u82CF\u5DDE\u5E02":e="\u4E0A\u6709\u5929\u5802\uFF0C\u4E0B\u6709\u82CF\u676D\u3002";break;default:e="\u6563\u88C5\u662F\u5FC5\u987B\u8981\u6563\u88C5\u7684\u3002";break}break;case"\u6D59\u6C5F\u7701":e="\u4E1C\u98CE\u6E10\u7EFF\u897F\u6E56\u67F3\uFF0C\u96C1\u5DF2\u8FD8\u4EBA\u672A\u5357\u5F52\u3002";break;case"\u5B89\u5FBD\u7701":e="\u868C\u57E0\u4F4F\u4E86\uFF0C\u829C\u6E56\u8D77\u98DE\u3002";break;case"\u798F\u5EFA\u7701":e="\u4E95\u9091\u767D\u4E91\u95F4\uFF0C\u5CA9\u57CE\u8FDC\u5E26\u5C71\u3002";break;case"\u6C5F\u897F\u7701":e="\u843D\u971E\u4E0E\u5B64\u9E5C\u9F50\u98DE\uFF0C\u79CB\u6C34\u5171\u957F\u5929\u4E00\u8272\u3002";break;case"\u5C71\u4E1C\u7701":e="\u9065\u671B\u9F50\u5DDE\u4E5D\u70B9\u70DF\uFF0C\u4E00\u6CD3\u6D77\u6C34\u676F\u4E2D\u6CFB\u3002";break;case"\u6E56\u5317\u7701":e="\u6765\u7897\u70ED\u5E72\u9762\uFF01";break;case"\u6E56\u5357\u7701":e="74751\uFF0C\u957F\u6C99\u65AF\u5854\u514B\u3002";break;case"\u5E7F\u4E1C\u7701":e="\u8001\u677F\u6765\u4E24\u65A4\u798F\u5EFA\u4EBA\u3002";break;case"\u5E7F\u897F\u58EE\u65CF\u81EA\u6CBB\u533A":e="\u6842\u6797\u5C71\u6C34\u7532\u5929\u4E0B\u3002";break;case"\u6D77\u5357\u7701":e="\u671D\u89C2\u65E5\u51FA\u9010\u767D\u6D6A\uFF0C\u5915\u770B\u4E91\u8D77\u6536\u971E\u5149\u3002";break;case"\u56DB\u5DDD\u7701":e="\u5EB7\u5EB7\u5DDD\u59B9\u5B50\u3002";break;case"\u8D35\u5DDE\u7701":e="\u8305\u53F0\uFF0C\u5B66\u751F\uFF0C\u518D\u585E200\u3002";break;case"\u4E91\u5357\u7701":e="\u7389\u9F99\u98DE\u821E\u4E91\u7F20\u7ED5\uFF0C\u4E07\u4EDE\u51B0\u5DDD\u76F4\u8038\u5929\u3002";break;case"\u897F\u85CF\u81EA\u6CBB\u533A":e="\u8EBA\u5728\u832B\u832B\u8349\u539F\u4E0A\uFF0C\u4EF0\u671B\u84DD\u5929\u3002";break;case"\u9655\u897F\u7701":e="\u6765\u4EFD\u81CA\u5B50\u9762\u52A0\u998D\u3002";break;case"\u7518\u8083\u7701":e="\u7F8C\u7B1B\u4F55\u987B\u6028\u6768\u67F3\uFF0C\u6625\u98CE\u4E0D\u5EA6\u7389\u95E8\u5173\u3002";break;case"\u9752\u6D77\u7701":e="\u725B\u8089\u5E72\u548C\u8001\u9178\u5976\u90FD\u597D\u597D\u5403\u3002";break;case"\u5B81\u590F\u56DE\u65CF\u81EA\u6CBB\u533A":e="\u5927\u6F20\u5B64\u70DF\u76F4\uFF0C\u957F\u6CB3\u843D\u65E5\u5706\u3002";break;case"\u65B0\u7586\u7EF4\u543E\u5C14\u81EA\u6CBB\u533A":e="\u9A7C\u94C3\u53E4\u9053\u4E1D\u7EF8\u8DEF\uFF0C\u80E1\u9A6C\u72B9\u95FB\u5510\u6C49\u98CE\u3002";break;case"\u53F0\u6E7E\u7701":e="\u6211\u5728\u8FD9\u5934\uFF0C\u5927\u9646\u5728\u90A3\u5934\u3002";break;case"\u9999\u6E2F\u7279\u522B\u884C\u653F\u533A":e="\u6C38\u5B9A\u8D3C\u6709\u6B8B\u7559\u5730\u9B3C\u568E\uFF0C\u8FCE\u51FB\u5149\u975E\u5C81\u7389\u3002";break;case"\u6FB3\u95E8\u7279\u522B\u884C\u653F\u533A":e="\u6027\u611F\u8377\u5B98\uFF0C\u5728\u7EBF\u53D1\u724C\u3002";break;default:e="\u793E\u4F1A\u4E3B\u4E49\u5927\u6CD5\u597D\u3002";break}break;default:e="\u5E26\u6211\u53BB\u4F60\u7684\u56FD\u5BB6\u901B\u901B\u5427\u3002";break}let o,s=new Date;s.getHours()>=5&&s.getHours()<11?o="<span>\u4E0A\u5348\u597D</span>\uFF0C\u4E00\u65E5\u4E4B\u8BA1\u5728\u4E8E\u6668":s.getHours()>=1&&s.getHours()<13?o="<span>\u4E2D\u5348\u597D</span>\uFF0C\u8BE5\u6478\u9C7C\u5403\u5348\u996D\u4E86":s.getHours()>=13&&s.getHours()<15?o="<span>\u4E0B\u5348\u597D</span>\uFF0C\u61D2\u61D2\u5730\u7761\u4E2A\u5348\u89C9\u5427\uFF01":s.getHours()>=15&&s.getHours()<16?o="<span>\u4E09\u70B9\u51E0\u5566</span>\uFF0C\u996E\u8336\u5148\u5566\uFF01":s.getHours()>=16&&s.getHours()<19?o="<span>\u5915\u9633\u65E0\u9650\u597D\uFF01</span>":s.getHours()>=19&&s.getHours()<24?o="<span>\u665A\u4E0A\u597D</span>\uFF0C\u591C\u751F\u6D3B\u55E8\u8D77\u6765\uFF01":o="\u591C\u6DF1\u4E86\uFF0C\u65E9\u70B9\u4F11\u606F\uFF0C\u5C11\u71AC\u591C",document.getElementsByClassName("announcement_content")[0].innerHTML=`\u6B22\u8FCE\u6765\u81EA<span>${r}</span>\u7684\u5C0F\u4F19\u4F34\uFF0C${o}<br>
|
2
|
+
\u4F60\u8DDD\u79BBQ78KG\u7EA6\u6709<span>${i}</span>\u516C\u91CC\uFF0C${e}
|
198
3
|
<br>
|
199
4
|
|
200
5
|
<br>
|
201
|
-
<a href="https://icp.gov.moe/?keyword=20220146" target="_blank"
|
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
|
-
//
|
6
|
+
<a href="https://icp.gov.moe/?keyword=20220146" target="_blank">\u840CICP\u590720220146\u53F7</a>
|
7
|
+
`}x()}});function k(){let t=document.documentElement.getAttribute("data-theme")==="light"?"#4C4948":"rgba(255,255,255,0.7)";if(document.getElementById("posts-chart")&&postsOption)try{let a=postsOption;a.title.textStyle.color=t,a.xAxis.nameTextStyle.color=t,a.yAxis.nameTextStyle.color=t,a.xAxis.axisLabel.color=t,a.yAxis.axisLabel.color=t,a.xAxis.axisLine.lineStyle.color=t,a.yAxis.axisLine.lineStyle.color=t,a.series[0].markLine.data[0].label.color=t,postsChart.setOption(a)}catch(a){console.log(a)}if(document.getElementById("tags-chart")&&tagsOption)try{let a=tagsOption;a.title.textStyle.color=t,a.xAxis.nameTextStyle.color=t,a.yAxis.nameTextStyle.color=t,a.xAxis.axisLabel.color=t,a.yAxis.axisLabel.color=t,a.xAxis.axisLine.lineStyle.color=t,a.yAxis.axisLine.lineStyle.color=t,a.series[0].markLine.data[0].label.color=t,tagsChart.setOption(a)}catch(a){console.log(a)}if(document.getElementById("categories-chart")&&categoriesOption)try{let a=categoriesOption;a.title.textStyle.color=t,a.legend.textStyle.color=t,categoryParentFlag||(a.series[0].label.color=t),categoriesChart.setOption(a)}catch(a){console.log(a)}}document.querySelector(".rightMenu-item:has(.fa-moon)").addEventListener("click",function(){setTimeout(k,100)}),document.getElementById("con-mode").addEventListener("click",function(){setTimeout(k,100)})}
|
@@ -1,102 +1 @@
|
|
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://cdn.cbd.int/butterfly-card-history/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
|
-
}
|
1
|
+
"use strict";if(document.getElementById("history-container")){var append=function(r,t){if(typeof t=="string"){var e=document.createElement("div");e.innerHTML=t;for(var n=document.createDocumentFragment();e.firstChild;)n.appendChild(e.firstChild);r.appendChild(n)}else r.appendChild(t)},history_get_data=function(){var r=new Date,t=r.getMonth()+1;t<10?getMonth="0"+String(t):getMonth=String(t);var e=String(r.getDate());e<10?e="0"+String(e):e=String(e);var n="S"+getMonth+e;return["https://cdn.cbd.int/butterfly-card-history/json/"+getMonth+".json",n]},history_data=history_get_data();fetch(history_data[0]).then(function(i){return i.json()}).then(function(i){console.log(i[history_data[1]]),html_item="";var r=!0,t=!1,e=void 0;try{for(var n=i[history_data[1]][Symbol.iterator](),o;!(r=(o=n.next()).done);r=!0){var a=o.value;html_item+='<div class="swiper-slide history_slide"><span class="history_slide_time">A.D.'+a.year+'</span><span class="history_slide_link">'+a.title+"</span></div>"}}catch(d){t=!0,e=d}finally{try{!r&&n.return!=null&&n.return()}finally{if(t)throw e}}var c=document.getElementById("history_container_wrapper");append(c,html_item);var s=new Swiper(".history_swiper-container",{passiveListeners:!0,spaceBetween:30,effect:"coverflow",coverflowEffect:{rotate:30,slideShadows:!1},loop:!0,direction:"vertical",autoplay:{disableOnInteraction:!0,delay:5e3},mousewheel:!1}),l=document.getElementById("history-container");l.onmouseenter=function(){s.autoplay.stop()},l.onmouseleave=function(){s.autoplay.start()}})}
|