Skip to content

Commit b77b4c7

Browse files
committed
新增 [Mixkit]、[悪魔の小站] 支持
1 parent bab8584 commit b77b4c7

1 file changed

Lines changed: 36 additions & 15 deletions

File tree

Autopage.user.js

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ==UserScript==
22
// @name 自动无缝翻页
3-
// @version 3.8.6
3+
// @version 3.8.7
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 *://*/*
@@ -63,7 +63,7 @@
6363

6464
} else if (menuAll[i][0] === 'menu_discuz_thread_page') { // 帖子内自动翻页 (仅论坛)
6565

66-
if ([2,4,5,6].indexOf(webType) > -1 || forumWebsite.indexOf(location.host) > -1) {
66+
if ([2,4,5,6].indexOf(webType) > -1 || forumWebsite.indexOf(location.hostname) > -1) {
6767
menuId[i] = GM_registerMenuCommand(`${menuAll[i][3]?'✅':'❌'} ${menuAll[i][1]}`, function(){menu_switch(menuAll[i][3], menuAll[i][0], menuAll[i][2])});
6868
}
6969

@@ -361,7 +361,7 @@ function: {
361361
}, // 笔趣阁 模板的小说网站
362362
baidu: {
363363
host: 'www.baidu.com',
364-
functionS: function() {locationC = true; if (lp == '/s') {curSite = DBSite.baidu;} else if (indexOF('/s')) {location.host = 'm.baidu.com';}},
364+
functionS: function() {locationC = true; if (lp == '/s') {curSite = DBSite.baidu;} else if (indexOF('/s')) {location.hostname = 'm.baidu.com';}},
365365
insStyle: '.new-pmd .c-img-border {position: initial !important;} .op-bk-polysemy-video__wrap.c-gap-bottom {display: none !important;}',
366366
history: true,
367367
pager: {
@@ -1684,6 +1684,17 @@ function: {
16841684
scrollD: 2000
16851685
}
16861686
}, // 下得乐
1687+
Mixkit: {
1688+
host: 'mixkit.co',
1689+
functionS: function() {if (location.pathname != '/') {curSite = DBSite.Mixkit;}},
1690+
pager: {
1691+
type: 1,
1692+
nextL: 'css;a.pagination__link--next',
1693+
pageE: 'css;.item-grid-item',
1694+
replaceE: 'css;.pagination__wrapper',
1695+
scrollD: 2000
1696+
}
1697+
}, // Mixkit
16871698
_3dmgame: {
16881699
host: 'www.3dmgame.com',
16891700
functionS: function() {
@@ -2397,7 +2408,7 @@ function: {
23972408
}, // 萌番组
23982409
miobt: {
23992410
host: ['miobt.com', 'www.36dm.club'],
2400-
functionS: function() {curSite = DBSite.miobt; if (location.host === 'www.36dm.club') {curSite.pager.scrollD = 1000;}},
2411+
functionS: function() {curSite = DBSite.miobt; if (location.hostname === 'www.36dm.club') {curSite.pager.scrollD = 1000;}},
24012412
pager: {
24022413
type: 1,
24032414
nextL: '//a[@class="nextprev"][contains(text(), "〉") or contains(text(), "下一页") or contains(text(), "»")]',
@@ -3666,6 +3677,16 @@ function: {
36663677
scrollD: 1200
36673678
}
36683679
}, // 异次元软件 - 评论
3680+
mubolin: {
3681+
host: 'www.mubolin.cn',
3682+
pager: {
3683+
type: 1,
3684+
nextL: 'css;a.next.page-numbers',
3685+
pageE: 'css;#recent-content > div',
3686+
replaceE: 'css;nav.pagination',
3687+
scrollD: 1500
3688+
}
3689+
}, // 悪魔の小站
36693690
mpyit: {
36703691
host: 'www.mpyit.com',
36713692
functionS: function() {if (lp == '/' && !location.search) {
@@ -4136,7 +4157,7 @@ function: {
41364157
cnblogs: {
41374158
host: ['www.cnblogs.com', 'zzk.cnblogs.com'],
41384159
functionS: function() {
4139-
if (location.host === 'zzk.cnblogs.com') {
4160+
if (location.hostname === 'zzk.cnblogs.com') {
41404161
curSite = DBSite.cnblogs_search;
41414162
} else if (getCSS('#post_list')) {
41424163
curSite = DBSite.cnblogs_list;
@@ -4531,7 +4552,7 @@ function: {
45314552
}, // 脚本 - 讨论页
45324553
smzdm: {
45334554
host: ['www.smzdm.com', 'search.smzdm.com'],
4534-
functionS: function() {if (location.host === 'search.smzdm.com' || indexOF('/fenlei/')) {
4555+
functionS: function() {if (location.hostname === 'search.smzdm.com' || indexOF('/fenlei/')) {
45354556
curSite = DBSite.smzdm;
45364557
}},
45374558
pager: {
@@ -5032,7 +5053,7 @@ function: {
50325053
kingdom_list: {
50335054
pager: {
50345055
type: 1,
5035-
nextL: () => getCSS('a.page_next').href.replace(/(www.)?ermo.net/, location.host).replace(/http(s)?:/, location.protocol),
5056+
nextL: () => getCSS('a.page_next').href.replace(/(www.)?ermo.net/, location.hostname).replace(/http(s)?:/, location.protocol),
50365057
pageE: 'css;.channel_list3 > ul > li, ul#container > li',
50375058
replaceE: 'css;.pages, .list_page',
50385059
scrollD: 1000
@@ -5061,7 +5082,7 @@ function: {
50615082
case 6: // < 所有 XenForo 论坛 >
50625083
DBSite.xenforo.functionS(); break;
50635084
case 100: // < 所有使用 WordPress DUX 主题的网站 >
5064-
DBSite.dux.functionS(); if (location.host === 'apphot.cc') {curSite.pager.scrollD = 2500;}; break;
5085+
DBSite.dux.functionS(); if (location.hostname === 'apphot.cc') {curSite.pager.scrollD = 2500;}; break;
50655086
case 101: // < 所有使用 WordPress XIU 主题的网站 >
50665087
DBSite.dux.functionS(); curSite.function = {bF: src_bF, pF: [0, 'img.thumb[data-original]', 'data-original']}; break;
50675088
case 102: // < 所有使用 WordPress D8 主题的网站 >
@@ -5502,7 +5523,7 @@ function: {
55025523
} else {
55035524
let vg_r_data = getCSS('.vg-r-data');
55045525
if (vg_r_data) {
5505-
getPageElems_(`https://${location.host}/chapter_num?chapter_id=${vg_r_data.dataset.chapter_num}&ctype=1&type=${vg_r_data.dataset.chapterType};`, 'json', 'GET', '', 'url');
5526+
getPageElems_(`${location.origin}/chapter_num?chapter_id=${vg_r_data.dataset.chapter_num}&ctype=1&type=${vg_r_data.dataset.chapterType};`, 'json', 'GET', '', 'url');
55065527
}
55075528
}
55085529
}
@@ -6078,7 +6099,7 @@ function: {
60786099
if (!DBSite[now].host) continue; // 如果不存在则继续下一个循环
60796100
if (Array.isArray(DBSite[now].host)) { // 如果是数组
60806101
for (let i of DBSite[now].host) { // 遍历数组
6081-
if (i === location.host) {
6102+
if (i === location.hostname) {
60826103
if (DBSite[now].functionS) {
60836104
DBSite[now].functionS();
60846105
} else {
@@ -6088,7 +6109,7 @@ function: {
60886109
}
60896110
}
60906111
} else if (DBSite[now].host instanceof RegExp) {
6091-
if (DBSite[now].host.test(location.host)) {
6112+
if (DBSite[now].host.test(location.hostname)) {
60926113
if (self != top) {if (!DBSite[now].iframe) break;} // 如果当前位于 iframe 框架下,就需要判断是否需要执行
60936114
if (DBSite[now].functionS) {
60946115
DBSite[now].functionS();
@@ -6097,7 +6118,7 @@ function: {
60976118
}
60986119
support = true; break; // 如果找到了就退出循环
60996120
}
6100-
} else if (DBSite[now].host === location.host) {
6121+
} else if (DBSite[now].host === location.hostname) {
61016122
if (self != top) {if (!DBSite[now].iframe) break;} // 如果当前位于 iframe 框架下,就需要判断是否需要执行
61026123
if (DBSite[now].functionS) {
61036124
DBSite[now].functionS();
@@ -6616,22 +6637,22 @@ function: {
66166637

66176638
function check() { // 存在返回真,不存在返回假
66186639
let list = GM_getValue('menu_disable'); // 读取网站列表
6619-
if (list.indexOf(location.host) === -1) return false // 不存在返回假
6640+
if (list.indexOf(location.hostname) === -1) return false // 不存在返回假
66206641
return true
66216642
}
66226643

66236644
function add() {
66246645
if (check()) return
66256646
let list = GM_getValue('menu_disable'); // 读取网站列表
6626-
list.push(location.host); // 追加网站域名
6647+
list.push(location.hostname); // 追加网站域名
66276648
GM_setValue('menu_disable', list); // 写入配置
66286649
location.reload(); // 刷新网页
66296650
}
66306651

66316652
function del() {
66326653
if (!check()) return
66336654
let list = GM_getValue('menu_disable'), // 读取网站列表
6634-
index = list.indexOf(location.host);
6655+
index = list.indexOf(location.hostname);
66356656
list.splice(index, 1); // 删除网站域名
66366657
GM_setValue('menu_disable', list); // 写入配置
66376658
location.reload(); // 刷新网页

0 commit comments

Comments
 (0)