Skip to content

Commit 7dd198a

Browse files
committed
Update pagetual.user.js
1 parent f38cc5e commit 7dd198a

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

Pagetual/pagetual.user.js

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,6 +1473,7 @@
14731473
const mainSel = ["article,.article","[role=main],main,.main,#main","#results"];
14741474
const nextTextReg1 = new RegExp("\u005e\u7ffb\u003f\u005b\u4e0b\u540e\u5f8c\u6b21\u005d\u005b\u4e00\u30fc\u2500\u0031\u005d\u003f\u005b\u9875\u9801\u5f20\u5f35\u005d\u007c\u005e\u006e\u0065\u0078\u0074\u005b\u005c\u005c\u0073\u005f\u002d\u005d\u003f\u0070\u0061\u0067\u0065\u005c\u005c\u0073\u002a\u005b\u203a\u003e\u2192\u00bb\u005d\u003f\u0024\u007c\u6b21\u306e\u30da\u30fc\u30b8\u007c\u005e\u6b21\u3078\u003f\u0024\u007c\u0412\u043f\u0435\u0440\u0435\u0434\u007c\u005e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435", "i");
14751475
const nextTextReg2 = new RegExp("\u005e\u0028\u005b\u4e0b\u540e\u5f8c\u6b21\u005d\u005b\u4e00\u30fc\u2500\u0031\u005d\u003f\u005b\u7ae0\u8bdd\u8a71\u8282\u7bc0\u5e45\u005d\u007c\u006e\u0065\u0078\u0074\u002e\u003f\u0063\u0068\u0061\u0070\u0074\u0065\u0072\u0029\u0028\u005b\u003a\uff1a\u005c\u002d\u005f\u2014\u005c\u0073\u005c\u002e\u3002\u003e\u0023\u00b7\u005c\u005b\u3010\u3001\uff08\u005c\u0028\u002f\u002c\uff0c\uff1b\u003b\u2192\u005d\u007c\u0024\u0029", "i");
1476+
const nextTextReg3 = /^(next\s*(»|>>|>|›|→|❯|\d+)?|>|▶|>|›|→|❯)\s*$/i;
14761477
const prevReg = new RegExp("\u005e\u005c\u0073\u002a\u0028\u005b\u4e0a\u524d\u9996\u5c3e\u005d\u007c\u0070\u0072\u0065\u0076\u0069\u006f\u0075\u0073\u007c\u0065\u006e\u0064\u0029", "i");
14771478
const lazyImgAttr = ["data-lazy-src", "data-s", "data-lazy", "data-isrc", "data-url", "data-orig-file", "zoomfile", "file", "original", "load-src", "imgsrc", "real_src", "src2", "origin-src", "data-lazyload", "data-lazyload-src", "data-lazy-load-src", "data-ks-lazyload", "data-ks-lazyload-custom", "data-src", "data-defer-src", "data-actualsrc", "data-cover", "data-original", "data-thumb", "data-imageurl", "data-placeholder", "lazysrc"];
14781479
var rulesData = {uninited: true, firstRun: true, sideController: !isMobile}, ruleUrls, updateDate, loadNowNum = 5, autoScrollRate = 50;
@@ -3133,10 +3134,10 @@
31333134
if (pageDivs && pageDivs.length) {
31343135
for (let i = pageDivs.length - 1; i >= 0; i--) {
31353136
let p = pageDivs[i];
3136-
if (/(next\s*(»|>>|>|›|→|❯)?|>|▶|>|›|→|❯)/i.test(p.title || p.value || '')) {
3137+
if (/next/i.test(p.title || p.value || '')) {
31373138
next = p.querySelector("a,button,[type='button']") || p;
31383139
break;
3139-
} else if (/^(next\s*(»|>>|>|›|→|❯)?|>|▶|>|›|→|❯)$/i.test((p.innerText || '').trim())) {
3140+
} else if (nextTextReg3.test((p.innerText || '').trim())) {
31403141
next = p.querySelector("a,button,[type='button']") || p;
31413142
break;
31423143
}
@@ -3202,8 +3203,20 @@
32023203
}
32033204
}
32043205
}
3205-
if (!isApp && !next3 && !isJs) {
3206-
if (/^(next\s*(»|>>|>|›|→|❯|\d+)?|>|▶|>|›|→|❯)\s*$/i.test(aTag.textContent) && aTag.parentNode.hasAttribute && !aTag.parentNode.hasAttribute("jsaction")) {
3206+
if (!isApp && !next3) {
3207+
if (isJs) {
3208+
if (!jsNext) {
3209+
let pa = aTag.parentNode;
3210+
if (pa && /pag[ei]/i.test(pa.className)) {
3211+
jsNext = aTag;
3212+
} else {
3213+
pa = pa.parentNode;
3214+
if (pa && /pag[ei]/i.test(pa.className)) {
3215+
jsNext = aTag;
3216+
}
3217+
}
3218+
}
3219+
} else if (nextTextReg3.test(aTag.textContent) && aTag.parentNode.hasAttribute && !aTag.parentNode.hasAttribute("jsaction")) {
32073220
next3 = aTag;
32083221
}
32093222
}

0 commit comments

Comments
 (0)