mirror of
https://github.com/XIU2/UserScript.git
synced 2026-07-24 11:03:23 +00:00
优化 规则(以确保网页被翻译后依然可以翻页)
This commit is contained in:
+3
-3
@@ -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;
|
||||
}
|
||||
|
||||
+10
-10
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user