Skip to content

Commit 010e10b

Browse files
committed
fix
1 parent 13b3faf commit 010e10b

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

HacgGodTurn.user.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
// @include http*://www.acgzone.org/*
4343
// @include http*://uraban.me/*
4444
// @include http*://www.uraban.me/*
45-
// @version 3.19.98
4645
// @grant GM_notification
4746
// @grant GM_xmlhttpRequest
4847
// @run-at document-end
@@ -446,7 +445,6 @@
446445
if(e.keyCode>36 && e.keyCode<41 && !e.shiftKey && !e.altKey){
447446
if(/INPUT|TEXTAREA/.test(document.activeElement.tagName))return;
448447
var article, isFind, index, articles=document.querySelectorAll(articleSel);
449-
if(articles.length<2)return;
450448
var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
451449
if(e.keyCode==39){
452450
if(e.ctrlKey){
@@ -506,7 +504,7 @@
506504
return false;
507505
}else if(e.ctrlKey && e.keyCode==40){
508506
if(curArticle){
509-
let aLink=article.querySelector("a");
507+
let aLink=curArticle.querySelector("a:not(.label)");
510508
if(aLink){
511509
aLink.click();
512510
return false;
@@ -516,7 +514,7 @@
516514
for(article of articles){
517515
dis=elementPosition(article).y - scrollTop;
518516
if(dis > -50 && dis < 50){
519-
let aLink=article.querySelector("a");
517+
let aLink=article.querySelector("a:not(.label)");
520518
if(aLink){
521519
aLink.click();
522520
return false;
@@ -526,7 +524,7 @@
526524
}
527525
}
528526
}
529-
}else{
527+
}else if(e.keyCode != 17){
530528
curArticle=null;
531529
}
532530
}

0 commit comments

Comments
 (0)