Skip to content

Commit 04e946a

Browse files
committed
1.9.37.123
1 parent bbf451f commit 04e946a

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

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 "Install from greasyfork")東方永頁機 [v.1.9.37.122](https://hoothin.github.io/UserScripts/Pagetual/pagetual.user.js "Latest version")
1+
[☯️](https://greasyfork.org/scripts/438684 "Install from greasyfork")東方永頁機 [v.1.9.37.123](https://hoothin.github.io/UserScripts/Pagetual/pagetual.user.js "Latest version")
22
==
33
*Pagetual - Perpetual pages. Auto loading paginated web pages for 90% of all web sites !*
44

Pagetual/pagetual.user.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
// @name:da Pagetual
3232
// @name:fr-CA Pagetual
3333
// @namespace hoothin
34-
// @version 1.9.37.122
34+
// @version 1.9.37.123
3535
// @description Perpetual pages - powerful auto-pager script. Auto fetching next paginated web pages and inserting into current page for infinite scroll. Support thousands of web sites without any rule.
3636
// @description:zh-CN 终极自动翻页 - 加载并拼接下一分页内容至当前页尾,智能适配任意网页
3737
// @description:zh-TW 終極自動翻頁 - 加載並拼接下一分頁內容至當前頁尾,智能適配任意網頁
@@ -2438,7 +2438,7 @@
24382438
}
24392439
this.curSiteRule.pageElement = tempSel + (targetChild ? ">*" : "");
24402440
break;
2441-
}
2441+
} else pageElement = null;
24422442
}
24432443
if (!pageElement || pageElement.length === 0) {
24442444
let pageElementSelTrim = pageElementSel.replace(/:nth-of-type\(\d+\)/g, "");
@@ -2464,8 +2464,8 @@
24642464
pageElement = pageElement.children;
24652465
}
24662466
this.curSiteRule.pageElement = pageElementSelTrim + (targetChild ? ">*" : "");
2467-
}
2468-
}
2467+
} else pageElement = null;
2468+
} else pageElement = null;
24692469
}
24702470
}
24712471
}
@@ -8702,7 +8702,11 @@
87028702
}
87038703
}
87048704
if (loadmoreBtn && !ruleParser.curSiteRule.loadMore && loadmoreBtn.dataset.ajax !== "true") {
8705-
let href = loadmoreBtn.getAttribute("href");
8705+
let href = loadmoreBtn.getAttribute("href"), i = 0, pa = loadmoreBtn.parentNode;
8706+
while (!href && i++ < 5 && pa) {
8707+
href = pa.getAttribute && pa.getAttribute("href");
8708+
pa = pa.parentNode;
8709+
}
87068710
if (href && href != "/" && !ruleParser.hrefIsJs(href)) {
87078711
loadmoreBtn = null;
87088712
}

0 commit comments

Comments
 (0)