From 34ec8a75ef6e99a42e600c47d073b0344acddf46 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Sun, 13 Mar 2022 13:18:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E8=A7=84=E5=88=99(?= =?UTF-8?q?=E4=BB=A5=E7=A1=AE=E4=BF=9D=E7=BD=91=E9=A1=B5=E8=A2=AB=E7=BF=BB?= =?UTF-8?q?=E8=AF=91=E5=90=8E=E4=BE=9D=E7=84=B6=E5=8F=AF=E4=BB=A5=E7=BF=BB?= =?UTF-8?q?=E9=A1=B5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 6 +++--- other/Autopage/rules.json | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index eea596f..2e51489 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -3,7 +3,7 @@ // @name:zh-CN 自动无缝翻页 // @name:zh-TW 自動無縫翻頁 // @name:en AutoPager -// @version 5.3.1 +// @version 5.3.2 // @author X.I.U // @description ⭐无缝衔接下一页内容到网页底部(类似瀑布流)⭐,目前支持:【所有「Discuz!、Flarum、phpBB、Xiuno、XenForo、NexusPHP...」论坛】【百度、谷歌(Google)、必应(Bing)、搜狗、微信、360、Yahoo、Yandex 等搜索引擎...】、贴吧、豆瓣、知乎、微博、NGA、V2EX、B 站(Bilibili)、煎蛋网、龙的天空、起点中文、千图网、千库网、Pixabay、Pixiv、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、RuTracker、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、小众软件、【动漫狂、漫画猫、漫画屋、漫画 DB、动漫之家、拷贝漫画、HiComic、Mangabz、Xmanhua 等漫画网站...】、PubMed、Z-Library、GreasyFork、Github、StackOverflow(以上仅一小部分,更多的写不下了... // @description:zh-TW ⭐無縫銜接下一頁內容到網頁底部(類似瀑布流)⭐,支持各論壇、社交、遊戲、漫畫、小說、學術、搜索引擎(Google、Bing、Yahoo...) 等網站~ @@ -234,7 +234,7 @@ console.info('[自动无缝翻页] - 部分使用 WordPress 的网站 (li.next-page > a)'); return 151; } else if (getCSS('.nav-previous a')) { console.info('[自动无缝翻页] - 部分使用 WordPress 的网站 (旧文章)'); return 152; - } else if (getXpath('//nav[contains(@class, "navigation")]//a[contains(text(), "下一页") or contains(text(), ">")]')) { + } else if (getXpath('//nav[contains(@class, "navigation")]//a/text()[contains(., "下一页") or contains(., ">") or contains(translate(.,"NEXT","next"), "next")]')) { console.info('[自动无缝翻页] - 部分使用 WordPress 的网站 (下一页)'); return 153; } } @@ -274,7 +274,7 @@ case 152: // < 部分使用 WordPress 的网站 (旧文章) > DBSite.wp_article.url('.nav-previous a'); break; case 153: // < 部分使用 WordPress 的网站 (下一页) > - DBSite.wp_article.url('//nav[contains(@class, "navigation")]//a[contains(text(), "下一页") or contains(text(), ">")]'); break; + DBSite.wp_article.url('//nav[contains(@class, "navigation")]//a/text()[contains(., "下一页") or contains(., ">") or contains(translate(.,"NEXT","next"), "next")]'); break; case 200: // < 所有使用 笔趣阁 模板的小说网站 > DBSite.biquge.url(); break; } diff --git a/other/Autopage/rules.json b/other/Autopage/rules.json index cb9771f..b144b24 100644 --- a/other/Autopage/rules.json +++ b/other/Autopage/rules.json @@ -1738,9 +1738,9 @@ "host": "cs.rin.ru", "url": "return (fun.lp() == '/forum/viewforum.php')", "pager": { - "nextL": "//td[@class='gensmall'][@align='right']//a[text()='Next']", + "nextL": "#pagecontent .gensmall[align='right'] strong~a", "pageE": "#pagecontent > table.tablebg > tbody > tr:not([align])", - "replaceE": "#pagecontent > table:first-child" + "replaceE": "#pagecontent .gensmall[align='right']" }, "function": { "bF": "for (let i = 0; i < pageE.length; i++) {if (pageE[i].textContent.replace(/\\n|\\t/g,'') === 'Topics') {pageE.splice(0,i+1); break;}}; return pageE;" @@ -1751,7 +1751,7 @@ "url": "return (fun.lp() == '/forum/viewtopic.php')", "thread": true, "pager": { - "nextL": "id('pageheader')/p[@class='gensmall']//a[text()='Next']", + "nextL": "#pageheader .gensmall strong~a", "pageE": "#pagecontent > table.tablebg:not(:nth-last-child(2)):not(:nth-child(2))", "replaceE": "#pagecontent >table:not(.tablebg), #pageheader p.gensmall", "scrollD": 2000 @@ -1761,7 +1761,7 @@ "host": "cs.rin.ru", "url": "return (fun.lp() == '/forum/search.php')", "pager": { - "nextL": "id('wrapcentre')/div[@class='nav']//a[text()='Next']", + "nextL": "#wrapcentre > .nav strong~a", "pageE": "#wrapcentre > form > table.tablebg > tbody > tr[class^='row'], #wrapcentre > form > table.tablebg > tbody > tr[valign]", "replaceE": "#wrapcentre > div" } @@ -2246,7 +2246,7 @@ "host": "yts.mx", "url": "/^\\/browse-movies/", "pager": { - "nextL": "//li/a[text()='Next »']", + "nextL": "//ul[contains(@class, 'tsc_pagination')]/li[./a[@class='current']]/following-sibling::li[1]/a", "pageE": ".browse-movie-wrap", "replaceE": ".tsc_pagination" } @@ -3038,7 +3038,7 @@ ], "url": "return ((fun.lp() == '/' || fun.indexOF(/^\\/page\\//)) || fun.indexOF('/category/'))", "pager": { - "nextL": "//div[@class='pagination']//a[contains(text(), 'Next')]", + "nextL": ".pagination li.current+li>a", "pageE": "article.article", "replaceE": ".pagination", "scrollD": 1000 @@ -3669,7 +3669,7 @@ ], "url": "/tab=stars/", "pager": { - "nextL": "//div[@class='paginate-container']//a[contains(text(), 'Next')]", + "nextL": "//div[@class='paginate-container']/div/*[last()]", "pageE": "#js-pjax-container .position-relative div[class^='col-lg-'] > div:not(.position-relative):not(.paginate-container)", "insertP": [ ".paginate-container", @@ -3686,7 +3686,7 @@ ], "url": "/tab=repositories/", "pager": { - "nextL": "//div[@class='paginate-container']//a[contains(text(), 'Next')]", + "nextL": "//div[@class='paginate-container']/div/*[last()]", "pageE": "#user-repositories-list > ul > li", "replaceE": ".paginate-container", "scrollD": 3000 @@ -3738,7 +3738,7 @@ ], "url": "return (fun.indexOF(/\\/tags$/))", "pager": { - "nextL": "//div[@class='pagination']/a[contains(text(), 'Next')]", + "nextL": "//div[@class='pagination']/*[last()]", "pageE": ".Box-body > div.Box-row", "replaceE": ".pagination", "scrollD": 3000 @@ -3751,7 +3751,7 @@ ], "url": "/\\/commits/", "pager": { - "nextL": "//div[@class='paginate-container']//a[contains(text(), 'Older')]", + "nextL": "//div[@class='paginate-container']/div/*[last()]", "pageE": "div.js-navigation-container > div", "replaceE": ".paginate-container", "scrollD": 3000