Skip to content

Commit 143794d

Browse files
committed
优化 [Discuz! - 帖子内] 规则
1 parent 27c2786 commit 143794d

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

Autopage.user.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ==UserScript==
22
// @name 自动无缝翻页
3-
// @version 4.1.5
3+
// @version 4.1.6
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 *://*/*
@@ -180,7 +180,7 @@ function: {
180180
type: 1,
181181
nextL: 'css;a.nxt:not([href^="javascript"]) ,a.next:not([href^="javascript"])',
182182
pageE: 'css;#postlist > div[id^="post_"]',
183-
replaceE: 'css;#ct > .pgs, .pages',
183+
replaceE: '//div[contains(@class,"pg") or contains(@class,"pages")][./a[contains(@class,"nxt") or contains(@class,"next")][not(contains(@href,"javascript") or contains(@href,"commentmore"))]]',
184184
scrollD: 1500
185185
},
186186
function: {
@@ -6770,14 +6770,17 @@ function: {
67706770
}
67716771
}
67726772
} else { // 获取主体元素失败后,尝试重新获取
6773+
console.log(curSite.pager.pageE, pageElems, curSite.pager.insertP, toElement)
67736774
if (curSite.retry) {
6775+
console.warn('[自动无缝翻页] 获取主体元素失败,尝试重新获取...')
67746776
setTimeout(function(){curSite.pageUrl = '';}, curSite.retry)
67756777
} else { // 尝试替换元素看能不能继续翻页下去
67766778
if (curSite.pager.replaceE) {
67776779
if (replaceElems(response)) { // 如果替换成功
6780+
console.log('[自动无缝翻页] 获取主体元素失败,尝试替换元素成功!')
67786781
pageNum.now = pageNum._now + 1; // 当前页码 + 1
67796782
if (curSite.history) addHistory(response); // 添加历史记录
6780-
}
6783+
} else {console.error('[自动无缝翻页] 获取主体元素失败,尝试替换元素失败...')}
67816784
}
67826785
}
67836786
}

0 commit comments

Comments
 (0)