|
10 | 10 | // @name:it Pagetual |
11 | 11 | // @name:ko 東方永頁機 |
12 | 12 | // @namespace hoothin |
13 | | -// @version 1.9.36.32 |
14 | | -// @description Perpetual pages - Most powerful auto-pager script. Auto loading next paginated web pages and inserting into current page. Support thousands of web sites without any rule. |
| 13 | +// @version 1.9.36.33 |
| 14 | +// @description Perpetual pages - powerful auto-pager script. Auto loading next paginated web pages and inserting into current page. Support thousands of web sites without any rule. |
15 | 15 | // @description:zh-CN 终极自动翻页 - 加载并拼接下一分页内容至当前页尾,智能适配任意网页 |
16 | 16 | // @description:zh-TW 終極自動翻頁 - 加載並拼接下一分頁內容至當前頁尾,智能適配任意網頁 |
17 | 17 | // @description:ja Webページを自動で読み込み継ぎ足し表示を行うブラウザ拡張です、次のページ付けされた Web ページの自動読み込みと現在のページへの挿入 ルールなしで何千もの Web サイトをサポートします。 |
|
883 | 883 | let parent = ele.parentElement; |
884 | 884 | if (parent) { |
885 | 885 | selector = geneSelector(parent, addID) + ' > ' + selector; |
886 | | - if (!className && !hasId && parent.children.length > 1) { |
887 | | - let i, j = 0; |
| 886 | + if (!className && !hasId && parent.children.length > 1 && !/^HTML$/i.test(parent.nodeName)) { |
| 887 | + let i, nth = 0, all = 0; |
888 | 888 | for (i = 0; i < parent.children.length; i++) { |
889 | 889 | if (parent.children[i].nodeName == ele.nodeName) { |
890 | | - j++; |
| 890 | + all++; |
891 | 891 | if (parent.children[i] == ele) { |
892 | | - break; |
| 892 | + nth = all; |
893 | 893 | } |
| 894 | + if (nth > 0 && all > 1) break; |
894 | 895 | } |
895 | 896 | } |
896 | | - selector += (/^HTML$/i.test(parent.nodeName) ? "" : `:nth-of-type(${j})`); |
| 897 | + selector += (all == 1 ? "" : `:nth-of-type(${nth})`); |
897 | 898 | } |
898 | 899 | } |
899 | 900 | } |
|
1574 | 1575 | debug(self.curSiteRule.pageElement, 'Page element'); |
1575 | 1576 | return [ele]; |
1576 | 1577 | } |
1577 | | - if (curHeight / bodyHeight <= 0.25) { |
| 1578 | + if (curHeight / bodyHeight <= 0.22) { |
1578 | 1579 | let article = doc.querySelectorAll(mainSel); |
1579 | 1580 | if (article && article.length == 1) { |
1580 | 1581 | article = article[0]; |
|
1654 | 1655 | } |
1655 | 1656 | } |
1656 | 1657 | if (h < minHeight) { |
1657 | | - if (!needCheckNext || h < (windowHeight>>1) || !ele.contains(self.initNext)) { |
| 1658 | + if (!needCheckNext || h < (windowHeight>>2) || !ele.contains(self.initNext)) { |
1658 | 1659 | continue; |
1659 | 1660 | } |
1660 | 1661 | } |
|
4377 | 4378 | clearInterval(autoScrollInterval); |
4378 | 4379 | if (autoScroll <= 0) return; |
4379 | 4380 | autoScrollInterval = setInterval(() => { |
| 4381 | + if (isPause) return; |
4380 | 4382 | window.scroll(window.scrollX, window.scrollY + 1); |
4381 | 4383 | }, parseInt(1000 / autoScroll)); |
4382 | 4384 | } |
|
0 commit comments