Skip to content

Commit 4cc8247

Browse files
committed
1.9.37.122
1 parent 8a4f327 commit 4cc8247

File tree

2 files changed

+27
-15
lines changed

2 files changed

+27
-15
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.121](https://hoothin.github.io/UserScripts/Pagetual/pagetual.user.js "Latest version")
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")
22
==
33
*Pagetual - Perpetual pages. Auto loading paginated web pages for 90% of all web sites !*
44

Pagetual/pagetual.user.js

Lines changed: 26 additions & 14 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.121
34+
// @version 1.9.37.122
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 終極自動翻頁 - 加載並拼接下一分頁內容至當前頁尾,智能適配任意網頁
@@ -8014,32 +8014,32 @@
80148014
margin-top: 30px!important;
80158015
pointer-events: all;
80168016
}
8017-
.pagetual_pageBar span>svg {
8017+
.pagetual_pageBar a>svg {
80188018
-moz-transition:transform 0.5s ease, opacity 0.3s ease;
80198019
-webkit-transition:transform 0.5s ease, opacity 0.3s ease;
80208020
transition:transform 0.5 ease, opacity 0.3s ease;
80218021
opacity: 0;
80228022
}
8023-
.pagetual_pageBar.stop span>svg{
8023+
.pagetual_pageBar.stop a>svg{
80248024
opacity: 1;
80258025
}
8026-
.pagetual_pageBar.stop span>svg>path{
8026+
.pagetual_pageBar.stop a>svg>path{
80278027
transform: scale(.8);
80288028
transform-origin: center;
80298029
-moz-transition:transform 0.3s ease;
80308030
-webkit-transition:transform 0.3s ease;
80318031
transition:transform 0.3 ease;
80328032
}
8033-
.pagetual_pageBar.stop:hover span>svg>path{
8033+
.pagetual_pageBar.stop:hover a>svg>path{
80348034
transform: unset;
80358035
}
8036-
.pagetual_pageBar:hover span>svg {
8036+
.pagetual_pageBar:hover a>svg {
80378037
opacity: 1;
80388038
}
8039-
.pagetual_pageBar span>svg.upSvg:hover {
8039+
.pagetual_pageBar a>svg.upSvg:hover {
80408040
transform: rotate(360deg) scale3d(1.2, 1.2, 1.2);
80418041
}
8042-
.pagetual_pageBar span>svg.downSvg:hover {
8042+
.pagetual_pageBar a>svg.downSvg:hover {
80438043
transform: rotate(540deg) scale3d(1.2, 1.2, 1.2)!important;
80448044
}
80458045
.pagetual_pageBar .pagetual_pageNum{
@@ -8773,8 +8773,8 @@
87738773
inLi = compareNodeName(example, ["li"]) || (example.nextElementSibling && compareNodeName(example.nextElementSibling, ["li"]));
87748774
}
87758775
let pageBar = document.createElement(inTable ? "tr" : (inLi ? "li" : "div"));
8776-
let upSpan = document.createElement("span");
8777-
let downSpan = document.createElement("span");
8776+
let upSpan = document.createElement("a");
8777+
let downSpan = document.createElement("a");
87788778
let pageText = document.createElement("a");
87798779
let pageNum;
87808780
pageBar.className = isHideBar ? "pagetual_pageBar autopagerize_page_info hide" : "pagetual_pageBar autopagerize_page_info";
@@ -8787,6 +8787,7 @@
87878787
upSpan.innerHTML = createHTML(upSvg);
87888788
upSpan.children[0].style.cssText = upSvgCSS;
87898789
upSpan.title = i18n("toTop");
8790+
upSpan.href = ruleParser.initUrl || '';
87908791
downSpan.innerHTML = createHTML(downSvg);
87918792
downSpan.children[0].style.cssText = downSvgCSS;
87928793
downSpan.title = i18n("toBottom");
@@ -9006,21 +9007,32 @@
90069007
}
90079008

90089009
upSpan.addEventListener("click", e => {
9010+
e.stopPropagation();
9011+
if (e.altKey || e.ctrlKey || e.shiftKey || e.metaKey) {
9012+
if (e.altKey) location.href = upSpan.href;
9013+
return;
9014+
}
90099015
getBody(document).scrollTop = 0;
90109016
document.documentElement.scrollTop = 0;
90119017
e.preventDefault();
9012-
e.stopPropagation();
9018+
});
9019+
downSpan.addEventListener("mousedown", e => {
9020+
if (ruleParser.nextLinkHref && ruleParser.nextLinkHref != '#') {
9021+
downSpan.href = ruleParser.nextLinkHref;
9022+
} else downSpan.href = '';
90139023
});
90149024
downSpan.addEventListener("click", e => {
9015-
if (!e.altKey && !e.ctrlKey && !e.shiftKey && !e.metaKey) {
9016-
changeStop(true);
9025+
e.stopPropagation();
9026+
if (e.altKey || e.ctrlKey || e.shiftKey || e.metaKey) {
9027+
if (e.altKey && downSpan.getAttribute('href')) location.href = upSpan.href;
9028+
return;
90179029
}
9030+
changeStop(true);
90189031
pageBar.title = i18n(isPause ? "enable" : "disable");
90199032
scrollH = Math.max(document.documentElement.scrollHeight, getBody(document).scrollHeight);
90209033
getBody(document).scrollTop = scrollH || 9999999;
90219034
document.documentElement.scrollTop = scrollH || 9999999;
90229035
e.preventDefault();
9023-
e.stopPropagation();
90249036
});
90259037
pageBar.addEventListener("click", e => {
90269038
changeStop(!isPause);

0 commit comments

Comments
 (0)