Skip to content

Commit 3b6df2b

Browse files
committed
新增 [LoversLab] 支持; 更新 [动漫狂]、[动漫戏说] 规则(并移至外置翻页规则)
1 parent cbde023 commit 3b6df2b

2 files changed

Lines changed: 60 additions & 106 deletions

File tree

Autopage.user.js

Lines changed: 2 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// @name:zh-CN 自动无缝翻页
44
// @name:zh-TW 自動無縫翻頁
55
// @name:en AutoPager
6-
// @version 5.7.6
6+
// @version 5.7.7
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...) 等網站~
@@ -819,32 +819,6 @@ function: {
819819
scrollD: 1000
820820
}
821821
}, // B 站(Bilibili) - 搜索页 - 专栏
822-
cartoonmad: {
823-
host: ['www.cartoonmad.com','www.cartoonmad.cc'],
824-
url: ()=> {if (indexOF('/comic/')) {
825-
getCSS('body > table > tbody > tr:nth-child(4) > td > table > tbody > tr:first-child > td:first-child > a').href = 'javascript:void(0);'; // 清理图片上的链接
826-
curSite = DBSite.cartoonmad;
827-
} else if (lp != '/') {
828-
curSite = DBSite.cartoonmad_list;
829-
}},
830-
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;}',
831-
pager: {
832-
nextL: cartoonmad_nextL,
833-
pageE: 'body > table > tbody > tr:nth-child(4) > td > table > tbody > tr:first-child > td:first-child img',
834-
replaceE: 'body > table > tbody > tr:nth-child(2), body > table > tbody > tr:nth-child(5)',
835-
interval: 0,
836-
scrollD: 2000
837-
}
838-
}, // 动漫狂
839-
cartoonmad_list: {
840-
blank: 1,
841-
pager: {
842-
nextL: '//a[@class="pages"][contains(text(), "下一頁")]',
843-
pageE: 'td[background="/image/content_box4.gif"]+td > table > tbody > tr',
844-
replaceE: '//a[@class="pages"]/parent::td/parent::tr | //font[contains(text(), "目前在第")]',
845-
scrollD: 1000
846-
}
847-
}, // 动漫狂 - 分类/搜索页
848822
manhuacat: {
849823
host: ['www.manhuacat.com', 'www.maofly.com'],
850824
url: ()=> {if (indexOF(/\/manga\/\d+\/.+\.html/)) {
@@ -1062,37 +1036,6 @@ function: {
10621036
scrollD: 1000
10631037
}
10641038
}, //动漫之家 - 日漫 - 最新更新
1065-
acgn: {
1066-
host: 'comic.acgn.cc',
1067-
url: ()=> {
1068-
if (indexOF('/view-')) {
1069-
curSite = DBSite.acgn;
1070-
acgn_aF();
1071-
} else if (indexOF('/cate-') || indexOF('/pinyin-')) {
1072-
curSite = DBSite.acgn_list;
1073-
}
1074-
},
1075-
style: '.img1 {cursor: initial !important;}',
1076-
pager: {
1077-
nextL: '#next_chapter',
1078-
pageE: '.pic[_src]',
1079-
replaceE: '[class^="display_"]',
1080-
interval: 2000,
1081-
scrollD: 2000
1082-
},
1083-
function: {
1084-
aF: acgn_aF
1085-
}
1086-
}, // 动漫戏说
1087-
acgn_list: {
1088-
blank: 1,
1089-
pager: {
1090-
nextL: 'a[rel="next"]',
1091-
pageE: 'ul#display > li',
1092-
replaceE: '#pagination',
1093-
scrollD: 1000
1094-
}
1095-
}, // 动漫戏说 - 分类页
10961039
ykmh: {
10971040
host: 'www.ykmh.com',
10981041
url: ()=> {if (indexOF(/\/\d+\.html/)) {
@@ -1819,23 +1762,6 @@ function: {
18191762
}
18201763

18211764

1822-
// [漫画狂] 获取下一页地址
1823-
function cartoonmad_nextL() {
1824-
let url = getXpath('//a[@class="pages"][contains(text(),"下一頁")]');
1825-
if (url) {
1826-
if (url.getAttribute('href') === 'thend.asp') {
1827-
url = getXpath('//a[@class="pages"][contains(string(),"下一話")]')
1828-
if (url) return url.href;
1829-
pausePage = false;
1830-
GM_notification({text: `注意:该网站早期漫画章节,因为网站自身问题而无法翻至下一话(仅限于显示为 [第 X 卷]/[下一卷] 的)。\n因此需要手动去 [目录页] 进入下一卷!`, timeout: 10000});
1831-
} else {
1832-
return url.href;
1833-
}
1834-
}
1835-
return '';
1836-
}
1837-
1838-
18391765
// [漫画猫] 初始化(显示本话所以图片)
18401766
function manhuacat_init() {
18411767
let _img = '';
@@ -2125,15 +2051,6 @@ function: {
21252051
}
21262052

21272053

2128-
// [动漫戏说] 插入后函数(加载图片)
2129-
function acgn_aF() {
2130-
let old = getAllCSS('.pic[_src][id]'), _img = '';
2131-
if (old.length > 0) {
2132-
for (let now of old) {now.outerHTML = `<div class="pic" _src="${now.getAttribute('_src')}"><img src="${now.getAttribute('_src')}" class="img1"></div>`;}
2133-
}
2134-
}
2135-
2136-
21372054
// [漫画星球] 插入数据
21382055
function mhxqiu_insertE(pageE, type) {
21392056
if (!pageE) return
@@ -2784,7 +2701,7 @@ function: {
27842701
}
27852702
}
27862703
} else { // 获取主体元素失败后,尝试重新获取
2787-
console.log(curSite.pager.pageE, pageE, curSite.pager.insertP, toE)
2704+
console.log(curSite.pager.pageE, pageE, curSite.pager.insertP, toE, response)
27882705
if (curSite.retry) {
27892706
console.warn('[自动无缝翻页] 获取主体元素失败,尝试重新获取...')
27902707
setTimeout(function(){curSite.pageUrl = '';}, curSite.retry)

other/Autopage/rules.json

Lines changed: 58 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,38 +1029,28 @@
10291029
"scrollD": 2000
10301030
}
10311031
},
1032-
"CADTutor - 列表页": {
1033-
"host": "www.cadtutor.net",
1034-
"url": "/\\/forum\\/forum\\//",
1032+
"CADTutor/LoversLab": {
1033+
"host": ["www.cadtutor.net","www.loverslab.com"],
1034+
"url": "/\\/(forum\\/\\d)|search/",
10351035
"pager": {
1036-
"nextL": "a[rel='next']",
1037-
"pageE": "ol.ipsDataList>li:not([data-rowid])~li",
1036+
"nextL": "li.ipsPagination_next:not(.ipsPagination_inactive)>a",
1037+
"pageE": "ol.ipsDataList>li[data-rowid], ol.ipsStream>li",
10381038
"replaceE": "ul.ipsPagination",
10391039
"scrollD": 2000
10401040
}
10411041
},
1042-
"CADTutor - 帖子内": {
1043-
"host": "www.cadtutor.net",
1044-
"url": "/\\/forum\\/topic\\//",
1042+
"CADTutor/LoversLab - 帖子内": {
1043+
"host": ["www.cadtutor.net","www.loverslab.com"],
1044+
"url": "/\\/topic\\//",
10451045
"thread": true,
10461046
"pager": {
1047-
"nextL": "a[rel='next']",
1048-
"pageE": "#elPostFeed>form>*:not(input):not(.after-first-post)",
1049-
"replaceE": "ul.ipsPagination",
1050-
"scrollD": 2000
1051-
}
1052-
},
1053-
"CADTutor - 搜索页": {
1054-
"host": "www.cadtutor.net",
1055-
"url": "/\\/forum\\/search\\//",
1056-
"pager": {
1057-
"nextL": "a[rel='next']",
1058-
"pageE": "ol.ipsStream>li",
1047+
"nextL": "li.ipsPagination_next:not(.ipsPagination_inactive)>a",
1048+
"pageE": "#elPostFeed>form>*:not(input):not(div)",
10591049
"replaceE": "ul.ipsPagination",
10601050
"scrollD": 2000
10611051
}
10621052
},
1063-
"TheSwamp - 列表页": {
1053+
"TheSwamp": {
10641054
"host": "www.theswamp.org",
10651055
"url": "/board=/",
10661056
"pager": {
@@ -2738,6 +2728,27 @@
27382728
"aF": "let _img=''; for (let i=0;i<newImgs.length;i++){_img += `<li><img src=\"${newImgs[i]}\"></li>`;}; document.getElementById('comicContain').insertAdjacentHTML('beforeend', _img);"
27392729
}
27402730
},
2731+
"动漫狂": {
2732+
"host": "www.cartoonmad.cc",
2733+
"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;}",
2734+
"pager": {
2735+
"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;}",
2736+
"pageE": "img[onload]",
2737+
"replaceE": "body > table > tbody > tr:nth-child(2), body > table > tbody > tr:nth-child(5)",
2738+
"interval": 0,
2739+
"scrollD": 2000
2740+
}
2741+
},
2742+
"动漫狂 - 分类/搜索页": {
2743+
"host": "www.cartoonmad.com",
2744+
"url": "/^\\/./",
2745+
"blank": 3,
2746+
"pager": {
2747+
"nextL": "//a[@class='pages'][contains(text(), '下一頁')]",
2748+
"pageE": "td[background='/image/content_box4.gif']+td > table > tbody > tr",
2749+
"replaceE": "//a[@class='pages']/parent::td/parent::tr | //font[contains(text(), '目前在第')]"
2750+
}
2751+
},
27412752
"漫画皮": {
27422753
"host": "www.manhuapi.com",
27432754
"url": "/\\/chapter\\//",
@@ -2824,6 +2835,32 @@
28242835
"aF": "let _img = '';for (let i = 0; i < imagesUrlArr.length; i++) {_img += `<img class=\"img-fluid d-md-block mx-auto\" src=\"${host + imagesUrlArr[i]}\">`;};fun.getCSS('.content-wrapper').insertAdjacentHTML('beforeend', _img);"
28252836
}
28262837
},
2838+
"动漫戏说": {
2839+
"host": "comic.acgn.cc",
2840+
"url": "if(fun.indexOF('/view-')){fun.getAllCSS('.pic[_src][id]').forEach(e => {e.outerHTML = `<div class='pic' _src><img src='${e.getAttribute('_src')}' class='img1'></div>`;}); return true;}",
2841+
"style": ".img1 {cursor: initial !important;} .btn_wrap, #ss-toolbar {display: none !important;}",
2842+
"pager": {
2843+
"nextL": "#next_chapter",
2844+
"pageE": ".pic[_src]",
2845+
"replaceE": "[class^='display_']",
2846+
"interval": 5000,
2847+
"scrollD": 2000
2848+
},
2849+
"function": {
2850+
"aF": "fun.getAllCSS('.pic[_src][id]').forEach(e => {e.outerHTML = `<div class='pic' _src><img src='${e.getAttribute('_src')}' class='img1'></div>`;});"
2851+
}
2852+
},
2853+
"动漫戏说 - 分类页": {
2854+
"host": "comic.acgn.cc",
2855+
"url": "/^\\/(cate|pinyin)-/",
2856+
"blank": 3,
2857+
"pager": {
2858+
"nextL": "a[rel='next']",
2859+
"pageE": "ul#display > li",
2860+
"replaceE": "#pagination",
2861+
"scrollD": 1000
2862+
}
2863+
},
28272864
"拷贝漫画": {
28282865
"host": "/copymanga\\./",
28292866
"url": "/\\/chapter\\//",

0 commit comments

Comments
 (0)