|
31 | 31 | // @name:da Pagetual |
32 | 32 | // @name:fr-CA Pagetual |
33 | 33 | // @namespace hoothin |
34 | | -// @version 1.9.37.123 |
| 34 | +// @version 1.9.37.124 |
35 | 35 | // @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. |
36 | 36 | // @description:zh-CN 终极自动翻页 - 加载并拼接下一分页内容至当前页尾,智能适配任意网页 |
37 | 37 | // @description:zh-TW 終極自動翻頁 - 加載並拼接下一分頁內容至當前頁尾,智能適配任意網頁 |
|
5568 | 5568 | posEle = posEle.previousElementSibling || posEle.parentNode; |
5569 | 5569 | } |
5570 | 5570 | if (posEle && posEle.lastElementChild) { |
5571 | | - if (posEle.scrollHeight === 0) posEle = posEle.lastElementChild; |
| 5571 | + if (posEle.scrollHeight === 0 && posEle.lastElementChild.offsetParent) posEle = posEle.lastElementChild; |
5572 | 5572 | else if (posEle.lastElementChild.offsetTop > 500) { |
5573 | 5573 | posEle = posEle.lastElementChild; |
5574 | 5574 | } |
|
7618 | 7618 | text-shadow: rgb(255 255 255) 0px 0px 10px; |
7619 | 7619 | } |
7620 | 7620 | #pagetual-sideController #pagetual-sideController-pagenum { |
7621 | | - font-size: 15px!important; |
| 7621 | + font-size: 12px!important; |
7622 | 7622 | line-height: 30px; |
7623 | 7623 | text-align: center; |
7624 | 7624 | position: absolute; |
|
9950 | 9950 | configCon.appendChild(blacklistBtn); |
9951 | 9951 | configCon.appendChild(blacklistInput); |
9952 | 9952 | let saveBtn = document.createElement("button"); |
| 9953 | + langSelect.onchange = e => { |
| 9954 | + saveBtn.click(); |
| 9955 | + setTimeout(() => { |
| 9956 | + location.reload(); |
| 9957 | + }, 500); |
| 9958 | + }; |
9953 | 9959 | saveBtn.innerHTML = i18n("save"); |
9954 | 9960 | saveBtn.id = "saveBtn"; |
9955 | 9961 | configCon.appendChild(saveBtn); |
|
10328 | 10334 | }, 100); |
10329 | 10335 | } |
10330 | 10336 | _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 | + } |
10332 | 10340 | }); |
10333 | 10341 | if (rulesData.blacklist && rulesData.blacklist.length > 0) { |
10334 | 10342 | let href = location.href.slice(0, 500); |
|
10411 | 10419 | rulesData.updateNotification = true; |
10412 | 10420 | } |
10413 | 10421 | if (typeof(rulesData.initRun) == "undefined") { |
10414 | | - rulesData.initRun = true; |
| 10422 | + rulesData.initRun = false; |
10415 | 10423 | } |
10416 | 10424 | if (typeof(rulesData.preload) == "undefined") { |
10417 | 10425 | rulesData.preload = false; |
|
10669 | 10677 | if (!ruleParser.curSiteRule.smart || !xhrFailed) { |
10670 | 10678 | xhrFailed = true; |
10671 | 10679 | return callback(false); |
| 10680 | + } else { |
| 10681 | + if (!ruleParser.curSiteRule.sleep) { |
| 10682 | + ruleParser.curSiteRule.sleep = 1000; |
| 10683 | + return callback(false); |
| 10684 | + } |
10672 | 10685 | } |
10673 | 10686 | } |
10674 | 10687 | if (inCors && (!pageElement || pageElement.length == 0) && ruleParser.curSiteRule.smart) { |
|
11800 | 11813 | example = compareNodeName(example, ["tr", "tbody"]) ? example : example.nextElementSibling || example; |
11801 | 11814 | if (compareNodeName(example, ["tbody"])) example = example.querySelector("tr"); |
11802 | 11815 | 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; |
11804 | 11817 | if (nextTr) example = nextTr; |
11805 | 11818 | let tdNum = 0; |
11806 | 11819 | if (exampleStyle.display == "table-row") { |
|
0 commit comments