Skip to content

Commit a68d353

Browse files
committed
1.9.36.33
1 parent 96d29d4 commit a68d353

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

Pagetual/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[☯️](https://greasyfork.org/scripts/438684)東方永頁機 v.1.9.36.32
1+
[☯️](https://greasyfork.org/scripts/438684)東方永頁機 v.1.9.36.33
22
==
33
*Pagetual - Perpetual pages. Auto loading paginated web pages for 90% of all web sites ! [**Wiki**](https://pagetual.hoothin.com/en/)*
44

Pagetual/pagetual.user.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
// @name:it Pagetual
1111
// @name:ko 東方永頁機
1212
// @namespace hoothin
13-
// @version 1.9.36.32
14-
// @description Perpetual pages - Most powerful auto-pager script. Auto loading next paginated web pages and inserting into current page. Support thousands of web sites without any rule.
13+
// @version 1.9.36.33
14+
// @description Perpetual pages - powerful auto-pager script. Auto loading next paginated web pages and inserting into current page. Support thousands of web sites without any rule.
1515
// @description:zh-CN 终极自动翻页 - 加载并拼接下一分页内容至当前页尾,智能适配任意网页
1616
// @description:zh-TW 終極自動翻頁 - 加載並拼接下一分頁內容至當前頁尾,智能適配任意網頁
1717
// @description:ja Webページを自動で読み込み継ぎ足し表示を行うブラウザ拡張です、次のページ付けされた Web ページの自動読み込みと現在のページへの挿入 ルールなしで何千もの Web サイトをサポートします。
@@ -883,17 +883,18 @@
883883
let parent = ele.parentElement;
884884
if (parent) {
885885
selector = geneSelector(parent, addID) + ' > ' + selector;
886-
if (!className && !hasId && parent.children.length > 1) {
887-
let i, j = 0;
886+
if (!className && !hasId && parent.children.length > 1 && !/^HTML$/i.test(parent.nodeName)) {
887+
let i, nth = 0, all = 0;
888888
for (i = 0; i < parent.children.length; i++) {
889889
if (parent.children[i].nodeName == ele.nodeName) {
890-
j++;
890+
all++;
891891
if (parent.children[i] == ele) {
892-
break;
892+
nth = all;
893893
}
894+
if (nth > 0 && all > 1) break;
894895
}
895896
}
896-
selector += (/^HTML$/i.test(parent.nodeName) ? "" : `:nth-of-type(${j})`);
897+
selector += (all == 1 ? "" : `:nth-of-type(${nth})`);
897898
}
898899
}
899900
}
@@ -1574,7 +1575,7 @@
15741575
debug(self.curSiteRule.pageElement, 'Page element');
15751576
return [ele];
15761577
}
1577-
if (curHeight / bodyHeight <= 0.25) {
1578+
if (curHeight / bodyHeight <= 0.22) {
15781579
let article = doc.querySelectorAll(mainSel);
15791580
if (article && article.length == 1) {
15801581
article = article[0];
@@ -1654,7 +1655,7 @@
16541655
}
16551656
}
16561657
if (h < minHeight) {
1657-
if (!needCheckNext || h < (windowHeight>>1) || !ele.contains(self.initNext)) {
1658+
if (!needCheckNext || h < (windowHeight>>2) || !ele.contains(self.initNext)) {
16581659
continue;
16591660
}
16601661
}
@@ -4377,6 +4378,7 @@
43774378
clearInterval(autoScrollInterval);
43784379
if (autoScroll <= 0) return;
43794380
autoScrollInterval = setInterval(() => {
4381+
if (isPause) return;
43804382
window.scroll(window.scrollX, window.scrollY + 1);
43814383
}, parseInt(1000 / autoScroll));
43824384
}

0 commit comments

Comments
 (0)