Skip to content

Commit 724c844

Browse files
committed
1.9.37.124
1 parent e5914d4 commit 724c844

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
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.123](https://hoothin.github.io/UserScripts/Pagetual/pagetual.user.js "Latest version")
1+
[☯️](https://greasyfork.org/scripts/438684 "Install from greasyfork")東方永頁機 [v.1.9.37.124](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: 19 additions & 6 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.123
34+
// @version 1.9.37.124
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 終極自動翻頁 - 加載並拼接下一分頁內容至當前頁尾,智能適配任意網頁
@@ -5568,7 +5568,7 @@
55685568
posEle = posEle.previousElementSibling || posEle.parentNode;
55695569
}
55705570
if (posEle && posEle.lastElementChild) {
5571-
if (posEle.scrollHeight === 0) posEle = posEle.lastElementChild;
5571+
if (posEle.scrollHeight === 0 && posEle.lastElementChild.offsetParent) posEle = posEle.lastElementChild;
55725572
else if (posEle.lastElementChild.offsetTop > 500) {
55735573
posEle = posEle.lastElementChild;
55745574
}
@@ -7618,7 +7618,7 @@
76187618
text-shadow: rgb(255 255 255) 0px 0px 10px;
76197619
}
76207620
#pagetual-sideController #pagetual-sideController-pagenum {
7621-
font-size: 15px!important;
7621+
font-size: 12px!important;
76227622
line-height: 30px;
76237623
text-align: center;
76247624
position: absolute;
@@ -9950,6 +9950,12 @@
99509950
configCon.appendChild(blacklistBtn);
99519951
configCon.appendChild(blacklistInput);
99529952
let saveBtn = document.createElement("button");
9953+
langSelect.onchange = e => {
9954+
saveBtn.click();
9955+
setTimeout(() => {
9956+
location.reload();
9957+
}, 500);
9958+
};
99539959
saveBtn.innerHTML = i18n("save");
99549960
saveBtn.id = "saveBtn";
99559961
configCon.appendChild(saveBtn);
@@ -10328,7 +10334,9 @@
1032810334
}, 100);
1032910335
}
1033010336
_GM_registerMenuCommand(i18n("configure"), () => {
10331-
_GM_openInTab(rulesData.configPage || configPage[0], {active: true});
10337+
if (window.top == window.self) {
10338+
_GM_openInTab(rulesData.configPage || configPage[0], {active: true});
10339+
}
1033210340
});
1033310341
if (rulesData.blacklist && rulesData.blacklist.length > 0) {
1033410342
let href = location.href.slice(0, 500);
@@ -10411,7 +10419,7 @@
1041110419
rulesData.updateNotification = true;
1041210420
}
1041310421
if (typeof(rulesData.initRun) == "undefined") {
10414-
rulesData.initRun = true;
10422+
rulesData.initRun = false;
1041510423
}
1041610424
if (typeof(rulesData.preload) == "undefined") {
1041710425
rulesData.preload = false;
@@ -10669,6 +10677,11 @@
1066910677
if (!ruleParser.curSiteRule.smart || !xhrFailed) {
1067010678
xhrFailed = true;
1067110679
return callback(false);
10680+
} else {
10681+
if (!ruleParser.curSiteRule.sleep) {
10682+
ruleParser.curSiteRule.sleep = 1000;
10683+
return callback(false);
10684+
}
1067210685
}
1067310686
}
1067410687
if (inCors && (!pageElement || pageElement.length == 0) && ruleParser.curSiteRule.smart) {
@@ -11800,7 +11813,7 @@
1180011813
example = compareNodeName(example, ["tr", "tbody"]) ? example : example.nextElementSibling || example;
1180111814
if (compareNodeName(example, ["tbody"])) example = example.querySelector("tr");
1180211815
let nextTr = example;
11803-
while (nextTr && nextTr.children.length == 0) nextTr = nextTr.nextElementSibling;
11816+
while (nextTr && (nextTr.children.length == 0 || (nextTr.children.length == 1 && !nextTr.children[0].offsetParent))) nextTr = nextTr.nextElementSibling;
1180411817
if (nextTr) example = nextTr;
1180511818
let tdNum = 0;
1180611819
if (exampleStyle.display == "table-row") {

0 commit comments

Comments
 (0)