|
1 | 1 | // ==UserScript== |
2 | 2 | // @name 自动无缝翻页 |
3 | | -// @version 3.1.0 |
| 3 | +// @version 3.1.1 |
4 | 4 | // @author X.I.U |
5 | 5 | // @description 无缝拼接下一页内容(瀑布流),目前支持:[所有「Discuz!、Flarum、phpBB、Xiuno、XenForo、DUX/XIU/D8/Begin(WP主题)」网站]、百度、谷歌、必应、搜狗、头条搜索、360 搜索、微信搜索、贴吧、豆瓣、微博、NGA、V2EX、B 站(Bilibili)、蓝奏云、煎蛋网、糗事百科、龙的天空、起点小说、IT之家、千图网、Pixabay、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、FitGirl、片库、茶杯狐、NO视频、低端影视、奈菲影视、91美剧网、音范丝、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、极简插件、小众软件、动漫狂、漫画猫、漫画DB、动漫之家、古风漫画网、PubMed、wikiHow、GreasyFork、Github、StackOverflow(以上仅一小部分,更多的写不下了... |
6 | 6 | // @match *://*/* |
|
1121 | 1121 | } |
1122 | 1122 | }, // 飞客网论坛 - 帖子内 |
1123 | 1123 | adnmb3: { |
1124 | | - host: 'adnmb3.com', |
| 1124 | + host: ['adnmb3.com', 'www.tnmb.org'], |
1125 | 1125 | functionStart: function() { |
1126 | 1126 | if (location.pathname.indexOf('/m/f/') > -1) { |
1127 | 1127 | curSite = DBSite.adnmb3_mf; |
|
1139 | 1139 | insertP: ['css;.h-threads-list', 3], |
1140 | 1140 | replaceE: '//ul[contains(@class, "pagination")]', |
1141 | 1141 | scriptT: 3, |
1142 | | - scrollD: 1500 |
| 1142 | + scrollD: 2000 |
1143 | 1143 | } |
1144 | 1144 | }, // A 岛 |
1145 | 1145 | adnmb3_t: { |
|
1150 | 1150 | insertP: ['css;.h-threads-list > .h-threads-item', 3], |
1151 | 1151 | replaceE: '//ul[contains(@class, "pagination")]', |
1152 | 1152 | scriptT: 3, |
1153 | | - scrollD: 1500 |
| 1153 | + scrollD: 2000 |
1154 | 1154 | } |
1155 | 1155 | }, // A 岛 - 帖子内 |
1156 | 1156 | adnmb3_mf: { |
|
1161 | 1161 | insertP: ['css;#h-threads-pagination', 1], |
1162 | 1162 | replaceE: 'css;#h-threads-pagination', |
1163 | 1163 | scriptT: 3, |
1164 | | - scrollD: 1500 |
| 1164 | + scrollD: 2000 |
1165 | 1165 | } |
1166 | 1166 | }, // A 岛 - 帖子列表(手机版) |
1167 | 1167 | adnmb3_mt: { |
|
1172 | 1172 | insertP: ['css;.h-threads-replylist', 3], |
1173 | 1173 | replaceE: 'css;#h-threads-pagination', |
1174 | 1174 | scriptT: 3, |
1175 | | - scrollD: 1500 |
| 1175 | + scrollD: 2000 |
1176 | 1176 | } |
1177 | 1177 | }, // A 岛 - 帖子内(手机版) |
1178 | 1178 | guokr: { |
|
4503 | 4503 |
|
4504 | 4504 | // [Anime1] 获取下一页内容(叠加) |
4505 | 4505 | function anime1_nextL() { |
4506 | | - let next = document.getElementById('tablepress-1_next'); |
| 4506 | + let next = getCSS('#tablepress-1_next'); |
4507 | 4507 | if (next && next.className.indexOf('disabled') === -1) { |
4508 | | - let oldList = document.querySelector('tbody.row-hover'); |
| 4508 | + let oldList = getCSS('tbody.row-hover').innerHTML; |
4509 | 4509 | if (oldList) { |
4510 | | - // 将当前列表存为变量 |
4511 | | - oldList = oldList.innerHTML; |
4512 | 4510 | // 点击下一页 |
4513 | 4511 | next.click(); |
4514 | 4512 | // 当前页码 + 1 |
4515 | 4513 | pageNum.now = pageNum._now + 1 |
4516 | 4514 | // 插入到列表头部 |
4517 | | - document.querySelector('tbody.row-hover').insertAdjacentHTML('afterbegin', oldList); |
| 4515 | + getCSS('tbody.row-hover').insertAdjacentHTML('afterbegin', oldList); |
4518 | 4516 | } |
4519 | 4517 | } |
4520 | 4518 | } |
|
4899 | 4897 | if (next) { |
4900 | 4898 | if (next.href === curSite.pageUrl) return |
4901 | 4899 | curSite.pageUrl = next.href; |
4902 | | - console.log(curSite.pageUrl) |
| 4900 | + //console.log(curSite.pageUrl) |
4903 | 4901 | getPageElems(curSite.pageUrl); |
4904 | 4902 | } |
4905 | 4903 | } |
|
5426 | 5424 | timeout: 10000, |
5427 | 5425 | onload: function (response) { |
5428 | 5426 | try { |
5429 | | - processResult(response); |
| 5427 | + processResult(ShowPager.createDocumentByString(response.responseText)); |
5430 | 5428 | } catch (e) { |
5431 | 5429 | console.log(e); |
5432 | 5430 | } |
|
5438 | 5436 | // XHR 后处理结果 |
5439 | 5437 | function processResult(response) { |
5440 | 5438 | //console.log('最终 URL:' + response.finalUrl, '返回内容:' + response.responseText) |
5441 | | - var newBody = ShowPager.createDocumentByString(response.responseText); |
| 5439 | + var newBody = response; |
5442 | 5440 | let pageElems = getAll(curSite.pager.pageE, newBody, newBody), |
5443 | 5441 | toElement = getAll(curSite.pager.insertP[0])[0]; |
5444 | 5442 | //console.log(curSite.pager.pageE, pageElems, curSite.pager.insertP, toElement) |
|
0 commit comments