q78kgblog 0.0.0-1720429643771 → 0.0.0-1720441708496
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/HexoSeoAutoPush.yml +12 -8
- package/404.html +4 -4
- package/about/index.html +6 -6
- package/archives/2023/02/index.html +5 -5
- package/archives/2023/04/index.html +5 -5
- package/archives/2023/05/index.html +5 -5
- package/archives/2023/08/index.html +5 -5
- package/archives/2023/09/index.html +5 -5
- package/archives/2023/index.html +5 -5
- package/archives/2024/01/index.html +5 -5
- package/archives/2024/02/index.html +5 -5
- package/archives/2024/index.html +5 -5
- package/archives/index.html +5 -5
- package/atom.xml +9 -9
- package/bangumis/index.html +7 -6
- package/bigpie/index.html +4 -4
- package/categories/Hexo/index.html +5 -5
- package/categories/index.html +4 -4
- package/categories//345/271/264/347/273/210/346/200/273/347/273/223/index.html +5 -5
- package/categories//347/264/240/346/235/220/index.html +5 -5
- package/categories//351/227/262/350/201/212/346/235/202/350/260/210/index.html +5 -5
- package/content.json +1 -1
- package/css/ariasakablog.css +6669 -0
- package/css/danmaku.css +2 -0
- package/fcircle/index.html +4 -4
- package/fontawesome/index.html +4 -4
- package/index.html +12 -12
- package/js/commentBarrage.js +201 -201
- package/js/day.js +110 -110
- package/js/dianzan.js +5 -5
- package/js/dis.js +241 -242
- package/js/fps.js +54 -55
- package/js/gitalker.js +1 -1
- package/js/heimu.js +15 -16
- package/js/hide.show.js +5 -5
- package/js/languages.js +510 -510
- package/js/lunar.js +517 -517
- package/js/main.js +8 -8
- package/js/resizeTop.js +31 -31
- package/js/settings.js +302 -303
- package/js/sitetime.js +11 -11
- package/js/welcomeconsole.js +8 -9
- package/links/index.html +4 -4
- package/othersite/index.html +4 -4
- package/package.json +1 -1
- package/posts/164ef646/index.html +6 -6
- package/posts/228c2ef8/index.html +6 -6
- package/posts/a9a6c1fb/index.html +6 -6
- package/posts/c262e439/index.html +6 -6
- package/posts/c81531cf/index.html +6 -6
- package/posts/ccdf7cfc/index.html +6 -6
- package/posts/de1f83f4/index.html +6 -6
- package/posts/e54f7476/index.html +6 -6
- package/random.html +2 -2
- package/sitemap.txt +2 -2
- package/sitemap.xml +6 -6
- package/tags/AI/index.html +6 -6
- package/tags/Butterfly/index.html +6 -6
- package/tags/Cloudflare/index.html +6 -6
- package/tags/DiffSinger/index.html +6 -6
- package/tags/Hexo/index.html +6 -6
- package/tags/Next/index.html +6 -6
- package/tags/RAID/index.html +6 -6
- package/tags/Vercel/index.html +6 -6
- package/tags/Workers/index.html +6 -6
- package/tags/index.html +4 -4
- package/tags//344/270/273/351/242/230/index.html +6 -6
- package/tags//345/206/231/344/275/234/index.html +6 -6
- package/tags//345/245/263/346/200/247/346/204/217/350/257/206/index.html +6 -6
- package/tags//345/255/246/344/271/240/index.html +6 -6
- package/tags//345/256/266/351/207/214/344/272/221/index.html +6 -6
- package/tags//345/271/264/347/273/210/346/200/273/347/273/223/index.html +6 -6
- package/tags//346/212/230/350/205/276/index.html +6 -6
- package/tags//346/227/245/345/270/270/index.html +6 -6
- package/tags//346/234/215/345/212/241/345/231/250/index.html +6 -6
- package/tags//346/265/252/346/275/256/index.html +6 -6
- package/tags//347/256/200/347/210/261/index.html +6 -6
- package/tags//350/207/252/345/212/250/346/240/207/346/263/250/index.html +6 -6
- package/tags//350/256/272/346/226/207/index.html +6 -6
- package/tags//350/260/267/346/255/214/347/277/273/350/257/221/index.html +6 -6
- package/tags//350/264/237/350/275/275/345/235/207/350/241/241/index.html +6 -6
- package/tags//351/207/221/345/217/245/index.html +6 -6
- package/tags//351/255/224/346/224/271/index.html +6 -6
package/js/commentBarrage.js
CHANGED
@@ -1,240 +1,240 @@
|
|
1
1
|
document.addEventListener('pjax:complete', startbarrage);
|
2
2
|
document.addEventListener('DOMContentLoaded', startbarrage);
|
3
3
|
|
4
|
-
function startbarrage()
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
4
|
+
function startbarrage(){
|
5
|
+
try{
|
6
|
+
clearInterval(timer);
|
7
|
+
document.querySelector('.comment-barrage').innerHTML="";
|
8
|
+
delete sw;
|
9
|
+
}catch(err){}
|
10
|
+
const commentBarrageConfig = {
|
11
|
+
//浅色模式和深色模式颜色,务必保持一致长度,前面是背景颜色,后面是字体,随机选择,默认这个颜色还好
|
12
|
+
lightColors:[
|
13
|
+
['#ffffffaa!important','var(--lyx-black)'],
|
14
|
+
],
|
15
|
+
darkColors:[
|
16
|
+
['#000a!important','var(--lyx-white)'],
|
17
|
+
],
|
18
|
+
//同时最多显示弹幕数
|
19
|
+
maxBarrage: 1,
|
20
|
+
//弹幕显示间隔时间,单位ms
|
21
|
+
barrageTime: 3000,
|
22
|
+
//twikoo部署地址(Vercel、私有部署),腾讯云的为环境ID
|
23
|
+
twikooUrl: "https://twikoo.anjiurine.top",
|
24
|
+
//token获取见前文
|
25
|
+
accessToken: "f0fac9b52af34219af509d087ea72c4a",
|
26
|
+
pageUrl: window.location.pathname,
|
27
|
+
barrageTimer: [],
|
28
|
+
barrageList: [],
|
29
|
+
barrageIndex: 0,
|
30
|
+
// 没有设置过头像时返回的默认头像,见cravatar文档 https://cravatar.cn/developers/api,可以不改以免出错
|
31
|
+
noAvatarType: "retro",
|
32
|
+
dom: document.querySelector('.comment-barrage'),
|
33
|
+
//是否默认显示留言弹幕
|
34
|
+
displayBarrage: true,
|
35
|
+
//头像cdn,默认cravatar
|
36
|
+
avatarCDN: "cravatar.cn",
|
37
|
+
}
|
38
|
+
function checkURL(URL){
|
39
|
+
var str=URL;
|
40
|
+
//判断URL地址的正则表达式为:http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?
|
41
|
+
//下面的代码中应用了转义字符"\"输出一个字符"/"
|
42
|
+
var Expression=/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/;
|
43
|
+
var objExp=new RegExp(Expression);
|
44
|
+
if(objExp.test(str)==true){
|
45
|
+
return true;
|
46
|
+
}else{
|
47
|
+
return false;
|
37
48
|
}
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
49
|
+
}
|
50
|
+
function isInViewPortOfOne (el) {
|
51
|
+
const viewPortHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
|
52
|
+
const offsetTop = el.offsetTop
|
53
|
+
const scrollTop = document.documentElement.scrollTop
|
54
|
+
const top = offsetTop - scrollTop
|
55
|
+
return top <= viewPortHeight
|
56
|
+
}
|
57
|
+
if(location.href.indexOf("posts")!=-1||location.href.indexOf("posts")!=-1)
|
58
|
+
document.onscroll = function() {
|
59
|
+
if(commentBarrageConfig.displayBarrage){
|
60
|
+
if(isInViewPortOfOne(document.getElementById("post-comment"))){
|
61
|
+
document.getElementsByClassName("barrageswiper")[0].style.transform="translateX(514px)";
|
62
|
+
document.getElementsByClassName("barrageswiper")[0].style.opacity="0";
|
48
63
|
}
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
const offsetTop = el.offsetTop
|
53
|
-
const scrollTop = document.documentElement.scrollTop
|
54
|
-
const top = offsetTop - scrollTop
|
55
|
-
return top <= viewPortHeight
|
56
|
-
}
|
57
|
-
if (location.href.indexOf("posts") != -1 || location.href.indexOf("posts") != -1)
|
58
|
-
document.onscroll = function () {
|
59
|
-
if (commentBarrageConfig.displayBarrage) {
|
60
|
-
if (isInViewPortOfOne(document.getElementById("post-comment"))) {
|
61
|
-
document.getElementsByClassName("barrageswiper")[0].style.transform = "translateX(514px)";
|
62
|
-
document.getElementsByClassName("barrageswiper")[0].style.opacity = "0";
|
63
|
-
}
|
64
|
-
else {
|
65
|
-
document.getElementsByClassName("barrageswiper")[0].style.transform = "";
|
66
|
-
document.getElementsByClassName("barrageswiper")[0].style.opacity = "1";
|
67
|
-
}
|
68
|
-
}
|
64
|
+
else{
|
65
|
+
document.getElementsByClassName("barrageswiper")[0].style.transform="";
|
66
|
+
document.getElementsByClassName("barrageswiper")[0].style.opacity="1";
|
69
67
|
}
|
70
|
-
function initCommentBarrage() {
|
71
|
-
|
72
|
-
var data = JSON.stringify({
|
73
|
-
"event": "COMMENT_GET",
|
74
|
-
"commentBarrageConfig.accessToken": commentBarrageConfig.accessToken,
|
75
|
-
"url": commentBarrageConfig.pageUrl
|
76
|
-
});
|
77
|
-
var xhr = new XMLHttpRequest();
|
78
|
-
xhr.withCredentials = true;
|
79
|
-
xhr.addEventListener("readystatechange", function () {
|
80
|
-
if (this.readyState === 4) {
|
81
|
-
commentBarrageConfig.barrageList = commentLinkFilter(JSON.parse(this.responseText).data);
|
82
|
-
commentBarrageConfig.dom.innerHTML = '';
|
83
|
-
for (commentBarrageConfig.barrageIndex = 0; commentBarrageConfig.barrageIndex < commentBarrageConfig.barrageList.length; commentBarrageConfig.barrageIndex++) {
|
84
|
-
popCommentBarrage(commentBarrageConfig.barrageList[commentBarrageConfig.barrageIndex]);
|
85
|
-
}
|
86
|
-
kkksc03 = new Swiper('.barrageswiper', {
|
87
|
-
direction: "vertical",
|
88
|
-
loop: true,
|
89
|
-
mousewheel: true,
|
90
|
-
autoplay: {
|
91
|
-
delay: 3000,
|
92
|
-
stopOnLastSlide: false,
|
93
|
-
disableOnInteraction: false,
|
94
|
-
},
|
95
|
-
})
|
96
|
-
kkksc03.el.onmouseover = function () {
|
97
|
-
kkksc03.autoplay.stop();
|
98
|
-
}
|
99
|
-
kkksc03.el.onmouseout = function () {
|
100
|
-
kkksc03.autoplay.start();
|
101
|
-
}
|
102
|
-
}
|
103
|
-
});
|
104
|
-
xhr.open("POST", commentBarrageConfig.twikooUrl);
|
105
|
-
xhr.setRequestHeader("Content-Type", "application/json");
|
106
|
-
xhr.send(data);
|
107
|
-
// timer=setInterval(()=>{
|
108
|
-
// if(commentBarrageConfig.barrageList.length){
|
109
|
-
// popCommentBarrage(commentBarrageConfig.barrageList[commentBarrageConfig.barrageIndex]);
|
110
|
-
// commentBarrageConfig.barrageIndex += 1;
|
111
|
-
// commentBarrageConfig.barrageIndex %= commentBarrageConfig.barrageList.length;
|
112
|
-
// }
|
113
|
-
// if(commentBarrageConfig.barrageTimer.length > (commentBarrageConfig.barrageList.length > commentBarrageConfig.maxBarrage?commentBarrageConfig.maxBarrage:commentBarrageConfig.barrageList.length)){
|
114
|
-
// removeCommentBarrage(commentBarrageConfig.barrageTimer.shift())
|
115
|
-
// }
|
116
|
-
// },commentBarrageConfig.barrageTime)
|
117
|
-
|
118
68
|
}
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
function
|
130
|
-
if
|
131
|
-
|
132
|
-
|
133
|
-
|
69
|
+
}
|
70
|
+
function initCommentBarrage(){
|
71
|
+
|
72
|
+
var data = JSON.stringify({
|
73
|
+
"event": "COMMENT_GET",
|
74
|
+
"commentBarrageConfig.accessToken": commentBarrageConfig.accessToken,
|
75
|
+
"url": commentBarrageConfig.pageUrl
|
76
|
+
});
|
77
|
+
var xhr = new XMLHttpRequest();
|
78
|
+
xhr.withCredentials = true;
|
79
|
+
xhr.addEventListener("readystatechange", function() {
|
80
|
+
if(this.readyState === 4) {
|
81
|
+
commentBarrageConfig.barrageList = commentLinkFilter(JSON.parse(this.responseText).data);
|
82
|
+
commentBarrageConfig.dom.innerHTML = '';
|
83
|
+
for(commentBarrageConfig.barrageIndex=0;commentBarrageConfig.barrageIndex<commentBarrageConfig.barrageList.length;commentBarrageConfig.barrageIndex++){
|
84
|
+
popCommentBarrage(commentBarrageConfig.barrageList[commentBarrageConfig.barrageIndex]);
|
85
|
+
}
|
86
|
+
kkksc03=new Swiper('.barrageswiper', {
|
87
|
+
direction: "vertical",
|
88
|
+
loop: true,
|
89
|
+
mousewheel:true,
|
90
|
+
autoplay: {
|
91
|
+
delay: 3000,
|
92
|
+
stopOnLastSlide: false,
|
93
|
+
disableOnInteraction: false,
|
94
|
+
},
|
134
95
|
})
|
135
|
-
|
136
|
-
|
137
|
-
|
96
|
+
kkksc03.el.onmouseover = function(){
|
97
|
+
kkksc03.autoplay.stop();
|
98
|
+
}
|
99
|
+
kkksc03.el.onmouseout = function(){
|
100
|
+
kkksc03.autoplay.start();
|
101
|
+
}
|
138
102
|
}
|
103
|
+
});
|
104
|
+
xhr.open("POST", commentBarrageConfig.twikooUrl);
|
105
|
+
xhr.setRequestHeader("Content-Type", "application/json");
|
106
|
+
xhr.send(data);
|
107
|
+
// timer=setInterval(()=>{
|
108
|
+
// if(commentBarrageConfig.barrageList.length){
|
109
|
+
// popCommentBarrage(commentBarrageConfig.barrageList[commentBarrageConfig.barrageIndex]);
|
110
|
+
// commentBarrageConfig.barrageIndex += 1;
|
111
|
+
// commentBarrageConfig.barrageIndex %= commentBarrageConfig.barrageList.length;
|
112
|
+
// }
|
113
|
+
// if(commentBarrageConfig.barrageTimer.length > (commentBarrageConfig.barrageList.length > commentBarrageConfig.maxBarrage?commentBarrageConfig.maxBarrage:commentBarrageConfig.barrageList.length)){
|
114
|
+
// removeCommentBarrage(commentBarrageConfig.barrageTimer.shift())
|
115
|
+
// }
|
116
|
+
// },commentBarrageConfig.barrageTime)
|
117
|
+
|
118
|
+
}
|
119
|
+
function commentLinkFilter(data){
|
120
|
+
data.sort((a,b)=>{
|
121
|
+
return a.created - b.created;
|
122
|
+
})
|
123
|
+
let newData = [];
|
124
|
+
data.forEach(item=>{
|
125
|
+
newData.push(...getCommentReplies(item));
|
126
|
+
});
|
127
|
+
return newData;
|
128
|
+
}
|
129
|
+
function getCommentReplies(item){
|
130
|
+
if(item.replies){
|
131
|
+
let replies = [item];
|
132
|
+
item.replies.forEach(item=>{
|
133
|
+
replies.push(...getCommentReplies(item));
|
134
|
+
})
|
135
|
+
return replies;
|
136
|
+
}else{
|
137
|
+
return [];
|
139
138
|
}
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
139
|
+
}
|
140
|
+
function popCommentBarrage(data){
|
141
|
+
let barrage = document.createElement('div');
|
142
|
+
let width = commentBarrageConfig.dom.clientWidth;
|
143
|
+
let height = commentBarrageConfig.dom.clientHeight;
|
144
|
+
barrage.className = 'comment-barrage-item'
|
145
|
+
let ran = Math.floor(Math.random()*commentBarrageConfig.lightColors.length)
|
146
|
+
document.getElementById("barragesColor").innerHTML=`[data-theme='light'] .comment-barrage-item { background-color:${commentBarrageConfig.lightColors[ran][0]};color:${commentBarrageConfig.lightColors[ran][1]}}[data-theme='dark'] .comment-barrage-item{ background-color:${commentBarrageConfig.darkColors[ran][0]};color:${commentBarrageConfig.darkColors[ran][1]}}`;
|
147
|
+
if(data.avatar!=undefined){
|
148
|
+
if(data.link!=undefined){
|
149
|
+
if(!checkURL(data.link)){
|
150
|
+
data.link="http://"+data.link;
|
151
|
+
}
|
152
|
+
barrage.innerHTML = `
|
153
153
|
<div class="barrageHead">
|
154
154
|
<img class="barrageAvatar" src="${data.avatar}"/>
|
155
155
|
<a href="${data.link}" class="barrageNick" target="_blank">${data.nick}</a>
|
156
156
|
<a href="javascript:switchCommentBarrage()" style="font-size:20px">×</a>
|
157
157
|
</div>
|
158
158
|
`
|
159
|
-
|
160
|
-
|
161
|
-
|
159
|
+
}
|
160
|
+
else{
|
161
|
+
barrage.innerHTML = `
|
162
162
|
<div class="barrageHead">
|
163
163
|
<img class="barrageAvatar" src="${data.avatar}"/>
|
164
164
|
<div class="barrageNick">${data.nick}</div>
|
165
165
|
<a href="javascript:switchCommentBarrage()" style="font-size:20px">×</a>
|
166
166
|
</div>
|
167
167
|
`
|
168
|
-
}
|
169
168
|
}
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
169
|
+
}
|
170
|
+
else{
|
171
|
+
if(data.link!=undefined){
|
172
|
+
if(!checkURL(data.link)){
|
173
|
+
data.link="http://"+data.link;
|
174
|
+
}
|
175
|
+
barrage.innerHTML = `
|
176
176
|
<div class="barrageHead">
|
177
177
|
<img class="barrageAvatar" src="https://${commentBarrageConfig.avatarCDN}/avatar/${data.mailMd5}?d=${commentBarrageConfig.noAvatarType}"/>
|
178
178
|
<a href="${data.link}" class="barrageNick" target="_blank">${data.nick}</a>
|
179
179
|
<a href="javascript:switchCommentBarrage()" style="font-size:20px">×</a>
|
180
180
|
</div>
|
181
181
|
`
|
182
|
-
|
183
|
-
|
184
|
-
|
182
|
+
}
|
183
|
+
else{
|
184
|
+
barrage.innerHTML = `
|
185
185
|
<div class="barrageHead">
|
186
186
|
<img class="barrageAvatar" src="https://${commentBarrageConfig.avatarCDN}/avatar/${data.mailMd5}?d=${commentBarrageConfig.noAvatarType}"/>
|
187
187
|
<div class="barrageNick">${data.nick}</div>
|
188
188
|
<a href="javascript:switchCommentBarrage()" style="font-size:20px">×</a>
|
189
189
|
</div>
|
190
190
|
`
|
191
|
-
}
|
192
191
|
}
|
193
|
-
barrageContent = document.createElement('a');
|
194
|
-
barrageContent.className = "barrageContent";
|
195
|
-
barrageContent.href = "#" + data.id;
|
196
|
-
barrageContent.innerHTML = data.comment;
|
197
|
-
barrage.appendChild(barrageContent);
|
198
|
-
// commentBarrageConfig.barrageTimer.push(barrage);
|
199
|
-
aswiper = document.createElement('div');
|
200
|
-
aswiper.className = "swiper-slide";
|
201
|
-
// aswiper.setAttribute("data-swiper-slide-index","8")
|
202
|
-
aswiper.setAttribute("style", "height: 150px;");
|
203
|
-
// aswiper.setAttribute("role","group")
|
204
|
-
// aswiper.setAttribute("aria-label","9 / 19");
|
205
|
-
aswiper.append(barrage);
|
206
|
-
commentBarrageConfig.dom.append(aswiper);
|
207
192
|
}
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
193
|
+
barrageContent=document.createElement('a');
|
194
|
+
barrageContent.className="barrageContent";
|
195
|
+
barrageContent.href="#"+data.id;
|
196
|
+
barrageContent.innerHTML=data.comment;
|
197
|
+
barrage.appendChild(barrageContent);
|
198
|
+
// commentBarrageConfig.barrageTimer.push(barrage);
|
199
|
+
aswiper = document.createElement('div');
|
200
|
+
aswiper.className="swiper-slide";
|
201
|
+
// aswiper.setAttribute("data-swiper-slide-index","8")
|
202
|
+
aswiper.setAttribute("style","height: 150px;");
|
203
|
+
// aswiper.setAttribute("role","group")
|
204
|
+
// aswiper.setAttribute("aria-label","9 / 19");
|
205
|
+
aswiper.append(barrage);
|
206
|
+
commentBarrageConfig.dom.append(aswiper);
|
207
|
+
}
|
208
|
+
switchCommentBarrage = function () {
|
209
|
+
localStorage.setItem("isBarrageToggle",Number(!Number(localStorage.getItem("isBarrageToggle"))))
|
210
|
+
if(!isInViewPortOfOne(document.getElementById("post-comment"))){
|
211
|
+
commentBarrageConfig.displayBarrage=!(commentBarrageConfig.displayBarrage);
|
212
|
+
let commentBarrage = document.querySelector('.comment-barrage');
|
213
|
+
if (commentBarrage) {
|
214
|
+
$(commentBarrage).fadeToggle()
|
215
|
+
}
|
216
|
+
}
|
217
217
|
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
218
|
+
}
|
219
|
+
// $(".comment-barrage").hover(function(){
|
220
|
+
// clearInterval(timer);
|
221
|
+
// },function () {
|
222
|
+
// timer=setInterval(()=>{
|
223
|
+
// if(commentBarrageConfig.barrageList.length){
|
224
|
+
// popCommentBarrage(commentBarrageConfig.barrageList[commentBarrageConfig.barrageIndex]);
|
225
|
+
// commentBarrageConfig.barrageIndex += 1;
|
226
|
+
// commentBarrageConfig.barrageIndex %= commentBarrageConfig.barrageList.length;
|
227
|
+
// }
|
228
|
+
// if(commentBarrageConfig.barrageTimer.length > (commentBarrageConfig.barrageList.length > commentBarrageConfig.maxBarrage?commentBarrageConfig.maxBarrage:commentBarrageConfig.barrageList.length)){
|
229
|
+
// removeCommentBarrage(commentBarrageConfig.barrageTimer.shift())
|
230
|
+
// }
|
231
|
+
// },commentBarrageConfig.barrageTime)
|
232
|
+
// })
|
233
|
+
if(localStorage.getItem("isBarrageToggle")==undefined){
|
234
|
+
localStorage.setItem("isBarrageToggle","0");
|
235
|
+
}else if(localStorage.getItem("isBarrageToggle")=="1"){
|
236
|
+
localStorage.setItem("isBarrageToggle","0");
|
237
|
+
switchCommentBarrage()
|
238
|
+
}
|
239
|
+
initCommentBarrage()
|
240
240
|
}
|