diff --git a/Autopage.user.js b/Autopage.user.js index 5ff9311..4ec41cd 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -3,7 +3,7 @@ // @name:zh-CN 自动无缝翻页 // @name:zh-TW 自動無縫翻頁 // @name:en AutoPager -// @version 5.7.6 +// @version 5.7.7 // @author X.I.U // @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(以上仅一小部分,更多的写不下了... // @description:zh-TW ⭐無縫銜接下一頁內容到網頁底部(類似瀑布流)⭐,支持各論壇、社交、遊戲、漫畫、小說、學術、搜索引擎(Google、Bing、Yahoo...) 等網站~ @@ -819,32 +819,6 @@ function: { scrollD: 1000 } }, // B 站(Bilibili) - 搜索页 - 专栏 - cartoonmad: { - host: ['www.cartoonmad.com','www.cartoonmad.cc'], - url: ()=> {if (indexOF('/comic/')) { - getCSS('body > table > tbody > tr:nth-child(4) > td > table > tbody > tr:first-child > td:first-child > a').href = 'javascript:void(0);'; // 清理图片上的链接 - curSite = DBSite.cartoonmad; - } else if (lp != '/') { - curSite = DBSite.cartoonmad_list; - }}, - style: 'body > table > tbody > tr:nth-child(4) > td > table > tbody > tr:first-child > td:not(:first-child) {display: none !important;} body > table > tbody > tr:nth-child(4) > td > table > tbody > tr:first-child > td:first-child img {max-width: 100%;height: auto;display: block !important;margin: 0 auto !important;}', - pager: { - nextL: cartoonmad_nextL, - pageE: 'body > table > tbody > tr:nth-child(4) > td > table > tbody > tr:first-child > td:first-child img', - replaceE: 'body > table > tbody > tr:nth-child(2), body > table > tbody > tr:nth-child(5)', - interval: 0, - scrollD: 2000 - } - }, // 动漫狂 - cartoonmad_list: { - blank: 1, - pager: { - nextL: '//a[@class="pages"][contains(text(), "下一頁")]', - pageE: 'td[background="/image/content_box4.gif"]+td > table > tbody > tr', - replaceE: '//a[@class="pages"]/parent::td/parent::tr | //font[contains(text(), "目前在第")]', - scrollD: 1000 - } - }, // 动漫狂 - 分类/搜索页 manhuacat: { host: ['www.manhuacat.com', 'www.maofly.com'], url: ()=> {if (indexOF(/\/manga\/\d+\/.+\.html/)) { @@ -1062,37 +1036,6 @@ function: { scrollD: 1000 } }, //动漫之家 - 日漫 - 最新更新 - acgn: { - host: 'comic.acgn.cc', - url: ()=> { - if (indexOF('/view-')) { - curSite = DBSite.acgn; - acgn_aF(); - } else if (indexOF('/cate-') || indexOF('/pinyin-')) { - curSite = DBSite.acgn_list; - } - }, - style: '.img1 {cursor: initial !important;}', - pager: { - nextL: '#next_chapter', - pageE: '.pic[_src]', - replaceE: '[class^="display_"]', - interval: 2000, - scrollD: 2000 - }, - function: { - aF: acgn_aF - } - }, // 动漫戏说 - acgn_list: { - blank: 1, - pager: { - nextL: 'a[rel="next"]', - pageE: 'ul#display > li', - replaceE: '#pagination', - scrollD: 1000 - } - }, // 动漫戏说 - 分类页 ykmh: { host: 'www.ykmh.com', url: ()=> {if (indexOF(/\/\d+\.html/)) { @@ -1819,23 +1762,6 @@ function: { } - // [漫画狂] 获取下一页地址 - function cartoonmad_nextL() { - let url = getXpath('//a[@class="pages"][contains(text(),"下一頁")]'); - if (url) { - if (url.getAttribute('href') === 'thend.asp') { - url = getXpath('//a[@class="pages"][contains(string(),"下一話")]') - if (url) return url.href; - pausePage = false; - GM_notification({text: `注意:该网站早期漫画章节,因为网站自身问题而无法翻至下一话(仅限于显示为 [第 X 卷]/[下一卷] 的)。\n因此需要手动去 [目录页] 进入下一卷!`, timeout: 10000}); - } else { - return url.href; - } - } - return ''; - } - - // [漫画猫] 初始化(显示本话所以图片) function manhuacat_init() { let _img = ''; @@ -2125,15 +2051,6 @@ function: { } - // [动漫戏说] 插入后函数(加载图片) - function acgn_aF() { - let old = getAllCSS('.pic[_src][id]'), _img = ''; - if (old.length > 0) { - for (let now of old) {now.outerHTML = `
`;} - } - } - - // [漫画星球] 插入数据 function mhxqiu_insertE(pageE, type) { if (!pageE) return @@ -2784,7 +2701,7 @@ function: { } } } else { // 获取主体元素失败后,尝试重新获取 - console.log(curSite.pager.pageE, pageE, curSite.pager.insertP, toE) + console.log(curSite.pager.pageE, pageE, curSite.pager.insertP, toE, response) if (curSite.retry) { console.warn('[自动无缝翻页] 获取主体元素失败,尝试重新获取...') setTimeout(function(){curSite.pageUrl = '';}, curSite.retry) diff --git a/other/Autopage/rules.json b/other/Autopage/rules.json index 0feede7..6aa50ea 100644 --- a/other/Autopage/rules.json +++ b/other/Autopage/rules.json @@ -1029,38 +1029,28 @@ "scrollD": 2000 } }, - "CADTutor - 列表页": { - "host": "www.cadtutor.net", - "url": "/\\/forum\\/forum\\//", + "CADTutor/LoversLab": { + "host": ["www.cadtutor.net","www.loverslab.com"], + "url": "/\\/(forum\\/\\d)|search/", "pager": { - "nextL": "a[rel='next']", - "pageE": "ol.ipsDataList>li:not([data-rowid])~li", + "nextL": "li.ipsPagination_next:not(.ipsPagination_inactive)>a", + "pageE": "ol.ipsDataList>li[data-rowid], ol.ipsStream>li", "replaceE": "ul.ipsPagination", "scrollD": 2000 } }, - "CADTutor - 帖子内": { - "host": "www.cadtutor.net", - "url": "/\\/forum\\/topic\\//", + "CADTutor/LoversLab - 帖子内": { + "host": ["www.cadtutor.net","www.loverslab.com"], + "url": "/\\/topic\\//", "thread": true, "pager": { - "nextL": "a[rel='next']", - "pageE": "#elPostFeed>form>*:not(input):not(.after-first-post)", + "nextL": "li.ipsPagination_next:not(.ipsPagination_inactive)>a", + "pageE": "#elPostFeed>form>*:not(input):not(div)", "replaceE": "ul.ipsPagination", "scrollD": 2000 } }, - "CADTutor - 搜索页": { - "host": "www.cadtutor.net", - "url": "/\\/forum\\/search\\//", - "pager": { - "nextL": "a[rel='next']", - "pageE": "ol.ipsStream>li", - "replaceE": "ul.ipsPagination", - "scrollD": 2000 - } - }, - "TheSwamp - 列表页": { + "TheSwamp": { "host": "www.theswamp.org", "url": "/board=/", "pager": { @@ -2738,6 +2728,27 @@ "aF": "let _img=''; for (let i=0;i`;}; document.getElementById('comicContain').insertAdjacentHTML('beforeend', _img);" } }, + "动漫狂": { + "host": "www.cartoonmad.cc", + "style": "body > table > tbody > tr:nth-child(4) > td > table > tbody > tr:first-child > td:not(:first-child) {display: none !important;} body > table > tbody > tr:nth-child(4) > td > table > tbody > tr:first-child > td:first-child img {max-width: 100%;height: auto;display: block !important;margin: 0 auto !important;}", + "pager": { + "nextL": "js; let next=fun.getXpath(\"//a[@class='pages'][contains(text(),'下一頁')][not(@href='thend.asp')]\");if (next) {return next.href;} else {next=fun.getXpath(\"//a[@class='pages'][contains(string(),'下一話')]\");if (next) return next.href;}", + "pageE": "img[onload]", + "replaceE": "body > table > tbody > tr:nth-child(2), body > table > tbody > tr:nth-child(5)", + "interval": 0, + "scrollD": 2000 + } + }, + "动漫狂 - 分类/搜索页": { + "host": "www.cartoonmad.com", + "url": "/^\\/./", + "blank": 3, + "pager": { + "nextL": "//a[@class='pages'][contains(text(), '下一頁')]", + "pageE": "td[background='/image/content_box4.gif']+td > table > tbody > tr", + "replaceE": "//a[@class='pages']/parent::td/parent::tr | //font[contains(text(), '目前在第')]" + } + }, "漫画皮": { "host": "www.manhuapi.com", "url": "/\\/chapter\\//", @@ -2824,6 +2835,32 @@ "aF": "let _img = '';for (let i = 0; i < imagesUrlArr.length; i++) {_img += ``;};fun.getCSS('.content-wrapper').insertAdjacentHTML('beforeend', _img);" } }, + "动漫戏说": { + "host": "comic.acgn.cc", + "url": "if(fun.indexOF('/view-')){fun.getAllCSS('.pic[_src][id]').forEach(e => {e.outerHTML = `
`;}); return true;}", + "style": ".img1 {cursor: initial !important;} .btn_wrap, #ss-toolbar {display: none !important;}", + "pager": { + "nextL": "#next_chapter", + "pageE": ".pic[_src]", + "replaceE": "[class^='display_']", + "interval": 5000, + "scrollD": 2000 + }, + "function": { + "aF": "fun.getAllCSS('.pic[_src][id]').forEach(e => {e.outerHTML = `
`;});" + } + }, + "动漫戏说 - 分类页": { + "host": "comic.acgn.cc", + "url": "/^\\/(cate|pinyin)-/", + "blank": 3, + "pager": { + "nextL": "a[rel='next']", + "pageE": "ul#display > li", + "replaceE": "#pagination", + "scrollD": 1000 + } + }, "拷贝漫画": { "host": "/copymanga\\./", "url": "/\\/chapter\\//",