Skip to content

Commit 019b2f1

Browse files
committed
1.9.37.95
1 parent e38b513 commit 019b2f1

2 files changed

Lines changed: 18 additions & 2 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 "Install from greasyfork")東方永頁機 [v.1.9.37.94](https://greasyfork.org/scripts/438684-pagetual/code/Pagetual.user.js "Latest version")
1+
[☯️](https://greasyfork.org/scripts/438684 "Install from greasyfork")東方永頁機 [v.1.9.37.95](https://greasyfork.org/scripts/438684-pagetual/code/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: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// @name:fr Pagetual
1212
// @name:it Pagetual
1313
// @namespace hoothin
14-
// @version 1.9.37.94
14+
// @version 1.9.37.95
1515
// @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.
1616
// @description:zh-CN 终极自动翻页 - 加载并拼接下一分页内容至当前页尾,智能适配任意网页
1717
// @description:zh-TW 終極自動翻頁 - 加載並拼接下一分頁內容至當前頁尾,智能適配任意網頁
@@ -2274,6 +2274,22 @@
22742274
let loading = parent.querySelector('[class*=loading]');
22752275
if (loading && loading.offsetParent && loading.offsetHeight > parent.offsetHeight>>2) {
22762276
pageElement = null;
2277+
} else {
2278+
loading = parent.querySelector('[class*=skeleton-item]');
2279+
if (loading && loading.offsetParent && loading.offsetHeight) {
2280+
var actualTop = loading.offsetTop;
2281+
var current = loading.offsetParent;
2282+
while (current !== null) {
2283+
actualTop += current.offsetTop;
2284+
current = current.offsetParent;
2285+
}
2286+
getBody(doc).scrollTop = 0;
2287+
doc.documentElement.scrollTop = 0;
2288+
let maxHeight = Math.max(getBody(doc).scrollHeight, doc.documentElement.scrollHeight);
2289+
getBody(doc).scrollTop = actualTop - 10;
2290+
doc.documentElement.scrollTop = actualTop - 10;
2291+
pageElement = null;
2292+
}
22772293
}
22782294
}
22792295
}

0 commit comments

Comments
 (0)