33// @name :zh-CN 自动无缝翻页
44// @name :zh-TW 自動無縫翻頁
55// @name :en AutoPager
6- // @version 5.5.2
6+ // @version 5.5.3
77// @author X.I.U
88// @description ⭐无缝衔接下一页内容到网页底部(类似瀑布流)⭐,目前支持:【所有「Discuz!、Flarum、phpBB、Xiuno、XenForo、NexusPHP...」论坛】【百度、谷歌(Google)、必应(Bing)、搜狗、微信、360、Yahoo、Yandex 等搜索引擎...】、贴吧、豆瓣、知乎、微博、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(以上仅一小部分,更多的写不下了...
99// @description :zh-TW ⭐無縫銜接下一頁內容到網頁底部(類似瀑布流)⭐,支持各論壇、社交、遊戲、漫畫、小說、學術、搜索引擎(Google、Bing、Yahoo...) 等網站~
213213 return - 1 ;
214214 } else if ( typeof discuz_uid != 'undefined' || getCSS ( 'meta[name="author" i][content*="Discuz!" i], meta[name="generator" i][content*="Discuz!" i], body[id="nv_forum" i][class^="pg_" i][onkeydown*="27"], body[id="nv_search" i][onkeydown*="27"]' ) || getXpath ( 'id("ft")[contains(string(),"Discuz!")]' ) ) {
215215 console . info ( `[自动无缝翻页] - <Discuz!> 论坛` ) ; return 2 ;
216+
216217 } else if ( typeof flarum != 'undefined' || getCSS ( '#flarum-loading' ) ) {
217218 console . info ( `[自动无缝翻页] - <Flarum> 论坛` ) ; return 3 ;
219+
218220 } else if ( typeof phpbb != 'undefined' || getCSS ( 'body#phpbb' ) ) {
219221 console . info ( `[自动无缝翻页] - <phpBB> 论坛` ) ; return 4 ;
222+
220223 } else if ( typeof xn != 'undefined' && getXpath ( '//footer//a[contains(string(), "Xiuno")] | //link[contains(@href, "xiuno")] | //script[contains(@src, "xiuno")]' ) ) {
221224 console . info ( `[自动无缝翻页] - <Xiuno> 论坛` ) ; return 5 ;
225+
222226 } else if ( typeof XF != 'undefined' ) {
223227 console . info ( `[自动无缝翻页] - <XenForo> 论坛` ) ; return 6 ;
228+
224229 } else if ( getCSS ( 'head meta[name="generator" i][content="nexusphp" i]' ) || getXpath ( 'id("footer")[contains(string(), "NexusPHP")]' ) ) {
225230 console . info ( `[自动无缝翻页] - <NexusPHP> 论坛` ) ; return 7 ;
231+
226232 } else if ( getAllCSS ( '.load-more, .loadmore, #load-more, #loadmore, .show_more' ) . length === 1 ) {
227233 console . info ( `[自动无缝翻页] - 部分自带 自动无缝翻页 的网站 1` ) ; return 8 ;
234+
228235 } else if ( getAllXpath ( '//*[@onclick][text()="加载更多" or text()="查看更多"][not(@href) or @href="#" or starts-with(@href, "javascript")]' ) . length === 1 ) {
229236 console . info ( `[自动无缝翻页] - 部分自带 自动无缝翻页 的网站 2` ) ; return 9 ;
230- } else if ( getCSS ( 'link[href*="themes/dux" i], script[src*="themes/dux" i]' ) ) {
231- console . info ( `[自动无缝翻页] - 使用 WordPress <DUX> 主题的网站` ) ; return 100 ;
232- } else if ( getCSS ( 'link[href*="themes/xiu" i], script[src*="themes/xiu" i]' ) ) {
233- console . info ( `[自动无缝翻页] - 使用 WordPress <XIU> 主题的网站` ) ; return 101 ;
234- } else if ( getCSS ( 'link[href*="themes/d8" i], script[src*="themes/d8" i]' ) ) {
235- console . info ( `[自动无缝翻页] - 使用 WordPress <D8> 主题的网站` ) ; return 102 ;
236- } else if ( getCSS ( 'link[href*="themes/begin" i], script[src*="themes/begin" i], img[src*="themes/begin" i]' ) ) {
237- console . info ( `[自动无缝翻页] - 使用 WordPress <Begin> 主题的网站` ) ; return 103 ;
237+
238238 } else if ( getCSS ( 'link[href*="/wp-content/" i], script[src*="/wp-content/" i]' ) ) {
239239 if ( getAllCSS ( 'article[class], div[id^="post-"]' ) . length > 2 && getCSS ( '#nav-below, nav.navigation, nav.paging-navigation, .pagination, .wp-pagenavi, .pagenavi' ) ) {
240- if ( getCSS ( 'a.next' ) ) {
241- console . info ( `[自动无缝翻页] - 部分使用 WordPress 的网站 (a.next)` ) ; return 104 ;
240+ if ( getCSS ( 'a.next, a.next-page ' ) ) {
241+ console . info ( `[自动无缝翻页] - 部分使用 WordPress 的网站 (a.next)` ) ; return 100 ;
242242 } else if ( getCSS ( 'a[rel="next" i], a[aria-label="Next Page" i], a[aria-label="下一页"]' ) ) {
243- console . info ( `[自动无缝翻页] - 部分使用 WordPress 的网站 (a[rel="next"])` ) ; return 105 ;
243+ console . info ( `[自动无缝翻页] - 部分使用 WordPress 的网站 (a[rel="next"])` ) ; return 101 ;
244244 } else if ( getCSS ( 'li.next-page > a' ) ) {
245- console . info ( `[自动无缝翻页] - 部分使用 WordPress 的网站 (li.next-page > a)` ) ; return 106 ;
246- } else if ( getCSS ( '.nav-previous a' ) ) {
247- console . info ( `[自动无缝翻页] - 部分使用 WordPress 的网站 (旧文章)` ) ; return 107 ;
245+ console . info ( `[自动无缝翻页] - 部分使用 WordPress 的网站 (li.next-page > a)` ) ; return 102 ;
246+ } else if ( getCSS ( '.nav-previous a, a.nav-previous ' ) ) {
247+ console . info ( `[自动无缝翻页] - 部分使用 WordPress 的网站 (旧文章)` ) ; return 103 ;
248248 } else if ( getXpath ( '//a[contains(text(), "下一页") or contains(text(), ">") or contains(text(), "next") or contains(text(), "Next") or contains(text(), "NEXT")]' , getCSS ( '#nav-below, nav.navigation, nav.paging-navigation, .pagination, .wp-pagenavi, .pagenavi' ) ) ) {
249- console . info ( `[自动无缝翻页] - 部分使用 WordPress 的网站 (下一页)` ) ; return 108 ;
249+ console . info ( `[自动无缝翻页] - 部分使用 WordPress 的网站 (下一页)` ) ; return 104 ;
250250 }
251251 }
252252 } else if ( getCSS ( 'meta[name="description" i][content*="小说"], meta[name="description" i][content*="章节"], meta[name="description" i][content*="阅读"]' ) || location . hostname . indexOf ( 'biqu' ) > - 1 || document . title . indexOf ( '笔趣阁' ) > - 1 ) {
278278 DBSite . loadmore . url ( '.load-more, .loadmore, #load-more, #loadmore, .show_more' ) ; break ;
279279 case 9 : // < 部分自带 自动无缝翻页 的网站 2 >
280280 DBSite . loadmore . url ( '//*[@onclick][text()="加载更多" or text()="查看更多"][not(@href) or @href="#" or starts-with(@href, "javascript")]' ) ; break ;
281- case 100 : // < 所有使用 WordPress DUX 主题的网站 >
282- DBSite . dux . url ( ) ; if ( location . hostname === 'apphot.cc' ) { curSite . pager . scrollD = 2500 ; } ; break ;
283- case 101 : // < 所有使用 WordPress XIU 主题的网站 >
284- DBSite . dux . url ( ) ; curSite . function = { bF : src_bF , bFp : [ 0 , 'img.thumb[data-original]' , 'data-original' ] } ; break ;
285- case 102 : // < 所有使用 WordPress D8 主题的网站 >
286- DBSite . dux . url ( ) ; delete curSite . function ; break ;
287- case 103 : // < 所有使用 WordPress Begin 主题的网站 >
288- DBSite . begin . url ( ) ; break ;
289- case 104 : // < 部分使用 WordPress 的网站 (a.next) >
290- DBSite . wp_article . url ( 'a.next' ) ; break ;
291- case 105 : // < 部分使用 WordPress 的网站 (a[rel="next"]) >
281+ case 100 : // < 部分使用 WordPress 的网站 (a.next) >
282+ DBSite . wp_article . url ( 'a.next, a.next-page' ) ; break ;
283+ case 101 : // < 部分使用 WordPress 的网站 (a[rel="next"]) >
292284 DBSite . wp_article . url ( 'a[rel="next" i], a[aria-label="Next Page" i], a[aria-label="下一页"]' ) ; break ;
293- case 106 : // < 部分使用 WordPress 的网站 (li.next-page > a) >
285+ case 102 : // < 部分使用 WordPress 的网站 (li.next-page > a) >
294286 DBSite . wp_article . url ( 'li.next-page > a' ) ; break ;
295- case 107 : // < 部分使用 WordPress 的网站 (旧文章) >
296- DBSite . wp_article . url ( '.nav-previous a' ) ; break ;
297- case 108 : // < 部分使用 WordPress 的网站 (下一页) >
287+ case 103 : // < 部分使用 WordPress 的网站 (旧文章) >
288+ DBSite . wp_article . url ( '.nav-previous a, a.nav-previous ' ) ; break ;
289+ case 104 : // < 部分使用 WordPress 的网站 (下一页) >
298290 DBSite . wp_article . url ( '//*[self::ul or self::nav or self::div][@id="nav-below" or contains(@class, "navigation") or contains(@class, "pagination") or contains(@class, "pagenavi")]//a[contains(text(), "下一页") or contains(text(), ">") or contains(text(), "next") or contains(text(), "Next") or contains(text(), "NEXT")]' ) ; break ;
299291 case 200 : // < 所有使用 笔趣阁 1 模板的小说网站 >
300292 curSite = DBSite . biquge ; break ;
@@ -386,6 +378,15 @@ function: {
386378 scrollD : 2000
387379 }
388380 } , // 部分自带 自动无缝翻页 的网站
381+ wp_article : {
382+ url : function ( nextL ) { if ( ! indexOF ( '/post/' ) && ! getCSS ( '#comments, .comments-area, #disqus_thread' ) ) { curSite = DBSite . wp_article ; curSite . pager . nextL = nextL ; if ( getCSS ( 'img[data-src]' ) ) { curSite . function = { bF : "return fun.src_bF(pageE, [0, 'img[data-src]', 'data-src'])" } ; } else if ( getCSS ( 'img[data-original]' ) ) { curSite . function = { bF : "return fun.src_bF(pageE, [0, 'img[data-original]', 'data-original'])" } ; } } } ,
383+ blank : 1 ,
384+ pager : {
385+ pageE : 'article[class], div[id^="post-"]' ,
386+ replaceE : '#nav-below, nav.navigation, nav.paging-navigation, .pagination, .wp-pagenavi, .pagenavi' ,
387+ scrollD : 2000
388+ }
389+ } , // Wordpress 的 nav.navigation 规则
389390 discuz_forum : {
390391 pager : {
391392 type : 2 ,
@@ -573,43 +574,6 @@ function: {
573574 replaceE : '//p[@align][./font[@class="gray"]]'
574575 }
575576 } , // NexusPHP 论坛
576- dux : {
577- host : 'www.puresys.net' ,
578- url : ( ) => { if ( ! indexOF ( '.html' ) ) curSite = DBSite . dux ; } ,
579- pager : {
580- nextL : 'li.next-page > a' ,
581- pageE : '.content > article' ,
582- replaceE : '.content > .pagination'
583- } ,
584- function : {
585- bF : src_bF ,
586- bFp : [ 0 , 'img.thumb[data-src]' , 'data-src' ]
587- }
588- } , // WordPress 的 DUX、XIU、D8 主题
589- begin : {
590- url : ( ) => { if ( location . search . slice ( 0 , 3 ) === '?s=' ) { curSite = DBSite . begin_search ; } else if ( ! indexOF ( '.html' ) ) { curSite = DBSite . begin ; } } ,
591- pager : {
592- type : 2 ,
593- nextL : 'div[id^="ias_trigger_"]' ,
594- interval : 500
595- }
596- } , // WordPress 的 Begin 主题
597- begin_search : {
598- pager : {
599- nextL : 'a.next' ,
600- pageE : '#main > ul > li' ,
601- replaceE : 'nav.pagination'
602- }
603- } , // WordPress 的 Begin 主题 - 搜索页
604- wp_article : {
605- url : function ( nextL ) { if ( ! indexOF ( '/post/' ) && ! getCSS ( '#comments, .comments-area, #disqus_thread' ) ) { curSite = DBSite . wp_article ; curSite . pager . nextL = nextL ; if ( getCSS ( 'img[data-src]' ) ) { curSite . function = { bF : "return fun.src_bF(pageE, [0, 'img[data-src]', 'data-src'])" } ; } else if ( getCSS ( 'img[data-original]' ) ) { curSite . function = { bF : "return fun.src_bF(pageE, [0, 'img[data-original]', 'data-original'])" } ; } } } ,
606- blank : 1 ,
607- pager : {
608- pageE : 'article[class], div[id^="post-"]' ,
609- replaceE : '#nav-below, nav.navigation, nav.paging-navigation, .pagination, .wp-pagenavi, .pagenavi' ,
610- scrollD : 2000
611- }
612- } , // Wordpress 的 nav.navigation 规则
613577 biquge : {
614578 style : 'img, .posterror, a[href*="posterror()"], [style*="url("] {display: none !important;}' ,
615579 history : true ,
@@ -622,7 +586,7 @@ function: {
622586 }
623587 } , // 笔趣阁 模板的小说网站
624588 biquge2 : {
625- url : ( ) => { if ( isMobile ( ) || getCSS ( '.chapter-page-btn' ) ) { curSite = DBSite . biquge2_m ; } else { curSite = DBSite . biquge2 ; } } ,
589+ url : ( ) => { if ( isMobile ( ) || getCSS ( '.chapter-page-btn' ) != null ) { curSite = DBSite . biquge2_m ; } else { curSite = DBSite . biquge2 ; } } ,
626590 style : 'img, .posterror, a[href*="posterror()"], [style*="url("], #txt > *:not(br) {display: none !important;}' ,
627591 history : true ,
628592 pager : {
0 commit comments