|
3 | 3 | // @name:zh-CN 自动无缝翻页 |
4 | 4 | // @name:zh-TW 自動無縫翻頁 |
5 | 5 | // @name:en AutoPager |
6 | | -// @version 6.3.11 |
| 6 | +// @version 6.3.12 |
7 | 7 | // @author X.I.U |
8 | 8 | // @description ⭐无缝加载 下一页内容 至网页底部(类似瀑布流)⭐,目前支持:【所有「Discuz!、Flarum、phpBB、Xiuno、XenForo、NexusPHP...」论坛】【百度、谷歌(Google)、必应(Bing)、搜狗、微信、360、Yahoo、Yandex 等搜索引擎...】、贴吧、豆瓣、知乎、B 站(bilibili)、NGA、V2EX、煎蛋网、龙的天空、起点中文、千图网、千库网、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(以上仅一小部分,更多的写不下了... |
9 | 9 | // @description:zh-TW ⭐無縫加載 下一頁內容 至網頁底部(類似瀑布流)⭐,支持各論壇、社交、遊戲、漫畫、小說、學術、搜索引擎(Google、Bing、Yahoo...) 等網站~ |
|
98 | 98 | 'https://js.cdn.haah.net/gh/XIU2/UserScript/other/Autopage/rules.json', |
99 | 99 | 'https://raw.iqiq.io/XIU2/UserScript/master/other/Autopage/rules.json', |
100 | 100 | 'https://raw.kgithub.com/XIU2/UserScript/master/other/Autopage/rules.json', |
101 | | - //'https://ghproxy.net/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', |
| 101 | + 'https://ghproxy.net/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', |
102 | 102 | 'https://github.moeyy.xyz/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', |
103 | 103 | 'https://cdn.staticaly.com/gh/XIU2/UserScript/master/other/Autopage/rules.json', |
104 | 104 | 'https://gcore.jsdelivr.net/gh/XIU2/UserScript/other/Autopage/rules.json', |
105 | | - 'https://fastly.jsdelivr.net/gh/XIU2/UserScript/other/Autopage/rules.json', |
106 | | - 'https://raw.githubusercontents.com/XIU2/UserScript/master/other/Autopage/rules.json' |
| 105 | + 'https://fastly.jsdelivr.net/gh/XIU2/UserScript/other/Autopage/rules.json' |
| 106 | + //'https://raw.githubusercontents.com/XIU2/UserScript/master/other/Autopage/rules.json' |
107 | 107 | ], urlArr2 = [ |
108 | 108 | 'https://userscript.gh2233.ml/other/Autopage/rules.json', |
109 | 109 | 'https://userscript.xiu2.xyz/other/Autopage/rules.json', |
|
112 | 112 | 'https://raw.fastgit.org/XIU2/UserScript/master/other/Autopage/rules.json', |
113 | 113 | 'https://raw.iqiq.io/XIU2/UserScript/master/other/Autopage/rules.json', |
114 | 114 | 'https://raw.kgithub.com/XIU2/UserScript/master/other/Autopage/rules.json', |
115 | | - //'https://ghproxy.net/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', |
| 115 | + 'https://ghproxy.net/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json', |
116 | 116 | 'https://github.moeyy.xyz/https://raw.githubusercontent.com/XIU2/UserScript/master/other/Autopage/rules.json' |
117 | 117 | ], |
118 | 118 | loadMoreExclude1 = ['stackoverflow.com'], |
|
267 | 267 | } else if (getCSS('head meta[name="generator" i][content="nexusphp" i]') || getXpath('id("footer")[contains(string(), "NexusPHP")]')) { |
268 | 268 | console.info(`[自动无缝翻页] - <NexusPHP> 论坛`); return 7; |
269 | 269 |
|
270 | | - } else if (loadMoreExclude(loadMoreExclude1) && getAllCSS('.load-more, .load_more, .loadmore, #load-more, #load_more, #loadmore, .show-more, .show_more').length === 1) { |
| 270 | + } else if (loadMoreExclude(loadMoreExclude1) && getAllCSS('.load-more, .load_more, .loadmore, #load-more, #load_more, #loadmore, [id^="loadmore"], .show-more, .show_more').length === 1) { |
271 | 271 | console.info(`[自动无缝翻页] - 部分自带 自动无缝翻页 的网站 1`); return 8; |
272 | 272 |
|
273 | 273 | } else if (loadMoreExclude(loadMoreExclude2) && getAllXpath('//*[self::a or self::span or self::button or self::div][text()="加载更多" or text()="查看更多"][not(@href) or @href="#" or starts-with(@href, "javascript")]').length === 1) { |
|
313 | 313 | if (getAllCSS('main').length == 1) { |
314 | 314 | if (getAllCSS('main .posts-wrapper.row>div>article').length > 3) { |
315 | 315 | DBSite.wp_article.pager.pageE = 'main .posts-wrapper.row>div' |
| 316 | + } else if (getAllXpath('//main//div[contains(@class,"row")]/div/article').length > 3) { |
| 317 | + DBSite.wp_article.pager.pageE = '//main//div[contains(@class,"row")]/div/article/parent::div' |
316 | 318 | } else if (getAllCSS('main article[id^="post-"]').length > 3) { |
317 | 319 | DBSite.wp_article.pager.pageE = 'main article[id^="post-"]' |
318 | 320 | } else if (getAllCSS('main article[class]').length > 3) { |
|
327 | 329 |
|
328 | 330 | if (getAllCSS('.posts-wrapper.row>div>article').length > 3) { |
329 | 331 | DBSite.wp_article.pager.pageE = '.posts-wrapper.row>div' |
| 332 | + } else if (getAllXpath('//div[contains(@class,"row")]/div/article').length > 3) { |
| 333 | + DBSite.wp_article.pager.pageE = '//div[contains(@class,"row")]/div/article/parent::div' |
330 | 334 | } else if (getAllCSS('article[id^="post-"]').length > 3) { |
331 | 335 | DBSite.wp_article.pager.pageE = 'article[id^="post-"]' |
332 | 336 | } else if (getAllCSS('article[class]').length > 3) { |
|
387 | 391 | case 7: // < 所有 NexusPHP 论坛 > |
388 | 392 | DBSite.nexusphp.url(); break; |
389 | 393 | case 8: // < 部分自带 自动无缝翻页 的网站 1 > |
390 | | - DBSite.loadmore.url('.load-more, .load_more, .loadmore, #load-more, #load_more, #loadmore, .show-more, .show_more'); break; |
| 394 | + DBSite.loadmore.url('.load-more, .load_more, .loadmore, #load-more, #load_more, #loadmore, [id^="loadmore"], .show-more, .show_more'); break; |
391 | 395 | case 9: // < 部分自带 自动无缝翻页 的网站 2 > |
392 | 396 | DBSite.loadmore.url('//*[self::a or self::span or self::button or self::div][text()="加载更多" or text()="查看更多"][not(@href) or @href="#" or starts-with(@href, "javascript")]'); break; |
393 | 397 | case 10: // < 部分使用 WordPress 的网站 > |
@@ -506,7 +510,7 @@ function: { |
506 | 510 | if (!indexOF('/post/') && !getCSS('#comments, .comments-area, #disqus_thread')) { |
507 | 511 | curSite = DBSite.wp_article; |
508 | 512 | // 自适应瀑布流样式 |
509 | | - setTimeout(()=>{if (getCSS(curSite.pager.pageE).style.cssText.indexOf('position: absolute') != -1){insStyle(curSite.pager.pageE + '{position: static !important; float: left !important; height: '+ parseInt(getCSS(curSite.pager.pageE).offsetHeight * 1.1) + 'px !important;}');}}, 1500); |
| 513 | + setTimeout(()=>{if (getOne(curSite.pager.pageE).style.cssText.indexOf('position: absolute') != -1){insStyle(curSite.pager.pageE + '{position: static !important; float: left !important; height: '+ parseInt(getCSS(curSite.pager.pageE).offsetHeight * 1.1) + 'px !important;}');}}, 1500); |
510 | 514 | } |
511 | 515 | }, |
512 | 516 | style: 'img[data-src], img[data-original] {opacity: 1 !important;}', |
|
0 commit comments