Skip to content

Commit fdb0847

Browse files
committed
add quote
1 parent 6d01f97 commit fdb0847

1 file changed

Lines changed: 17 additions & 6 deletions

File tree

HacgGodTurn.js

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,9 @@
165165
}
166166
};
167167
}
168-
var contentArea='.entry-content';
169-
var commArea="comment-content";
170168
var t, curSite;
169+
var contentArea='.entry-content', commArea="comment-content";
170+
var originTitile = document.title;
171171
var isHttps=location.protocol=="https:";
172172
if(isHttps){
173173
var refMeta = document.createElement('meta');
@@ -282,17 +282,16 @@
282282
}
283283
}
284284
}else if (config.sites.findSite("reimu").regex.test(location.href)){
285-
var OriginTitile = document.title;
286285
var titleTime;
287286
document.addEventListener('visibilitychange', function() {
288287
if (document.hidden) {
289-
document.title = '\u6765\u556a\u0038\u5566~(*´∇`*) ' + OriginTitile;
288+
document.title = '\u6765\u556a\u0038\u5566~(*´∇`*) ' + originTitile;
290289
clearTimeout(titleTime);
291290
}
292291
else {
293-
document.title = '\u624d\u4e0d\u7ed9\u556a(╯‵□′)╯︵┻━┻ ' + OriginTitile;
292+
document.title = '\u624d\u4e0d\u7ed9\u556a(╯‵□′)╯︵┻━┻ ' + originTitile;
294293
titleTime = setTimeout(function() {
295-
document.title = OriginTitile;
294+
document.title = originTitile;
296295
}, 2000);
297296
}
298297
});
@@ -331,6 +330,18 @@
331330
}else if(config.sites.findSite("hacg").regex.test(location.href)){
332331
var has8=false;
333332
var comms=document.querySelectorAll("span.fn");
333+
var msg = "…" + quote;pos = 0;
334+
function scrollMSG() {
335+
document.title = msg.substring(pos, msg.length) + msg.substring(0, pos);
336+
pos++;
337+
if (pos > msg.length) {
338+
pos = 0;
339+
document.title = originTitile;
340+
}else{
341+
setTimeout(scrollMSG,150);
342+
}
343+
}
344+
scrollMSG();
334345
for(var comm of comms){
335346
if(comm.innerHTML == "\u5c0f\u0038\u9171"){
336347
has8=true;

0 commit comments

Comments
 (0)