|
1 | 1 | // ==UserScript== |
2 | 2 | // @name 自动无缝翻页 |
3 | | -// @version 1.3.7 |
| 3 | +// @version 1.3.8 |
4 | 4 | // @author X.I.U |
5 | | -// @description 自动无缝翻页,目前支持:所有 Discuz!论坛、423Down、Apphot、不死鸟、小众软件、异次元软件、微当下载、异星软件空间、豆瓣电影、微博评论、3DM游戏网、游侠网、游民星空、千图网、阿里小站、RARBG、FitGirl Repacks、AlphaCoders、PubMed、AfreecaTV... |
| 5 | +// @description 自动无缝翻页,目前支持:所有「Discuz!、Flarum」论坛、423Down、Apphot、不死鸟、小众软件、异次元软件、微当下载、异星软件空间、豆瓣电影、微博评论、3DM游戏网、游侠网、游民星空、千图网、阿里小站、RARBG、FitGirl Repacks、AlphaCoders、PubMed、AfreecaTV... |
6 | 6 | // @match *://*/* |
7 | 7 | // @exclude *://www.423down.com/*.html |
8 | 8 | // @exclude *://apphot.cc/*.html |
|
33 | 33 | 'rarbgprx.org', |
34 | 34 | 'fitgirl-repacks.site', |
35 | 35 | 'www.yxssp.com', |
36 | | - 'pan.yuankongjian.com', |
37 | 36 | 'weibo.com', |
38 | 37 | 'www.afreecatv.com']; |
39 | 38 |
|
|
43 | 42 | GM_registerMenuCommand('❎ 已禁用 (点击对当前网站启用)', function(){menu_disable('del')}); |
44 | 43 | return |
45 | 44 | } else { |
46 | | - if (websiteList.indexOf(location.host) > -1 || document.querySelector('meta[name="author"][content*="Discuz!"], meta[name="generator"][content*="Discuz!"]')) { |
| 45 | + if (websiteList.indexOf(location.host) > -1 // 其他网站列表 |
| 46 | + || document.querySelector('meta[name="author"][content*="Discuz!"], meta[name="generator"][content*="Discuz!"]') // 所有 Discuz! 论坛 |
| 47 | + || document.getElementById('flarum-loading') // 所有 Flarum 论坛 |
| 48 | + ) { |
47 | 49 | GM_registerMenuCommand('✅ 已启用 (点击对当前网站禁用)', function(){menu_disable('add')}); |
48 | 50 | } else { |
49 | 51 | GM_registerMenuCommand('❌ 当前网站暂不支持 [点击申请支持]', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});window.GM_openInTab('https://greasyfork.org/zh-CN/scripts/419215/feedback', {active: true,insert: true,setParent: true});}); |
|
137 | 139 | scrollDelta: 1000 |
138 | 140 | } |
139 | 141 | }, |
140 | | - _423down_postslist: { |
| 142 | + flarum: { |
141 | 143 | SiteTypeID: 7, |
| 144 | + pager: { |
| 145 | + type: 2, |
| 146 | + nextLink: '.DiscussionList-loadMore > button[title]', |
| 147 | + scrollDelta: 1000 |
| 148 | + } |
| 149 | + }, |
| 150 | + _423down_postslist: { |
| 151 | + SiteTypeID: 8, |
142 | 152 | pager: { |
143 | 153 | type: 1, |
144 | 154 | nextLink: '//div[@class="paging"]//a[contains(text(),"下一页")][@href]', |
|
149 | 159 | } |
150 | 160 | }, |
151 | 161 | apphot_postslist: { |
152 | | - SiteTypeID: 8, |
| 162 | + SiteTypeID: 9, |
153 | 163 | pager: { |
154 | 164 | type: 1, |
155 | 165 | nextLink: '//div[@class="pagination"]//a[contains(text(),"下一页")][@href]', |
|
160 | 170 | } |
161 | 171 | }, |
162 | 172 | iao_su_postslist: { |
163 | | - SiteTypeID: 9, |
| 173 | + SiteTypeID: 10, |
164 | 174 | pager: { |
165 | 175 | type: 1, |
166 | 176 | nextLink: '//li[@class="btn btn-primary next"]//a[@href]', |
|
174 | 184 | } |
175 | 185 | }, |
176 | 186 | appinn_postslist: { |
177 | | - SiteTypeID: 10, |
| 187 | + SiteTypeID: 11, |
178 | 188 | pager: { |
179 | 189 | type: 1, |
180 | 190 | nextLink: '//a[@class="next page-numbers"][@href]', |
|
185 | 195 | } |
186 | 196 | }, |
187 | 197 | iplaysoft_postslist: { |
188 | | - SiteTypeID: 11, |
| 198 | + SiteTypeID: 12, |
189 | 199 | pager: { |
190 | 200 | type: 1, |
191 | 201 | nextLink: '//div[@class="pagenavi"]//a[@title="下一页"][@href]', |
|
199 | 209 | } |
200 | 210 | }, |
201 | 211 | iplaysoft_postcomments: { |
202 | | - SiteTypeID: 12, |
| 212 | + SiteTypeID: 13, |
203 | 213 | pager: { |
204 | 214 | type: 2, |
205 | 215 | nextLink: '#loadHistoryComments', |
|
208 | 218 | } |
209 | 219 | }, |
210 | 220 | pubmed_postslist: { |
211 | | - SiteTypeID: 13, |
| 221 | + SiteTypeID: 14, |
212 | 222 | pager: { |
213 | 223 | type: 2, |
214 | 224 | nextLink: 'button.load-button.next-page', |
|
217 | 227 | } |
218 | 228 | }, |
219 | 229 | wall_alphacoders: { |
220 | | - SiteTypeID: 14, |
| 230 | + SiteTypeID: 15, |
221 | 231 | pager: { |
222 | 232 | type: 1, |
223 | 233 | nextLink: '//a[@id="next_page"][@href]', |
|
228 | 238 | } |
229 | 239 | }, |
230 | 240 | art_alphacoders: { |
231 | | - SiteTypeID: 15, |
| 241 | + SiteTypeID: 16, |
232 | 242 | pager: { |
233 | 243 | type: 1, |
234 | 244 | nextLink: '//a[@id="next_page"][@href]', |
|
242 | 252 | } |
243 | 253 | }, |
244 | 254 | fitgirl: { |
245 | | - SiteTypeID: 16, |
| 255 | + SiteTypeID: 17, |
246 | 256 | pager: { |
247 | 257 | type: 1, |
248 | 258 | nextLink: '//a[@class="next page-numbers"][@href]', |
|
253 | 263 | } |
254 | 264 | }, |
255 | 265 | weidown: { |
256 | | - SiteTypeID: 17, |
| 266 | + SiteTypeID: 18, |
257 | 267 | pager: { |
258 | 268 | type: 1, |
259 | 269 | nextLink: '//a[@class="nextpage"][@href]', |
|
264 | 274 | } |
265 | 275 | }, |
266 | 276 | weidown_search: { |
267 | | - SiteTypeID: 18, |
| 277 | + SiteTypeID: 19, |
268 | 278 | pager: { |
269 | 279 | type: 1, |
270 | 280 | nextLink: '//a[@class="nextpage"][@href]', |
|
275 | 285 | } |
276 | 286 | }, |
277 | 287 | weidown_special: { |
278 | | - SiteTypeID: 19, |
| 288 | + SiteTypeID: 20, |
279 | 289 | pager: { |
280 | 290 | type: 1, |
281 | 291 | nextLink: '//a[@class="nextpage"][@href]', |
|
286 | 296 | } |
287 | 297 | }, |
288 | 298 | douban_subject_comments: { |
289 | | - SiteTypeID: 20, |
| 299 | + SiteTypeID: 21, |
290 | 300 | pager: { |
291 | 301 | type: 1, |
292 | 302 | nextLink: '//a[@class="next"][@href]', |
|
297 | 307 | } |
298 | 308 | }, |
299 | 309 | douban_subject_reviews: { |
300 | | - SiteTypeID: 21, |
| 310 | + SiteTypeID: 22, |
301 | 311 | pager: { |
302 | 312 | type: 1, |
303 | 313 | nextLink: '//link[@rel="next"][@href]', |
|
308 | 318 | } |
309 | 319 | }, |
310 | 320 | douban_subject_episode: { |
311 | | - SiteTypeID: 22, |
| 321 | + SiteTypeID: 23, |
312 | 322 | pager: { |
313 | 323 | type: 1, |
314 | 324 | nextLink: '//link[@rel="next"][@href]', |
|
319 | 329 | } |
320 | 330 | }, |
321 | 331 | douban_search: { |
322 | | - SiteTypeID: 23, |
| 332 | + SiteTypeID: 24, |
323 | 333 | pager: { |
324 | 334 | type: 1, |
325 | 335 | nextLink: '//a[@class="next"][@href]', |
|
330 | 340 | } |
331 | 341 | }, |
332 | 342 | _3dmgame: { |
333 | | - SiteTypeID: 24, |
| 343 | + SiteTypeID: 25, |
334 | 344 | pager: { |
335 | 345 | type: 3, |
336 | 346 | nextLink: '//li[@class="next"]/a[@href]', |
|
342 | 352 | } |
343 | 353 | }, |
344 | 354 | gamersky_ent: { |
345 | | - SiteTypeID: 25, |
| 355 | + SiteTypeID: 26, |
346 | 356 | pager: { |
347 | 357 | type: 3, |
348 | 358 | nextLink: '//div[@class="page_css"]/a[text()="下一页"][@href]', |
|
354 | 364 | } |
355 | 365 | }, |
356 | 366 | gamersky_gl: { |
357 | | - SiteTypeID: 26, |
| 367 | + SiteTypeID: 27, |
358 | 368 | pager: { |
359 | 369 | type: 3, |
360 | 370 | nextLink: '//div[@class="page_css"]/a[text()="下一页"][@href]', |
|
366 | 376 | } |
367 | 377 | }, |
368 | 378 | ali213_www: { |
369 | | - SiteTypeID: 27, |
| 379 | + SiteTypeID: 28, |
370 | 380 | pager: { |
371 | 381 | type: 3, |
372 | 382 | nextLink: '//a[@id="after_this_page"][@href]', |
|
378 | 388 | } |
379 | 389 | }, |
380 | 390 | ali213_gl: { |
381 | | - SiteTypeID: 28, |
| 391 | + SiteTypeID: 29, |
382 | 392 | pager: { |
383 | 393 | type: 3, |
384 | 394 | nextLink: '//a[@class="next n"][@href]', |
|
390 | 400 | } |
391 | 401 | }, |
392 | 402 | _58pic: { |
393 | | - SiteTypeID: 29, |
| 403 | + SiteTypeID: 30, |
394 | 404 | pager: { |
395 | 405 | type: 1, |
396 | 406 | nextLink: '//div[contains(@class,"page-box")]//a[text()="下一页"][@href]', |
|
404 | 414 | } |
405 | 415 | }, |
406 | 416 | _58pic_c: { |
407 | | - SiteTypeID: 30, |
| 417 | + SiteTypeID: 31, |
408 | 418 | pager: { |
409 | 419 | type: 1, |
410 | 420 | nextLink: '//div[contains(@class,"page-box")]//a[text()="下一页"][@href]', |
|
418 | 428 | } |
419 | 429 | }, |
420 | 430 | rarbgprx: { |
421 | | - SiteTypeID: 31, |
| 431 | + SiteTypeID: 32, |
422 | 432 | pager: { |
423 | 433 | type: 1, |
424 | 434 | nextLink: '(//a[@title="next page"])[1][@href]', |
|
429 | 439 | } |
430 | 440 | }, |
431 | 441 | yxssp: { |
432 | | - SiteTypeID: 32, |
| 442 | + SiteTypeID: 33, |
433 | 443 | pager: { |
434 | 444 | type: 1, |
435 | 445 | nextLink: '//div[@class="page-nav td-pb-padding-side"]/a[last()][@href]', |
|
439 | 449 | scrollDelta: 900 |
440 | 450 | } |
441 | 451 | }, |
442 | | - yuankongjian: { |
443 | | - SiteTypeID: 33, |
444 | | - pager: { |
445 | | - type: 2, |
446 | | - nextLink: 'button[title="加载更多"]', |
447 | | - nextText: '加载更多', |
448 | | - scrollDelta: 500 |
449 | | - } |
450 | | - }, |
451 | 452 | weibo_comment: { |
452 | 453 | SiteTypeID: 34, |
453 | 454 | pager: { |
|
556 | 557 | case "rarbgprx.org": |
557 | 558 | curSite = DBSite.rarbgprx; |
558 | 559 | break; |
559 | | - case "pan.yuankongjian.com": |
560 | | - if (location.pathname.indexOf('/d/') === -1) { |
561 | | - curSite = DBSite.yuankongjian; |
562 | | - } |
563 | | - break; |
564 | 560 | case "weibo.com": |
565 | 561 | curSite = DBSite.weibo_comment; |
566 | 562 | break; |
567 | 563 | case "www.afreecatv.com": |
568 | 564 | curSite = DBSite.afreecatv; |
569 | 565 | break; |
570 | | - default: // < Discuz! 论坛专用 > |
571 | | - if (location.pathname.indexOf('.html') > -1) { // 判断是不是静态网页(.html 结尾) |
572 | | - if (location.pathname.indexOf('forum') > -1) { // 各版块帖子列表 |
573 | | - curSite = DBSite.discuz_forum; |
574 | | - } else if (location.pathname.indexOf('thread') > -1) { // 帖子内 |
575 | | - curSite = DBSite.discuz_thread; |
576 | | - hidePgbtn(); // 隐藏帖子内的 [下一页] 按钮 |
577 | | - }else if(location.pathname.indexOf('search') > -1) { // 搜索结果 |
578 | | - curSite = DBSite.discuz_search; |
579 | | - } |
580 | | - } else { |
581 | | - if (location.search.indexOf('mod=forumdisplay') > -1) { // 各版块帖子列表 |
582 | | - curSite = DBSite.discuz_forum; |
583 | | - } else if (location.search.indexOf('mod=viewthread') > -1) { // 帖子内 |
584 | | - curSite = DBSite.discuz_thread; |
585 | | - hidePgbtn(); // 隐藏帖子内的 [下一页] 按钮 |
586 | | - } else if (location.search.indexOf('mod=guide') > -1) { // 导读帖子列表 |
587 | | - curSite = DBSite.discuz_guide; |
588 | | - } else if(location.search.indexOf('mod=space') > -1 && location.search.indexOf('&view=me') > -1) { // 别人的主题/回复 |
589 | | - curSite = DBSite.discuz_youspace; |
590 | | - } else if (location.search.indexOf('mod=collection') > -1) { // 淘贴列表 |
591 | | - curSite = DBSite.discuz_collection; |
592 | | - } else if (location.pathname.indexOf('search') > -1) { // 搜索结果 |
593 | | - curSite = DBSite.discuz_search; |
594 | | - } else { // 考虑到部分论坛的部分板块帖子列表 URL 是自定义的 |
595 | | - curSite = DBSite.discuz_forum; |
| 566 | + default: |
| 567 | + if (document.querySelector('meta[name="author"][content*="Discuz!"], meta[name="generator"][content*="Discuz!"]')) { |
| 568 | + // < 所有 Discuz!论坛 > |
| 569 | + if (location.pathname.indexOf('.html') > -1) { // 判断是不是静态网页(.html 结尾) |
| 570 | + if (location.pathname.indexOf('forum') > -1) { // 各版块帖子列表 |
| 571 | + curSite = DBSite.discuz_forum; |
| 572 | + } else if (location.pathname.indexOf('thread') > -1) { // 帖子内 |
| 573 | + curSite = DBSite.discuz_thread; |
| 574 | + hidePgbtn(); // 隐藏帖子内的 [下一页] 按钮 |
| 575 | + }else if(location.pathname.indexOf('search') > -1) { // 搜索结果 |
| 576 | + curSite = DBSite.discuz_search; |
| 577 | + } |
| 578 | + } else { |
| 579 | + if (location.search.indexOf('mod=forumdisplay') > -1) { // 各版块帖子列表 |
| 580 | + curSite = DBSite.discuz_forum; |
| 581 | + } else if (location.search.indexOf('mod=viewthread') > -1) { // 帖子内 |
| 582 | + curSite = DBSite.discuz_thread; |
| 583 | + hidePgbtn(); // 隐藏帖子内的 [下一页] 按钮 |
| 584 | + } else if (location.search.indexOf('mod=guide') > -1) { // 导读帖子列表 |
| 585 | + curSite = DBSite.discuz_guide; |
| 586 | + } else if(location.search.indexOf('mod=space') > -1 && location.search.indexOf('&view=me') > -1) { // 别人的主题/回复 |
| 587 | + curSite = DBSite.discuz_youspace; |
| 588 | + } else if (location.search.indexOf('mod=collection') > -1) { // 淘贴列表 |
| 589 | + curSite = DBSite.discuz_collection; |
| 590 | + } else if (location.pathname.indexOf('search') > -1) { // 搜索结果 |
| 591 | + curSite = DBSite.discuz_search; |
| 592 | + } else { // 考虑到部分论坛的部分板块帖子列表 URL 是自定义的 |
| 593 | + curSite = DBSite.discuz_forum; |
| 594 | + } |
596 | 595 | } |
| 596 | + } else if (document.getElementById('flarum-loading') && location.pathname.indexOf('/d/') === -1) { |
| 597 | + // < 所有 Flarum 论坛 > |
| 598 | + curSite = DBSite.flarum; |
597 | 599 | } |
598 | 600 | } |
599 | 601 | curSite.pageUrl = ""; // 下一页URL |
|
0 commit comments