Skip to content

Commit 823e8fc

Browse files
committed
新增 [新新漫画]、[懂车帝论坛] 支持
1 parent 62238b0 commit 823e8fc

1 file changed

Lines changed: 102 additions & 2 deletions

File tree

Autopage.user.js

Lines changed: 102 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ==UserScript==
22
// @name 自动无缝翻页
3-
// @version 3.7.1
3+
// @version 3.7.2
44
// @author X.I.U
55
// @description 无缝拼接下一页内容(瀑布流),目前支持:[所有「Discuz!、Flarum、phpBB、Xiuno、XenForo、DUX/XIU/D8/Begin(WP主题)」网站]、百度、谷歌、必应、搜狗、头条搜索、360 搜索、微信搜索、贴吧、豆瓣、知乎、微博、NGA、V2EX、B 站(Bilibili)、Pixiv、蓝奏云、煎蛋网、糗事百科、龙的天空、起点小说、IT之家、千图网、Pixabay、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、片库、茶杯狐、NO视频、低端影视、奈菲影视、音范丝、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、极简插件、小众软件、动漫狂、漫画猫、漫画 DB、动漫之家、拷贝漫画、包子漫画、古风漫画网、Mangabz、PubMed、GreasyFork、Github、StackOverflow(以上仅一小部分,更多的写不下了...
66
// @match *://*/*
@@ -1065,6 +1065,32 @@ function: {
10651065
scrollD: 1500
10661066
}
10671067
}, // 番组计划 - 小组帖子列表
1068+
dongchedi: {
1069+
host: 'www.dongchedi.com',
1070+
functionS: function() {locationC = true;
1071+
if (indexOF('/community/')) {
1072+
curSite = DBSite.dongchedi;
1073+
}},
1074+
history: true,
1075+
pager: {
1076+
type: 1,
1077+
nextL: 'css;li.pagination-item.is-active+li > a',
1078+
pageE: 'css;.data-wrapper > section.community-card',
1079+
insertP: ['css;.data-wrapper', 3],
1080+
replaceE: '//ul[./li[contains(@class, "pagination-item")]]',
1081+
scrollD: 2000
1082+
},
1083+
function: {
1084+
bF: function(pageElems) {
1085+
pageElems.forEach(function (one) {
1086+
one.querySelectorAll('.g-load-img-wrap, .tw-absolute.tw-cursor-pointer, .avatar').forEach(function (now) {
1087+
getCSS('noscript+img', now).src = getCSS('noscript > img', now).src;
1088+
});
1089+
});
1090+
return pageElems
1091+
}
1092+
}
1093+
}, // 懂车帝论坛
10681094
kdslife: {
10691095
host: 'club.kdslife.com',
10701096
functionS: function() {
@@ -3049,6 +3075,48 @@ function: {
30493075
pF: [0, 'img[data-src]', 'data-src']
30503076
}
30513077
}, // 乐语漫画 - 分类页
3078+
_77mh: {
3079+
host: 'www.77mh.cc',
3080+
functionS: function() {if (/\/\d+\.html/.test(location.pathname)) {
3081+
curSite = DBSite._77mh;
3082+
setTimeout(_77mh_init, 100);
3083+
} else if (indexOF('/colist_')) {
3084+
setTimeout(function(){if (getCSS('#listmore1, .listmore')) getCSS('#listmore1, .listmore').click();}, 500)
3085+
} else {
3086+
curSite = DBSite._77mh_list;
3087+
}},
3088+
insStyle: '.page_num, #bdtopbot {display: none !important;} #comicImg > img {display: block !important;margin: 0 auto !important; border: none !important; padding: 0 !important; max-width: 99% !important; height: auto !important;}',
3089+
history: true,
3090+
pager: {
3091+
type: 4,
3092+
nextL: _77mh_nextL,
3093+
insertP: ['css;#comicImg', 3],
3094+
insertE: _77mh_insertE,
3095+
interval: 3000,
3096+
scrollD: 2000
3097+
}
3098+
}, // 新新漫画
3099+
_77mh_list: {
3100+
pager: {
3101+
type: 1,
3102+
nextL: '//div[@class="pages_s"]/a[text()="下一页"]',
3103+
pageE: 'css;.ar_list_co > ul > li',
3104+
insertP: ['css;.ar_list_co > ul', 3],
3105+
replaceE: 'css;.pages_s',
3106+
scrollD: 1000
3107+
}
3108+
}, // 新新漫画 - 分类页
3109+
_77mh_search: {
3110+
host: 'so.77mh.cc',
3111+
pager: {
3112+
type: 1,
3113+
nextL: 'css;a.next',
3114+
pageE: 'css;.ar_list_co > ul > dl',
3115+
insertP: ['css;.ar_list_co > ul', 3],
3116+
replaceE: 'css;.pages_s',
3117+
scrollD: 1000
3118+
}
3119+
}, // 新新漫画 - 搜索页
30523120
gufengmh: {
30533121
host: /gufengmh/,
30543122
functionS: function() {if (/\/\d+.+\.html/.test(location.pathname)) {
@@ -5784,6 +5852,38 @@ function: {
57845852
}
57855853

57865854

5855+
// [新新漫画] 初始化(调整本话其余图片)
5856+
function _77mh_init() {
5857+
let _img = '';
5858+
for (let one of arr) {_img += `<img src="${img_qianz}${one}">`;}
5859+
getOne(curSite.pager.insertP[0]).innerHTML = _img;
5860+
}
5861+
// [新新漫画] 获取下一页地址
5862+
function _77mh_nextL() {
5863+
let next = nextLink_b
5864+
if (next && next != curSite.pageUrl) {
5865+
curSite.pageUrl = next;
5866+
getPageElems_(curSite.pageUrl);
5867+
}
5868+
}
5869+
// [新新漫画] 插入数据
5870+
function _77mh_insertE(pageElems, type) {
5871+
if (!pageElems) return
5872+
// 插入并运行 <script>
5873+
insScriptAll('//script[not(@src)][contains(text(), "eval(")]', document.body, pageElems);
5874+
5875+
// 插入图片
5876+
let _img = '';
5877+
for (let one of msg.split('|')) {_img += `<img src="${img_qianz}${one}.webp">`;}
5878+
if (_img) {
5879+
// 将 img 标签插入到网页中
5880+
getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img);
5881+
addHistory(pageElems);
5882+
pageNum.now = pageNum._now + 1
5883+
}
5884+
}
5885+
5886+
57875887
// [古风漫画网] 获取下一页地址
57885888
function gufengmh_nextL() {
57895889
let pageElems = getOne(curSite.pager.pageE); // 寻找数据所在元素
@@ -6625,7 +6725,7 @@ function: {
66256725
return
66266726
}
66276727
// 插入网页
6628-
let _html = `<style>#Autopage_number {top: calc(75vh) !important;left: 0 !important;width: 32px;height: 32px;padding: 6px !important;display: flex;position: fixed !important;opacity: 0.5;transition: .2s;z-index: 1000 !important;cursor: pointer;user-select: none !important;flex-direction: column;align-items: center;justify-content: center;box-sizing: content-box;border-radius: 0 50% 50% 0;transform-origin: center !important;transform: translateX(-8px);background-color: #eee;-webkit-tap-highlight-color: transparent;box-shadow: 1px 1px 3px 0px #aaa !important;color: #000 !important;} #Autopage_number:hover {opacity: 0.9;transform: translateX(0);}</style>
6728+
let _html = `<style>#Autopage_number {top: calc(75vh) !important;left: 0 !important;width: 32px;height: 32px;padding: 6px !important;display: flex;position: fixed !important;opacity: 0.5;transition: .2s;z-index: 9999 !important;cursor: pointer;user-select: none !important;flex-direction: column;align-items: center;justify-content: center;box-sizing: content-box;border-radius: 0 50% 50% 0;transform-origin: center !important;transform: translateX(-8px);background-color: #eee;-webkit-tap-highlight-color: transparent;box-shadow: 1px 1px 3px 0px #aaa !important;color: #000 !important;} #Autopage_number:hover {opacity: 0.9;transform: translateX(0);}</style>
66296729
<div id="Autopage_number" title="1. 此处数字为 [当前页码] (可在脚本菜单中关闭)&#10;&#10;2. 鼠标左键点击此处 [临时暂停本页自动无缝翻页](再次点击可恢复)">${pageNum._now}</div>`
66306730
document.body.insertAdjacentHTML('beforeend', _html);
66316731
// 点击事件(临时暂停翻页)

0 commit comments

Comments
 (0)