Skip to content

Commit

Permalink
1.9.37.116
Browse files Browse the repository at this point in the history
  • Loading branch information
hoothin committed Dec 25, 2024
1 parent cf03bc4 commit cfb00b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Pagetual/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[☯️](https://greasyfork.org/scripts/438684 "Install from greasyfork")東方永頁機 [v.1.9.37.115](https://greasyfork.org/scripts/438684-pagetual/code/Pagetual.user.js "Latest version")
[☯️](https://greasyfork.org/scripts/438684 "Install from greasyfork")東方永頁機 [v.1.9.37.116](https://greasyfork.org/scripts/438684-pagetual/code/Pagetual.user.js "Latest version")
==
*Pagetual - Perpetual pages. Auto loading paginated web pages for 90% of all web sites !*

Expand Down
10 changes: 6 additions & 4 deletions Pagetual/pagetual.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
// @name:da Pagetual
// @name:fr-CA Pagetual
// @namespace hoothin
// @version 1.9.37.115
// @version 1.9.37.116
// @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.
// @description:zh-CN 终极自动翻页 - 加载并拼接下一分页内容至当前页尾,智能适配任意网页
// @description:zh-TW 終極自動翻頁 - 加載並拼接下一分頁內容至當前頁尾,智能適配任意網頁
Expand Down Expand Up @@ -3045,6 +3045,7 @@
"body [class*=Pages]>.curr+a",
"body [class*=page]>.cur+a",
"body [class*=paginat] [class*=current]+li>a",
"body [class*=paginat] [class*=next-next]",
"body [class*=paginat] [class*=next]",
"body [class*=paginat] [class*=right]",
".page>em+a",
Expand Down Expand Up @@ -8607,7 +8608,7 @@
}

const loadmoreReg = /^\s*((点击)?((加载|展开)(更多|剩余)|继续加载)|(點擊)?((加載|展開)(更多|剩餘)|繼續加載)|load\s*more|もっと読み込む)[\.…▼\s\d%]*$/i;
const defaultLoadmoreSel = ".loadMore,.LoadMore,[class*='load-more'],button.show_more,.button-show-more,button[data-testid='more-results-button'],#btn_preview_remain,.view-more-btn";
const defaultLoadmoreSel = ".loadMore,.LoadMore,[class^='load-more'],[class*=' load-more'],button.show_more,.button-show-more,button[data-testid='more-results-button'],#btn_preview_remain,.view-more-btn";
function getLoadMore(doc, loadmoreBtn) {
if (!loadmoreBtn || !getBody(doc).contains(loadmoreBtn) || /less/.test(loadmoreBtn.innerText)) loadmoreBtn = null;
let loadMoreSel = ruleParser.curSiteRule.loadMore;
Expand Down Expand Up @@ -9384,7 +9385,7 @@
[...inputs].forEach(input => {
let sel = geneSelector(input, true, true);
let mirrorEle = iframeDoc.querySelector(sel);
if (!mirrorEle) return;
if (!mirrorEle || !mirrorEle.offsetParent) return;
if (mirrorEle.type === "checkbox" || mirrorEle.type === "radio") {
mirrorEle.checked = !!input.checked;
} else {
Expand All @@ -9394,8 +9395,9 @@
[...selectOptions].forEach(option => {
let sel = geneSelector(option, true, true);
let mirrorEle = iframeDoc.querySelector(sel);
if (!mirrorEle) return;
if (!mirrorEle || !mirrorEle.parentNode.offsetParent) return;
let selected = option.selected;
if (mirrorEle.selected === selected) return;
mirrorEle.selected = !!selected;
if (selected) {
mirrorEle.parentNode.dispatchEvent(new Event('change'));
Expand Down

0 comments on commit cfb00b8

Please sign in to comment.