|
1 | 1 | // ==UserScript== |
2 | 2 | // @name 自动无缝翻页 |
3 | | -// @version 1.6.7 |
| 3 | +// @version 1.6.8 |
4 | 4 | // @author X.I.U |
5 | | -// @description 无缝拼接下一页内容,目前支持:[所有使用「Discuz!、Flarum、DUX(WordPress)」的网站]、百度、谷歌、必应、贴吧、豆瓣、微博、千图网、Pixabay、3DM、游侠网、游民星空、Steam 创意工坊、423Down、Sordum、不死鸟、小众软件、六音软件、微当下载、异次元软件、老殁殁漂遥、异星软件空间、漫画DB、HiComic(嗨漫画)、古风漫画网、砂之船动漫家、RARBG、PubMed、AfreecaTV、GreasyFork、AlphaCoders、CS.RIN.RU、Crackhub213、FitGirl Repacks... |
| 5 | +// @description 无缝拼接下一页内容,目前支持:[所有使用「Discuz!、Flarum、DUX(WordPress)」的网站]、百度、谷歌、必应、贴吧、豆瓣、微博、千图网、Pixabay、3DM、游侠网、游民星空、Steam 创意工坊、423Down、Sordum、不死鸟、小众软件、六音软件、微当下载、异次元软件、老殁殁漂遥、异星软件空间、漫画DB、HiComic(嗨漫画)、古风漫画网、砂之船动漫家、RARBG、PubMed、AfreecaTV、GreasyFork、CS.RIN.RU、Crackhub213、FitGirl Repacks... |
6 | 6 | // @match *://*/* |
7 | 7 | // @connect www.gamersky.com |
8 | 8 | // @icon https://i.loli.net/2021/03/07/rdijeYm83pznxWq.png |
|
29 | 29 | 'www.423down.com', 'www.sordum.org', 'iao.su', 'www.appinn.com', 'www.sixyin.com', 'www.weidown.com', 'www.iplaysoft.com', 'www.mpyit.com', 'www.yxssp.com', |
30 | 30 | 'www.manhuadb.com', 'www.hicomic.net', 'www.gufengmh8.com', 'www.szcdmj.com', |
31 | 31 | 'rarbgprx.org', 'pubmed.ncbi.nlm.nih.gov', 'www.afreecatv.com', 'greasyfork.org', |
32 | | - 'art.alphacoders.com', 'wall.alphacoders.com', 'avatars.alphacoders.com', 'mobile.alphacoders.com', |
33 | 32 | 'cs.rin.ru', 'crackhub.site', 'fitgirl-repacks.site']; |
34 | 33 |
|
35 | 34 | if (GM_getValue('menu_disable') == null){GM_setValue('menu_disable', [])}; |
|
175 | 174 | SiteTypeID: 0, |
176 | 175 | pager: { |
177 | 176 | type: 1, |
178 | | - nextLink: '//div[@id="page"]//a[contains(text(),"下一页")][@href]', |
| 177 | + nextLink: 'id("page")//a[contains(text(),"下一页")][@href]', |
179 | 178 | pageElement: 'css;#content_left > *', |
180 | 179 | HT_insert: ['css;#content_left', 3], |
181 | 180 | replaceE: 'css;#page', |
|
186 | 185 | SiteTypeID: 0, |
187 | 186 | pager: { |
188 | 187 | type: 1, |
189 | | - nextLink: '//a[@id="pnnext"][@href]', |
| 188 | + nextLink: 'id("pnnext")[@href]', |
190 | 189 | pageElement: 'css;#res > *', |
191 | 190 | HT_insert: ['css;#res', 3], |
192 | | - replaceE: '//div[@id="navcnt"] | //div[@id="rcnt"]//div[@role="navigation"]', |
193 | | - scrollDelta: 1500 |
| 191 | + replaceE: 'id("navcnt") | id("rcnt")//div[@role="navigation"]', |
| 192 | + scrollDelta: 2000 |
194 | 193 | } |
195 | 194 | }, |
196 | 195 | bing: { |
|
340 | 339 | SiteTypeID: 0, |
341 | 340 | pager: { |
342 | 341 | type: 3, |
343 | | - nextLink: '//a[@id="after_this_page"][@href]', |
| 342 | + nextLink: 'id("after_this_page")[@href]', |
344 | 343 | pageElement: 'css;#Content >*:not(.news_ding):not(.page_fenye)', |
345 | 344 | HT_insert: ['css;.page_fenye', 1], |
346 | 345 | replaceE: 'css;.page_fenye', |
|
665 | 664 | scrollDelta: 1000 |
666 | 665 | } |
667 | 666 | }, |
668 | | - alphacoders_art: { |
669 | | - SiteTypeID: 0, |
670 | | - pager: { |
671 | | - type: 1, |
672 | | - nextLink: '//a[@id="next_page"][@href]', |
673 | | - pageElement: 'css;.container-masonry > div', |
674 | | - HT_insert: ['css;.container-masonry', 3], |
675 | | - replaceE: '//div[@class="hidden-xs hidden-sm"]/..', |
676 | | - scrollDelta: 1000 |
677 | | - }, |
678 | | - function: { |
679 | | - before: alphacoders_art_beforeFunction |
680 | | - } |
681 | | - }, |
682 | | - alphacoders_wall: { |
683 | | - SiteTypeID: 0, |
684 | | - pager: { |
685 | | - type: 1, |
686 | | - nextLink: '//a[@id="next_page"][@href]', |
687 | | - pageElement: 'css;.page_container > .center > div', |
688 | | - HT_insert: ['css;.page_container > .center', 3], |
689 | | - replaceE: '//div[@class="hidden-xs hidden-sm"]/..', |
690 | | - scrollDelta: 1000 |
691 | | - } |
692 | | - }, |
693 | 667 | cs_rin_ru: { |
694 | 668 | SiteTypeID: 0, |
695 | 669 | pager: { |
|
715 | 689 | scrollDelta: 1500 |
716 | 690 | } |
717 | 691 | }, |
| 692 | + cs_rin_ru_search: { |
| 693 | + SiteTypeID: 0, |
| 694 | + pager: { |
| 695 | + type: 1, |
| 696 | + nextLink: 'id("wrapcentre")/div[@class="nav"]//a[text()="Next"]', |
| 697 | + pageElement: 'css;#wrapcentre > form > table.tablebg > tbody > tr[valign]', |
| 698 | + HT_insert: ['css;#wrapcentre > form > table.tablebg > tbody > tr:last-child', 1], |
| 699 | + replaceE: 'css;#wrapcentre > div', |
| 700 | + scrollDelta: 1500 |
| 701 | + } |
| 702 | + }, |
718 | 703 | fitgirl: { |
719 | 704 | SiteTypeID: 0, |
720 | 705 | pager: { |
|
891 | 876 | curSite = DBSite.greasyfork_discussions; |
892 | 877 | } |
893 | 878 | break; |
894 | | - case 'art.alphacoders.com': // < 壁纸网站 > |
895 | | - curSite = DBSite.alphacoders_art; |
896 | | - setTimeout(alphacoders_art_beforeFunction_0, 1000); |
897 | | - break; |
898 | | - /*case 'wall.alphacoders.com': // 这几个已经原生支持自动无缝翻页了 |
899 | | - case 'avatars.alphacoders.com': |
900 | | - case 'mobile.alphacoders.com': |
901 | | - curSite = DBSite.alphacoders_wall; |
902 | | - break;*/ |
903 | | - case 'cs.rin.ru': // < cs_rin_ru > |
904 | | - if (location.pathname === '/forum/viewforum.php') { // 版块帖子列表 |
| 879 | + case 'cs.rin.ru': // < 游戏下载论坛 > |
| 880 | + if (location.pathname === '/forum/viewforum.php') { // 版块帖子列表 |
905 | 881 | curSite = DBSite.cs_rin_ru; |
906 | 882 | } else if (location.pathname === '/forum/viewtopic.php') { // 帖子内 |
907 | 883 | if (GM_getValue('menu_discuz_thread_page')) curSite = DBSite.cs_rin_ru_viewtopic; |
| 884 | + } else if (location.pathname === '/forum/search.php') { // 搜索结果 |
| 885 | + curSite = DBSite.cs_rin_ru_search; |
908 | 886 | } |
909 | 887 | break; |
910 | 888 | case 'crackhub.site': // < 游戏下载网站 > |
|
1085 | 1063 | } |
1086 | 1064 |
|
1087 | 1065 |
|
1088 | | - // alphacoders_art 的插入前函数(图片结构调整) |
1089 | | - function alphacoders_art_beforeFunction(pageElems) { |
1090 | | - pageElems.forEach(function (one) { |
1091 | | - one.style.float = 'left'; |
1092 | | - }); |
1093 | | - return pageElems |
1094 | | - } |
1095 | | - // alphacoders_art(图片结构调整) |
1096 | | - function alphacoders_art_beforeFunction_0() { |
1097 | | - let pageElems1 = document.querySelectorAll('.container-masonry > div') |
1098 | | - document.querySelector('.container-masonry').style.height = 'auto' |
1099 | | - pageElems1.forEach(function (one) { |
1100 | | - one.style.float = 'left'; |
1101 | | - }); |
1102 | | - } |
1103 | | - |
1104 | | - |
1105 | | - // cs_rin_ru 的插入前函数(过滤置顶帖子) |
| 1066 | + // cs_rin_ru 各版块帖子列表的插入前函数(过滤置顶帖子) |
1106 | 1067 | function cs_rin_ru_beforeFunction(pageElems) { |
1107 | 1068 | for (let i = 0; i < pageElems.length; i++) { |
1108 | 1069 | if (pageElems[i].textContent.replace(/\n| /g,'') === 'Topics') { |
|
0 commit comments