From 704aa787540a372cf4bea067b02b80c3e5fda2b9 Mon Sep 17 00:00:00 2001
From: xiu2 <54703944+XIU2@users.noreply.github.com>
Date: Tue, 12 Apr 2022 22:08:00 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E5=BF=AB=E5=B2=B8?=
=?UTF-8?q?=E6=BC=AB=E7=94=BB]=20=E6=94=AF=E6=8C=81;=20=E6=9B=B4=E6=96=B0?=
=?UTF-8?q?=20[=E6=BC=AB=E7=94=BBDB]=20=E8=A7=84=E5=88=99(=E5=B9=B6?=
=?UTF-8?q?=E7=A7=BB=E8=87=B3=E5=A4=96=E7=BD=AE=E7=BF=BB=E9=A1=B5=E8=A7=84?=
=?UTF-8?q?=E5=88=99);=20=E4=BC=98=E5=8C=96=20[=E8=87=AA=E5=AE=9A=E4=B9=89?=
=?UTF-8?q?=E7=BF=BB=E9=A1=B5=E8=A7=84=E5=88=99]=20=E5=86=85=E7=BD=AE?=
=?UTF-8?q?=E5=87=BD=E6=95=B0=20src=5FbF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Autopage.user.js | 116 ++++++--------------------------------
other/Autopage/rules.json | 96 +++++++++++++++++++++++--------
2 files changed, 89 insertions(+), 123 deletions(-)
diff --git a/Autopage.user.js b/Autopage.user.js
index d88a5566c..0d80019c8 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.4
+// @version 5.7.5
// @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...) 等網站~
@@ -426,12 +426,15 @@ function: {
}
}, // 部分自带 自动无缝翻页 的网站
wp_article: {
- 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'])"};}}},
+ url: function(nextL) {if (!indexOF('/post/') && !getCSS('#comments, .comments-area, #disqus_thread')) {curSite = DBSite.wp_article; curSite.pager.nextL = nextL;}},
blank: 1,
pager: {
pageE: 'article[class], div[id^="post-"], ul[class*="post"] > li.item',
replaceE: '#nav-below, nav.navigation, nav.paging-navigation, .pagination, .wp-pagenavi, .pagenavi',
scrollD: 2000
+ },
+ function: {
+ bF: "return fun.src_bF(pageE)"
}
}, // 部分使用 WordPress 的网站
typecho_handsome: {
@@ -878,10 +881,6 @@ function: {
}
setTimeout(manhuacat_init, 100);
curSite = DBSite.manhuacat;
- } else if (indexOF('/list')) {
- curSite = DBSite.manhuacat_list;
- } else if (indexOF('/search') || indexOF('/update')) {
- curSite = DBSite.manhuacat_search;
}},
style: '#left, #right, #pull-load, .loading, .pagination, footer {display: none !important;} .img-content > img {display: block !important;margin: 0 auto !important; border: none !important; padding: 0 !important; max-width: 99% !important; height: auto !important;}', // 隐藏不需要的元素,调整图片
pager: {
@@ -894,27 +893,6 @@ function: {
scrollD: 3000
}
}, // 漫画猫
- manhuacat_list: {
- blank: 1,
- pager: {
- nextL: '//div[contains(@class, "pagination")]//a[contains(text(), "下一页") or contains(text(), "下页")]',
- pageE: '.comic-main-section > *',
- replaceE: '.pagination',
- scrollD: 1000
- },
- function: {
- bF: src_bF,
- bFp: [0, 'img[data-original]', 'data-original']
- }
- }, // 漫画猫 - 分类页
- manhuacat_search: {
- pager: {
- nextL: '//div[contains(@class, "pagination")]//a[contains(text(), "下一页") or contains(text(), "下页")]',
- pageE: '.comic-main-section .row > div',
- replaceE: '.pagination',
- scrollD: 1000
- }
- }, // 漫画猫 - 搜索页
imanhuaw: {
host: ['www.imanhuaw.net', 'www.imanhuaw.com', 'www.ccshwy.com'],
url: ()=> {
@@ -1013,28 +991,6 @@ function: {
replaceE: 'ul.pagination'
}
}, // 36漫画 - 分类/搜索页
- manhuadb: {
- host: 'www.manhuadb.com',
- url: ()=> {if (indexOF(/\/manhua\/\d+\/.+\.html/)) {
- if (getCSS('img.img-fluid.show-pic')) getCSS('img.img-fluid.show-pic').style.display = 'none'; // 隐藏第一个图片(避免重复)
- setTimeout(manhuadb_init, 100);
- curSite = DBSite.manhuadb;
- } else if (indexOF('/list')) {
- curSite = DBSite.manhuacat_list;
- } else if (indexOF('/search') || indexOF('/update')) {
- curSite = DBSite.manhuacat_search;
- }},
- style: '.row.m-0.pt-3.ad_2_wrap, .row.m-0.ad_1_wrap, .pagination.justify-content-center, #left, #right {display: none !important;}',
- pager: {
- type: 4,
- nextL: manhuadb_nextL,
- pageE: 'body > script:not([type]):not([src]), .vg-r-data, ol.links-of-books.num_div',
- insertP: ['.pjax-container', 3],
- insertE: manhuadb_insertE,
- interval: 5000,
- scrollD: 3000
- }
- }, // 漫画 DB
hicomic: {
host: 'www.hicomic.net',
url: ()=> {if (indexOF('/chapters/')) {
@@ -2071,47 +2027,6 @@ function: {
}
- // [漫画 DB] 初始化(将本话其余图片插入网页中)
- function manhuadb_init() {
- let _img = '', data = getCSS('.vg-r-data'), imgDate;
- if (!data) return
- getAllCSS(curSite.pager.pageE.replace('', '')).forEach(function (one) {
- if (one.tagName === 'SCRIPT' && one.textContent.indexOf('var img_data =') > -1) {
- let json = JSON.parse(window.atob(one.textContent.split("'")[1]));
- if (json) {
- let _img = '';
- for (let i = 0; i < json.length; i++) {_img += `
`;}
- getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中
- }
- }
- })
- }
- // [漫画 DB] 获取下一页地址
- function manhuadb_nextL() {
- let nextArr = getAllCSS('a.fixed-a-es'), next;
- var url = '';
- if (nextArr.length == 0) return
- for (let i = 0; i < nextArr.length; i++) {
- if (nextArr[i].className.indexOf('active') > -1) {
- if (nextArr[i+1]) url = nextArr[i+1].href;
- break;
- }
- }
- if (url === curSite.pageUrl) return
- curSite.pageUrl = url
- getPageE_(curSite.pageUrl);
- }
- // [漫画 DB] 插入数据
- function manhuadb_insertE(pageE, type) {
- if (!pageE) return
- if (replaceElems(pageE, curSite.pager.pageE, curSite.pager.pageE)) {
- addHistory(pageE);
- pageNum.now = pageNum._now + 1
- manhuadb_init(); // 将刚刚替换的图片插入网页中
- }
- }
-
-
// [HiComic(嗨漫画)] 初始化(将本话其余图片插入网页中)
function hicomic_init() {
let _img = '';
@@ -2920,18 +2835,21 @@ function: {
}
}
// 通用型插入前函数(加载图片)
- function src_bF(pageE, css) {
+ function src_bF(pageE, css = [0, 'img[data-original], img[data-src]', 'data-original']) {
+ if (css[2] === undefined) css[2] = 'data-original'
pageE.forEach(function (one) {
if (css[0] == 0) { // src 图片
- if (one.tagName == 'IMG' && one.getAttribute(css[2])) one.src = one.getAttribute(css[2]);
- one.querySelectorAll(css[1]).forEach(function (now) {
- now.src = now.getAttribute(css[2]);
- });
+ if (one.tagName === 'IMG') {
+ if (one.getAttribute(css[2])){one.src = one.getAttribute(css[2]);}else if (one.dataset.src){one.src = one.dataset.src;}
+ } else {
+ one.querySelectorAll(css[1]).forEach(function (now) {if (now.getAttribute(css[2])){now.src = now.getAttribute(css[2]);}else if (now.dataset.src){now.src = now.dataset.src;};});
+ }
} else if (css[0] == 1) { // 背景图片
- if (one.tagName == 'IMG' && one.getAttribute(css[2])) one.style.backgroundImage = 'url("' + one.getAttribute(css[2]) + '")';
- one.querySelectorAll(css[1]).forEach(function (now) {
- now.style.backgroundImage = 'url("' + now.getAttribute(css[2]) + '")';
- });
+ if (one.tagName === 'IMG') {
+ if (one.getAttribute(css[2])){one.style.backgroundImage = 'url("' + one.getAttribute(css[2]) + '")';}else if (one.dataset.src){one.style.backgroundImage = 'url("' + one.dataset.src + '")';}
+ } else {
+ one.querySelectorAll(css[1]).forEach(function (now) {if (now.getAttribute(css[2])){now.style.backgroundImage = 'url("' + now.getAttribute(css[2]) + '")';}else if (now.dataset.src){now.style.backgroundImage = 'url("' + now.dataset.src + '")';};});
+ }
}
});
return pageE
diff --git a/other/Autopage/rules.json b/other/Autopage/rules.json
index 208602527..56d961544 100644
--- a/other/Autopage/rules.json
+++ b/other/Autopage/rules.json
@@ -560,7 +560,7 @@
"replaceE": ".wp-pagenavi"
},
"function": {
- "bF": "return fun.src_bF(pageE, [0, 'img[data-original]', 'data-original'])"
+ "bF": "return fun.src_bF(pageE)"
}
},
"煎蛋网 - 大杂烩": {
@@ -759,7 +759,7 @@
"scrollD": 1000
},
"function": {
- "bF": "return fun.src_bF(pageE, [0, 'img[data-original]', 'data-original'])"
+ "bF": "return fun.src_bF(pageE)"
}
},
"淘股吧论坛": {
@@ -903,7 +903,7 @@
"scrollD": 2000
},
"function": {
- "bF": "return fun.src_bF(pageE, [0, 'img[data-original]', 'data-original'])"
+ "bF": "return fun.src_bF(pageE)"
}
},
"北+ - 帖子内": {
@@ -1269,7 +1269,7 @@
"scrollD": 2500
},
"function": {
- "bF": "return fun.src_bF(pageE, [0, 'img[data-original]', 'data-original'])"
+ "bF": "return fun.src_bF(pageE)"
}
},
"千图网 - 专题/收藏夹": {
@@ -1283,7 +1283,7 @@
"scrollD": 4000
},
"function": {
- "bF": "return fun.src_bF(pageE, [0, 'img[data-original]', 'data-original'])"
+ "bF": "return fun.src_bF(pageE)"
}
},
"千库网": {
@@ -1297,7 +1297,7 @@
"scrollD": 2000
},
"function": {
- "bF": "return fun.src_bF(pageE, [0, 'img[data-original]', 'data-original'])"
+ "bF": "return fun.src_bF(pageE)"
}
},
"昵图网": {
@@ -1310,7 +1310,7 @@
"scrollD": 2000
},
"function": {
- "bF": "return fun.src_bF(pageE, [0, 'img[data-original]', 'data-original'])"
+ "bF": "return fun.src_bF(pageE)"
}
},
"摄图网": {
@@ -1338,7 +1338,7 @@
"scrollD": 2000
},
"function": {
- "bF": "return fun.src_bF(pageE, [0, 'img[data-src]', 'data-src'])"
+ "bF": "return fun.src_bF(pageE)"
}
},
"我图网": {
@@ -1353,7 +1353,7 @@
"scrollD": 2000
},
"function": {
- "bF": "return fun.src_bF(pageE, [0, 'img[data-original]', 'data-original'])"
+ "bF": "return fun.src_bF(pageE)"
}
},
"包图网 - 音乐页": {
@@ -1594,7 +1594,7 @@
"scrollD": 1000
},
"function": {
- "bF": "return fun.src_bF(pageE, [0, 'img[data-original]', 'data-original'])"
+ "bF": "return fun.src_bF(pageE)"
}
},
"3DM - 游戏专区 - 分类页": {
@@ -1607,7 +1607,7 @@
"scrollD": 1000
},
"function": {
- "bF": "return fun.src_bF(pageE, [0, 'img[data-original]', 'data-original'])"
+ "bF": "return fun.src_bF(pageE)"
}
},
"3DM - 游戏专区 - 资源页": {
@@ -1688,7 +1688,7 @@
"scrollD": 1000
},
"function": {
- "bF": "return fun.src_bF(pageE, [0, 'img[data-original]', 'data-original'])"
+ "bF": "return fun.src_bF(pageE)"
}
},
"游侠网 - 攻略页": {
@@ -1743,7 +1743,7 @@
"scrollD": 100
},
"function": {
- "bF": "pageE.forEach(function (one) {if (one.tagName === 'P' && one.textContent.indexOf('更多相关内容请关注') > -1) {one.style.display = 'none';}}); return fun.src_bF(pageE, [0, 'img[data-original]', 'data-original'])"
+ "bF": "pageE.forEach(function (one) {if (one.tagName === 'P' && one.textContent.indexOf('更多相关内容请关注') > -1) {one.style.display = 'none';}}); return fun.src_bF(pageE)"
}
},
"游民星空 - 专栏文章页": {
@@ -1983,7 +1983,7 @@
"replaceE": ".wp-pagenavi"
},
"function": {
- "bF": "return fun.src_bF(pageE, [0, 'img[data-original]', 'data-original'])"
+ "bF": "return fun.src_bF(pageE)"
}
},
"低端影视": {
@@ -2019,7 +2019,7 @@
"scrollD": 1000
},
"function": {
- "bF": "return fun.src_bF(pageE, [0, 'img[data-src]', 'data-src'])"
+ "bF": "return fun.src_bF(pageE)"
}
},
"核桃影院": {
@@ -2044,7 +2044,7 @@
"replaceE": ".pagination"
},
"function": {
- "bF": "return fun.src_bF(pageE, [0, 'img[data-original]', 'data-original'])"
+ "bF": "return fun.src_bF(pageE)"
}
},
"ZzzFun 动漫": {
@@ -2057,7 +2057,7 @@
"scrollD": 1000
},
"function": {
- "bF": "return fun.src_bF(pageE, [0, 'img[data-original]', 'data-original'])"
+ "bF": "return fun.src_bF(pageE)"
}
},
"吐槽弹幕网": {
@@ -2122,7 +2122,7 @@
"scrollD": 1000
},
"function": {
- "bF": "return fun.src_bF(pageE, [0, 'img[data-original]', 'data-original'])"
+ "bF": "return fun.src_bF(pageE)"
}
},
"漫岛动漫": {
@@ -2136,7 +2136,7 @@
"scrollD": 1000
},
"function": {
- "bF": "return fun.src_bF(pageE, [0, 'img[data-original]', 'data-original'])"
+ "bF": "return fun.src_bF(pageE)"
}
},
"AGE 动漫": {
@@ -2726,6 +2726,54 @@
"aF": "let _img=''; for (let i=0;i`;}; document.getElementById('cp_img').insertAdjacentHTML('beforeend', _img);"
}
},
+ "漫画DB": {
+ "host": "www.manhuadb.com",
+ "url": "if (fun.indexOF(/^\\/manhua\\/\\d+\\/.+\\.html/)) {if (fun.getCSS('img.img-fluid.show-pic')){fun.getCSS('img.img-fluid.show-pic').style.display = 'none';}; setTimeout(function(){let _img = '', data = document.querySelector('.vg-r-data'), imgDate = JSON.parse(atob(img_data));for (let i = 0; i < imgDate.length; i++) {_img += `
`;};document.querySelector('.pjax-container').insertAdjacentHTML('beforeend', _img);},100); return true;}",
+ "style": ".row.m-0.pt-3.ad_2_wrap, .row.m-0.ad_1_wrap, .pagination.justify-content-center, #left, #right {display: none !important;} .pjax-container>img {min-height: 300px;}",
+ "history": true,
+ "pager": {
+ "nextL": "//ol[@class='links-of-books num_div']//a[@class='active ']/parent::li/following-sibling::li[1]/a",
+ "pageE": "//body/script[starts-with(text(),'var img_data')]",
+ "insertP": ["body",3],
+ "replaceE": ".vg-r-data, ol.links-of-books",
+ "scriptT": 2,
+ "interval": 5000,
+ "scrollD": 2000
+ },
+ "function": {
+ "aF": "let _img = '', data = fun.getCSS('.vg-r-data'), imgDate = JSON.parse(atob(img_data));for (let i = 0; i < imgDate.length; i++) {_img += `
`;};fun.getCSS('.pjax-container').insertAdjacentHTML('beforeend', _img)"
+ }
+ },
+ "漫画DB - 分类页": {
+ "host": ["www.manhuadb.com","www.manhuacat.com","www.maofly.com","www.kanbook.net"],
+ "url": "/\\/(list|update|search)/",
+ "blank": 3,
+ "pager": {
+ "nextL": "//div[contains(@class, 'pagination')]//a[contains(text(), '下一页') or contains(text(), '下页')]",
+ "pageE": ".comic-main-section",
+ "replaceE": ".pagination"
+ },
+ "function": {
+ "bF": "return fun.src_bF(pageE)"
+ }
+ },
+ "快岸漫画": {
+ "host": "www.kanbook.net",
+ "url": "if (fun.indexOF(/^\\/\\d+\\/\\d+\\/\\d+/)) {if (fun.getCSS('img.img-fluid')){fun.getCSS('img.img-fluid').style.display = 'none';}; setTimeout(function(){let _img = '';for (let i = 0; i < imagesUrlArr.length; i++) {_img += `
`;};document.querySelector('.content-wrapper').insertAdjacentHTML('beforeend', _img);},100); return true;}",
+ "style": ".pagination.justify-content-center, #left, #right, p[id^='page_c_'] {display: none !important;} .content-wrapper>img {min-height: 300px;}",
+ "history": true,
+ "pager": {
+ "nextL": "js; if (next_part != '') return (location.origin + next_part)",
+ "pageE": "//body/script[not(@src)]",
+ "insertP": ["body",3],
+ "scriptT": 2,
+ "interval": 5000,
+ "scrollD": 2000
+ },
+ "function": {
+ "aF": "let _img = '';for (let i = 0; i < imagesUrlArr.length; i++) {_img += `
`;};fun.getCSS('.content-wrapper').insertAdjacentHTML('beforeend', _img);"
+ }
+ },
"拷贝漫画": {
"host": "/copymanga\\./",
"url": "/\\/chapter\\//",
@@ -3139,7 +3187,7 @@
"scrollD": 1000
},
"function": {
- "bF": "return fun.src_bF(pageE, [0, 'img[data-original]', 'data-original'])"
+ "bF": "return fun.src_bF(pageE)"
}
},
"哔哩轻小说 - 全本": {
@@ -3152,7 +3200,7 @@
"scrollD": 1000
},
"function": {
- "bF": "return fun.src_bF(pageE, [0, 'img[data-original]', 'data-original'])"
+ "bF": "return fun.src_bF(pageE)"
}
},
"哔哩轻小说 - 手机版": {
@@ -3176,7 +3224,7 @@
"scrollD": 1000
},
"function": {
- "bF": "return fun.src_bF(pageE, [0, 'img[data-original]', 'data-original'])"
+ "bF": "return fun.src_bF(pageE)"
}
},
"AO3 - 列表页/搜索页": {
@@ -3334,7 +3382,7 @@
"replaceE": "ul.pagination"
},
"function": {
- "bF": "return fun.src_bF(pageE, [0, 'img[data-original]', 'data-original'])"
+ "bF": "return fun.src_bF(pageE)"
}
},
"六音软件": {
@@ -3450,7 +3498,7 @@
"scrollD": 1200
},
"function": {
- "bF": "return fun.src_bF(pageE, [0, 'img[data-src]', 'data-src'])"
+ "bF": "return fun.src_bF(pageE)"
}
},
"悪魔の小站": {
From 466423c0c5f9196429198feed5b9145acd569084 Mon Sep 17 00:00:00 2001
From: xiu2 <54703944+XIU2@users.noreply.github.com>
Date: Tue, 12 Apr 2022 22:26:37 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20[=E7=9B=98=E5=8F=8B?=
=?UTF-8?q?=E7=A4=BE=E5=8C=BA]=20=E6=94=AF=E6=8C=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
other/Autopage/rules.json | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/other/Autopage/rules.json b/other/Autopage/rules.json
index 56d961544..c8d9054b7 100644
--- a/other/Autopage/rules.json
+++ b/other/Autopage/rules.json
@@ -1010,6 +1010,25 @@
"replaceE": ".Pager"
}
},
+ "盘友社区 - 帖子内": {
+ "host": "www.panyoubbs.com",
+ "url": "/^\\/thread\\//",
+ "thread": true,
+ "pager": {
+ "nextL": ".active+li:not(.disabled)>a",
+ "pageE": ".thread-list",
+ "replaceE": ".page"
+ }
+ },
+ "盘友社区": {
+ "host": "www.panyoubbs.com",
+ "pager": {
+ "nextL": ".active+li:not(.disabled)>a",
+ "pageE": ".list",
+ "replaceE": ".page",
+ "scrollD": 2000
+ }
+ },
"CADTutor - 列表页": {
"host": "www.cadtutor.net",
"url": "/\\/forum\\/forum\\//",