自动无缝翻页

无缝拼接下一页内容(瀑布流),目前支持:[所有使用「Discuz!、Flarum、DUX(WordPress)」的网站]、百度、谷歌、必应、搜狗、头条搜索、360 搜索、微信搜索、贴吧、豆瓣、微博、NGA、V2EX、煎蛋网、糗事百科、龙的天空、起点小说、IT之家、千图网、Pixabay、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、FitGirl、片库、茶杯狐、NO视频、低端影视、奈菲影视、91美剧网、真不卡影院、音范丝、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、极简插件、小众软件、动漫狂、漫画猫、漫画DB、HiComic、动漫之家、古风漫画网、PubMed、wikiHow、GreasyFork、Github、StackOverflow(以上仅一部分,更多的写不下了...

当前为 2021-10-07 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name 自动无缝翻页
  3. // @version 2.7.8
  4. // @author X.I.U
  5. // @description 无缝拼接下一页内容(瀑布流),目前支持:[所有使用「Discuz!、Flarum、DUX(WordPress)」的网站]、百度、谷歌、必应、搜狗、头条搜索、360 搜索、微信搜索、贴吧、豆瓣、微博、NGA、V2EX、煎蛋网、糗事百科、龙的天空、起点小说、IT之家、千图网、Pixabay、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、FitGirl、片库、茶杯狐、NO视频、低端影视、奈菲影视、91美剧网、真不卡影院、音范丝、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、极简插件、小众软件、动漫狂、漫画猫、漫画DB、HiComic、动漫之家、古风漫画网、PubMed、wikiHow、GreasyFork、Github、StackOverflow(以上仅一部分,更多的写不下了...
  6. // @match *://*/*
  7. // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAALfElEQVRYhX2Xe3Bd1XXGf3vvc859X+nq6nUlW5Yly7JlI2xsYzAwtnk4ATpAxkNTHm0mnaTT/gHTTvrIBDLTpp1JUoZppqHQls5AKTR2INOWJJQSXF4x2BhsJCRZ8kuWZckPSVf3/Trn7N3RVTFpQrNn1l97n7O/vda31reWMKMPcmUJA9U8vrwHGdqCHn4HPzePaIxhVSoYbYRXrn7BeMVbCUduF6kVUXHwvQP+6amDaqDnoIompmQytaBnTmB8H5lowrjgFss48SBeI/hUEEZeudLi1ywhJEIJdL6Q8rzal/1a5SGC4XZrYBvWwEZobMdLdH6RH+z/Io1taEeh52fe8tOZbysl/ouWFvANYP7fSz4DgAEBBIL4xiS8ubmnVcTZK68aRK29Dtm8dgnZJydRW+/E2nrnp19nz+7U77+60zt0qMz07J/KxuQTwrIw4rMBCDP6wC+FIIcO34eudDdXf/7jD52Opi772lugY3AZr++hp06gz48j+waRqTWYmVHcS+chEMFeuw1hBzBzY7g/fQE9fmqBYPzBQKrpVa/R4OkCAnXlSvXnX9sIllk220BE4Z8OdHoj54YCK6Od1i2/iUmuRyDRk6NUn3+M0pv/hnf0AE40jEjEqP3oe6Rf/CGOWUTNjFKby2MP7EBtugURFWFxfOhB4+o4yfhrGAdZsxHaqZt6dNce9KXYFSPfGWS68JFqTXSqO7+MCaTqETGTwxSeeoRCOoPT2YUIhFC2jbQF/uwUatU6rPbVUM5T+OfHUO3dWKv6kSsGUIOD6PEPr+fswnanpecFZYVQhFAyjPS9Tj4xw2rcU+pJApEutWsvRjaBW8NUShilkE1JIqlUPfi6VMLNFTBVr+7KYKqJ8uEjlM+dJrR5K0L7eB+9hTd2CFrWYt33h0jH3O5Nj37TBGtgZUBkUN/6q4dQ7UmsnlW450//gU5PPRq460uQXAu+j//i99A/+UdUMoXqbMNkz2OnUkixlF4u9spe/HMTULyEaA7jXkoT2fEbQIXi838DJ4cRDXHkEjc2b0MPHdptZubGpBUbM0UfKQpBRDmKWRSD3tTMk87gddA2WGe4+dkzMD0CyQ5qP/4XVDCAvfkaLMvHamzEClpQzGDF46iuJOH1CaKr2tDZRfzhQ0Ru24NYsYrCM4/jDb+FiHdi3XU/0s3vr7WsGKxcfyPSy+bxi0UqJ8f/IriiE2vrnuWsLefQk8NoO4AMBBB9/XjDI6hQCjdTxq9WCaQ6ULaDFrIeKr3oIlv70Olz2K1xlAVaSUQojD786nKi9e5A3LBHMHn0W+LUUaS1FI9q+iZZWLhHdq/FxFbWSSfsIDIQwVw4g/GK2OuuhloNMzaCaF+DNBJtQfX8LFYigElX0OkQtZKHVy3jqwDlqWncCzPI3nU4t+2FWrH+OLHzHpRl3109memTOhqDi9NfkefHEKvWLTO+VKD68Qf4G27CueFWhJ/Df+0lVFcXJOJYnobm1ZjsJUxuFjyDjK/GNK2gND4ESuDPXcCOSaI7thPqX0ft8OtUn/oTKOQgkET39KJU4RbpZXOtNRW717p+FyRSdYT+v36H4u/fQXbfc3iRDkT3FsTGjWAWEU0OZKfAU9CyEdXVD2lQPduplmo4jkBEbMzK1VgDu5EVTe3gm1RHx6Bcxpz6YLkEO0lMYeFGi6z7eVMqhkT/ZrCb0LNT+NMTRH/nt/BLRdy3X8Nv68Lu6cZEHURjE6K3hirYeLRhDWyA4jxzH40RXJwkeuM29MpN+JcziEsz+Avz6GgcW1pYbUlEQCyHwYpSyxS7rGo+v8man4ZMATrAHf+QSt7FTkWR4QbsjlbIX8IMH0VuuAqj4piGAbhmEPPzI/injnNxMUPuwOtseOIxKKTJ7/8BTBxDdXcjO9sJdTeg01VqH4wg3CDB9bshHMKORbGolVOmeRW09dVdUxkbp3ruNM7GXnS1hK5OYSoSbBDZBcxCBtF3DcUzk6hkhGA0RmtHKx1rOkE04lbzWC1tqMRt1CZHUafPIs8H6/JsNTcgN+9YFq1qgbBUFUvnK9qrVghXCvWN8MBmivueJDtylqaeBKWJaXR4JZEtNyBWrkGt6AJboCZO4J49Rc64xGIhcgtZgm6egKhgtUQQto17WeHOLqCNj5Vowbr7q4j+Lcs1JhhEphcXLTebd0jPwpkx6Lwa++bbCR95ALecp5a6BrvrJoLdHajmMOTnKb3+BrVMntjARpzeFbz8jcfpa22gGm+kMJlm95Zu9M9+iI5G0G3d6EgIUSnjzs/gv/Icgd6rqcvz0IeYWnXc8pEtYnEe8gtXNL7xz74LehHSE3DqNP7EIdx3p5DSh7JNJePiBE/gN3Uz8NWHae5sRJYXqKQvU+raQPg7L6L3/QNMHcfp6EREGjC5LDp9GaOs5VQ/NQI93YctOxFPlwniDh/C3n47JHvrQPTBl3DHjiIDQUQ4jGhOYcqaQFuE0Nl53OnLRHfsZV33KsTxd6GlHeaP477zMl5uAWv7dkyLg6kZREsb+vgCcvPOuoaYuWNQWERs3jAuQ6nooXK6TH566cXnrjQK7uwFaoseWA3oJf2WEhEJUjm/gMgXCfdvQlFFv/R3uCND6FIRv7MfMnOIiaPoI/8NEb2kWAhfoLbdjLr2jmUv/8f+pVbkHRGNnZHum2/udxxtCn4j/vgEIjNTD4O9upfIprUYoxBKo9Z14jumTq7YYD9WayvuR++hs1lkshmha4iuNeDYiIAFMoCevIi+cJHaa29gmvsRTUn0R29g9u1D7bxxv+jrRnpD56cCkdjfV9NzpA+8A5VlLojWAczlGVTAYKXimIU8MlsjtKEXgiF0aRGdm8cEYnXm+O+/gdAGuWsP3shhTHoOEYqCCEF2DsrF5f+e/xiikUldrT6l3z+GevSaTahaZdRY6uFqxRXR1sRyzU/21Gu6OTOMfzmPd6kI8TgiX8B4imouj1QCKmVUNITJ59AnR1F77kH4ZaRnQFroMyeRW3egdt6DwIX391Gshv+4LK2jtcuLqK9t7ALjZXzH1uVM/mb/7BTRnjZEex+idQ2EAnjjR/BdF1PIoV2Bae/F/fh9dL5IYE0XUmpMNo+ev4AINSJWb0UPHa63Z7SvRN3/CHJpFHj2G4iZzAuBbTu+GWpIEGxrQ/3RnlvxG5M4kYa3Lc2u4uyFblnIE+xfAbF2RMtqZGsn/uTYUgHH+dz9eFMnqYx8gO+CEwkjhcDPF/DLHurSaeTm3RiWMsDHeuDrSFvBv3+bi08+N1Vwuj/vZWtu+dwclZlFrESoeZmZysJXoTsCjnVk8dDQBuN+n8RDD9fbcdG7leBX1iOkQjhBOHmQfKGAHW3CS6fR+QClmYuYMyPY265DtPVgtfctiw4V/GcfYfGNQzj3/u4DqlormUoZEQwuc0I//eSnY4G0wPJjmdGhw+mh0fWxNZ0037cXccPd1MXgk+GjNE/tR3+Le+YEyg5TnT6LXlwgcu1u7C99HZlsv3K2+vjvkTs2RvDe3747tm7Dy1SKvzSYPP/MLwxFAkIKEzEye2zswOXX395lJyK0fOFzRHfuglQfqPin59Nn0RNDuJk09vprkd0brmx5H7xCbfgQbrZ83OkfvN1pj0+ZmkBYNhjzCwCeffr/AsBDJyU6kqBwbPzRuTcP/GXV82lYlaJpfQ+BjVdhXX0tNKTAjvzKqKXPTeC++1NKY0c9kVz1SGzb9X8tjIdfzSFCDfUw/noA0scPuxBrwcvmmH3rQIvMm3/y0XdJS4JfIpiIUG9g+wcg6KDnZpGZNDQ0Ii5cSAtlPRHYct13axWvJNwadiiAli4iEP8VAJ89HQtR129TLiG1nos0Nt8dSOi12qi9lRq3utVqT/lirql24hW3vLBQi3d3XUqu73+PZOonBNR/WnbYSMeGTO5/Xf6ZtwDwPwtFRezQVs+sAAAAAElFTkSuQmCC
  8. // @grant GM_xmlhttpRequest
  9. // @grant GM_registerMenuCommand
  10. // @grant GM_unregisterMenuCommand
  11. // @grant GM_openInTab
  12. // @grant GM_getValue
  13. // @grant GM_setValue
  14. // @grant GM_notification
  15. // @grant unsafeWindow
  16. // @license GPL-3.0 License
  17. // @run-at document-end
  18. // @namespace https://github.com/XIU2/UserScript
  19. // @supportURL https://github.com/XIU2/UserScript
  20. // @homepageURL https://github.com/XIU2/UserScript
  21. // ==/UserScript==
  22.  
  23. (function() {
  24. 'use strict';
  25. var menuAll = [
  26. ['menu_disable', '✅ 已启用 (点击对当前网站禁用)', '❌ 已禁用 (点击对当前网站启用)', []],
  27. ['menu_discuz_thread_page', '帖子内自动翻页 (仅论坛)', '帖子内自动翻页 (仅论坛)', true],
  28. ['menu_page_number', '显示当前页码及点击暂停翻页', '显示当前页码及点击暂停翻页', true],
  29. ['menu_pause_page', '左键双击网页空白处暂停翻页', '左键双击网页空白处暂停翻页', false]
  30. ], menuId = [], webType = 0, curSite = {SiteTypeID: 0}, DBSite, SiteType, pausePage = true, pageNum = {now: 1, _now: 1}, locationchange = false, nowLocation = '', forumWebsite = ['cs.rin.ru', 'www.flyert.com', 'bbs.pediy.com', 'www.libaclub.com'];
  31. for (let i=0;i<menuAll.length;i++){ // 如果读取到的值为 null 就写入默认值
  32. if (GM_getValue(menuAll[i][0]) == null){GM_setValue(menuAll[i][0], menuAll[i][3])};
  33. }
  34. registerMenuCommand();
  35. if (menuId.length < 2) {return}
  36. // 注册脚本菜单
  37. function registerMenuCommand() {
  38. if (menuId.length != []){
  39. for (let i=0;i<menuId.length;i++){
  40. GM_unregisterMenuCommand(menuId[i]);
  41. }
  42. }
  43. for (let i=0;i<menuAll.length;i++) { // 循环注册脚本菜单
  44. menuAll[i][3] = GM_getValue(menuAll[i][0]);
  45. if (menuAll[i][0] === 'menu_disable') { // 启用/禁用
  46.  
  47. if (menu_disable('check')) { // 当前网站在禁用列表中
  48. menuId[i] = GM_registerMenuCommand(`${menuAll[i][2]}`, function(){menu_disable('del')});
  49. return
  50. } else { // // 不在禁用列表中
  51. webType = doesItSupport(); // 判断网站类型(即是否支持),顺便直接赋值
  52. if (webType === 0) {
  53. 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});});
  54. console.info('[自动无缝翻页] - 不支持当前网站 [ ' + location.href + ' ],欢迎申请支持: https://github.com/XIU2/UserScript / https://greasyfork.org/zh-CN/scripts/96880/feedback');
  55. return
  56. } else if (webType === -1) {
  57. return
  58. }
  59. menuId[i] = GM_registerMenuCommand(`${menuAll[i][1]}`, function(){menu_disable('add')});
  60. }
  61.  
  62. } else if (menuAll[i][0] === 'menu_discuz_thread_page') { // 帖子内自动翻页 (仅论坛)
  63.  
  64. if (webType === 2 || forumWebsite.indexOf(location.host) > -1) {
  65. menuId[i] = GM_registerMenuCommand(`${menuAll[i][3]?'✅':'❌'} ${menuAll[i][1]}`, function(){menu_switch(menuAll[i][3], menuAll[i][0], menuAll[i][2])});
  66. }
  67.  
  68. } else {
  69. menuId[i] = GM_registerMenuCommand(`${menuAll[i][3]?'✅':'❌'} ${menuAll[i][1]}`, function(){menu_switch(menuAll[i][3], menuAll[i][0], menuAll[i][2])});
  70. }
  71. }
  72. menuId[menuId.length] = 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});});
  73. }
  74.  
  75. // 网站规则
  76. function setDBSite() {
  77. /*
  78. 自动翻页规则
  79. locationchange: 对于使用 pjax 技术的网站,需要监听 URL 变化来重新判断翻页规则
  80. insStyle: 要插入网页的 CSS Style 样式
  81. type:
  82. 1 = 由脚本实现自动无缝翻页
  83. 2 = 网站自带了自动无缝翻页功能,只需要点击下一页按钮即可
  84. nextText: 按钮文本,当按钮文本 = 该文本时,才会点击按钮加载下一页(避免一瞬间加载太多次下一页)
  85. nextTextOf: 按钮文本的一部分,当按钮文本包含该文本时,才会点击按钮加载下一页(避免一瞬间加载太多次下一页)
  86. nextHTML: 按钮内元素,当按钮内元素 = 该元素内容时,才会点击按钮加载下一页(避免一瞬间加载太多次下一页)
  87. intervals: 点击间隔时间,对于没有按钮文字变化的按钮,可以手动指定间隔时间,单位:ms
  88. 3 = 依靠元素距离可视区域底部的距离来触发翻页
  89. 4 = 部分简单的动态加载类网站(暂时)
  90. insertPosition:
  91. 1 = 插入该元素本身的前面;
  92. 2 = 插入该元素当中,第一个子元素前面;
  93. 3 = 插入该元素当中,最后一个子元素后面;
  94. 4 = 插入该元素本身的后面;
  95. 5 = 插入该元素末尾(针对文本)
  96. mimeType: 网站编码
  97. scriptType: 单独插入 <script> 标签
  98. 1 = 下一页的所有 <script> 标签
  99. 2 = 下一页主体元素同级 <script> 标签
  100. 3 = 下一页主体元素同级 <script> 标签(远程文件)
  101. 4 = 下一页主体元素子元素 <script> 标签
  102. history: 添加历史记录 并 修改当前 URL
  103. forceHTTPS: 下一页链接强制 HTTPS
  104. scrollDelta:数值越大,滚动条触发点越靠上(越早开始翻页),一般是访问网页速度越慢,该值就需要越大(如果 Type = 3,则相反)
  105. function:
  106. before = 插入前执行函数;
  107. after = 插入后执行函数;
  108. parameter = 参数
  109. */
  110. DBSite = {
  111. discuz_forum: {
  112. SiteTypeID: 0,
  113. pager: {
  114. type: 2,
  115. nextLink: '#autopbn',
  116. nextTextOf: '下一页',
  117. scrollDelta: 1500
  118. }
  119. }, // Discuz! - 各版块帖子列表(自带无缝加载下一页按钮的)
  120. discuz_guide: {
  121. SiteTypeID: 0,
  122. pager: {
  123. type: 1,
  124. nextLink: '//a[contains(@class, "nxt") or contains(@class, "next")][@href][not(contains(@href, "javascript"))]',
  125. pageElement: 'css;#threadlist table > tbody[id^="normalthread_"]',
  126. insertPosition: ['id("threadlist")//table/tbody[starts-with(@id, "normalthread_")]/parent::table', 3],
  127. replaceE: 'css;.pg, .pages',
  128. scrollDelta: 1000
  129. }
  130. }, // Discuz! - 导读页 及 各版块帖子列表(不带无缝加载下一页按钮的)
  131. discuz_waterfall: {
  132. SiteTypeID: 0,
  133. pager: {
  134. type: 1,
  135. nextLink: '//a[contains(@class, "nxt") or contains(@class, "next")][@href][not(contains(@href, "javascript"))]',
  136. pageElement: 'css;#waterfall > li',
  137. insertPosition: ['css;#waterfall', 3],
  138. replaceE: 'css;.pg, .pages',
  139. scrollDelta: 1000
  140. }
  141. }, // Discuz! - 图片模式的各版块帖子列表(不带无缝加载下一页按钮的)
  142. discuz_thread: {
  143. SiteTypeID: 0,
  144. insStyle: '.pgbtn {display: none;}',
  145. pager: {
  146. type: 1,
  147. nextLink: '//a[contains(@class, "nxt") or contains(@class, "next")][@href][not(contains(@href, "javascript"))]',
  148. pageElement: 'css;#postlist > div[id^="post_"]',
  149. insertPosition: ['css;#postlist', 3],
  150. replaceE: 'css;.pg, .pages',
  151. scrollDelta: 1000
  152. },
  153. function: {
  154. before: src_functionBefore,
  155. parameter: [0, 'img[file]', 'file']
  156. }
  157. }, // Discuz! - 帖子内
  158. discuz_search: {
  159. SiteTypeID: 0,
  160. pager: {
  161. type: 1,
  162. nextLink: '//a[contains(@class, "nxt") or contains(@class, "next")][@href][not(contains(@href, "javascript"))]',
  163. pageElement: 'css;#threadlist > ul',
  164. insertPosition: ['css;#threadlist', 3],
  165. replaceE: 'css;.pg, .pages',
  166. scrollDelta: 1000
  167. }
  168. }, // Discuz! - 搜索页
  169. discuz_youspace: {
  170. SiteTypeID: 0,
  171. pager: {
  172. type: 1,
  173. nextLink: '//a[contains(@class, "nxt") or contains(@class, "next")][@href][not(contains(@href, "javascript"))]',
  174. pageElement: 'css;tbody > tr:not(.th)',
  175. insertPosition: ['css;tbody', 3],
  176. replaceE: 'css;.pg, .pages',
  177. scrollDelta: 1000
  178. }
  179. }, // Discuz! - 回复页、主题页(别人的)
  180. discuz_collection: {
  181. SiteTypeID: 0,
  182. pager: {
  183. type: 1,
  184. nextLink: '//a[contains(@class, "nxt") or contains(@class, "next")][@href][not(contains(@href, "javascript"))]',
  185. pageElement: 'css;#ct .bm_c table > tbody',
  186. insertPosition: ['css;#ct .bm_c table', 3],
  187. replaceE: 'css;.pg, .pages',
  188. scrollDelta: 1000
  189. }
  190. }, // Discuz! - 淘帖页
  191. flarum: {
  192. SiteTypeID: 0,
  193. functionStart: function() {locationchange = true;if (location.pathname.indexOf('/d/') === -1) {curSite = DBSite.flarum;}},
  194. pager: {
  195. type: 2,
  196. nextLink: '.DiscussionList-loadMore > button[title]',
  197. intervals: 500,
  198. scrollDelta: 1000
  199. }
  200. }, // Flarum
  201. dux: {
  202. SiteTypeID: 0,
  203. pager: {
  204. type: 1,
  205. nextLink: '//li[@class="next-page"]/a[@href]',
  206. pageElement: 'css;.content > article',
  207. insertPosition: ['css;.content > .pagination', 1],
  208. replaceE: 'css;.content > .pagination',
  209. scrollDelta: 1500
  210. },
  211. function: {
  212. before: src_functionBefore,
  213. parameter: [0, 'img.thumb[data-src]', 'data-src']
  214. }
  215. }, // WordPress 主题
  216. baidu: {
  217. SiteTypeID: 0,
  218. host: 'www.baidu.com',
  219. insStyle: '.new-pmd .c-img-border {position: initial !important;} .op-bk-polysemy-video__wrap.c-gap-bottom {display: none !important;}',
  220. pager: {
  221. type: 1,
  222. nextLink: 'id("page")//a[contains(text(),"下一页")][@href]',
  223. pageElement: 'css;#content_left > *',
  224. insertPosition: ['css;#content_left', 3],
  225. replaceE: 'css;#page',
  226. scrollDelta: 1200
  227. }
  228. }, // 百度 搜素
  229. google: {
  230. SiteTypeID: 0,
  231. host: /.google./,
  232. functionStart: function() {if (location.pathname === '/search') {
  233. curSite = DBSite.google;
  234. } else if (location.pathname === '/scholar') {
  235. curSite = DBSite.google_scholar;
  236. }},
  237. pager: {
  238. type: 1,
  239. nextLink: 'id("pnnext")[@href]',
  240. pageElement: 'css;#res > *',
  241. insertPosition: ['css;#res', 3],
  242. replaceE: 'id("navcnt") | id("rcnt")//div[@role="navigation"]',
  243. scriptType: 1,
  244. scrollDelta: 3000
  245. }
  246. }, // 谷歌 搜索
  247. bing: {
  248. SiteTypeID: 0,
  249. host: ['www.bing.com','cn.bing.com'],
  250. functionStart: function() {if (location.pathname === '/search') {
  251. curSite = DBSite.bing;
  252. } else if (location.pathname === '/academic/search') {
  253. curSite = DBSite.bing_academic;
  254. }},
  255. insStyle: '.b_imagePair.square_mp > .inner {display: none !important;}',
  256. pager: {
  257. type: 1,
  258. nextLink: '//a[contains(@class,"sb_pagN")][@href]',
  259. pageElement: 'css;#b_results > li:not(.b_msg):not(.b_pag):not(#mfa_root)',
  260. insertPosition: ['css;#b_results > .b_pag', 1],
  261. replaceE: 'css;#b_results > .b_pag',
  262. scrollDelta: 1500
  263. }
  264. }, // 必应 搜索
  265. sogou: {
  266. SiteTypeID: 0,
  267. host: 'www.sogou.com',
  268. functionStart: function() {if (location.pathname != '/') {curSite = DBSite.sogou;}},
  269. pager: {
  270. type: 1,
  271. nextLink: 'css;#sogou_next',
  272. pageElement: 'css;.results > *',
  273. insertPosition: ['css;.results', 3],
  274. replaceE: 'css;#pagebar_container',
  275. scriptType: 4,
  276. scrollDelta: 1200
  277. }
  278. }, // 搜狗 搜索
  279. sogou_weixin: {
  280. SiteTypeID: 0,
  281. host: 'weixin.sogou.com',
  282. functionStart: function() {if (location.pathname === '/') {
  283. curSite = DBSite.sogou_weixin;
  284. } else if (location.pathname === '/weixin') {
  285. curSite = DBSite.sogou_weixin_search;
  286. }},
  287. pager: {
  288. type: 2,
  289. nextLink: '#look-more',
  290. intervals: 1000,
  291. scrollDelta: 1000
  292. }
  293. }, // 搜狗微信 - 首页
  294. sogou_weixin_search: {
  295. SiteTypeID: 0,
  296. pager: {
  297. type: 1,
  298. nextLink: 'css;#sogou_next',
  299. pageElement: 'css;.news-box > ul[class*="news-list"] > li',
  300. insertPosition: ['css;.news-box > ul[class*="news-list"]', 3],
  301. replaceE: 'css;#pagebar_container',
  302. scrollDelta: 1000
  303. }
  304. }, // 搜狗微信 - 搜索
  305. toutiao: {
  306. SiteTypeID: 0,
  307. host: ['www.toutiao.com', 'so.toutiao.com'],
  308. functionStart: function() {if (location.hostname != 'www.toutiao.com') {if (location.pathname === '/search') {curSite = DBSite.toutiao;}}},
  309. pager: {
  310. type: 1,
  311. nextLink: '//div[contains(@class, "-pagination")]/a[contains(string(), "下一页")]',
  312. pageElement: 'css;div[class*="-result-list"] > .result-content[data-i]',
  313. insertPosition: ['css;div[class*="-result-list"] > .result-content:not([data-i]):last-child', 1],
  314. replaceE: 'css;div[class*="-pagination"]',
  315. scrollDelta: 1200
  316. },
  317. function: {
  318. before: toutiao_functionBefore
  319. }
  320. }, // 头条 搜索
  321. so: {
  322. SiteTypeID: 0,
  323. host: 'www.so.com',
  324. functionStart: function() {if (location.pathname != '/') {curSite = DBSite.so; insStyle('img {opacity: 1 !important;}')}},
  325. pager: {
  326. type: 1,
  327. nextLink: 'css;#snext[href]',
  328. pageElement: 'css;ul.result > li, style:not(src)',
  329. insertPosition: ['css;ul.result', 3],
  330. replaceE: 'css;#page',
  331. scrollDelta: 1200
  332. },
  333. function: {
  334. before: src_functionBefore,
  335. parameter: [0, 'img[data-isrc]', 'data-isrc']
  336. }
  337. }, // 360 搜索
  338. duckduckgo: {
  339. SiteTypeID: 0,
  340. host: 'duckduckgo.com',
  341. functionStart: function() {
  342. if (getCookie('av') != '1') {
  343. document.cookie='av=1; expires=Thu, 18 Dec 2031 12:00:00 GMT; path=/'; // 写入 Cookie 强制开启自带的无缝翻页功能
  344. location.reload(); // 刷新网页
  345. }
  346. },
  347. }, // DuckDuckGo 搜索
  348. startpage: {
  349. SiteTypeID: 0,
  350. host: 'www.startpage.com',
  351. functionStart: function() {if (location.pathname.indexOf('/search') > -1) {curSite = DBSite.startpage;}},
  352. pager: {
  353. type: 1,
  354. nextLink: startpage_functionNext,
  355. pageElement: 'css;section.w-gl--desktop > div',
  356. insertPosition: ['css;section.w-gl--desktop', 3],
  357. replaceE: 'css;.pagination',
  358. scrollDelta: 1500
  359. }
  360. }, // Startpage 搜索
  361. yandex: {
  362. SiteTypeID: 0,
  363. host: 'yandex.com',
  364. functionStart: function() {if (location.pathname === '/search/') {curSite = DBSite.yandex;}},
  365. pager: {
  366. type: 1,
  367. nextLink: 'css;a.pager__item_kind_next',
  368. pageElement: 'css;#search-result > *, style',
  369. insertPosition: ['css;#search-result', 3],
  370. replaceE: 'css;.pager',
  371. scrollDelta: 1500
  372. }
  373. }, // Yandex 搜索
  374. yahoo: {
  375. SiteTypeID: 0,
  376. host: 'search.yahoo.com',
  377. functionStart: function() {if (location.pathname.indexOf('/search') > -1) {curSite = DBSite.yahoo;}},
  378. pager: {
  379. type: 1,
  380. nextLink: 'css;.pagination a.next[href]',
  381. pageElement: 'css;#web ol > li',
  382. insertPosition: ['css;#web ol', 3],
  383. replaceE: 'css;.pagination',
  384. scrollDelta: 1500
  385. }
  386. }, // Yahoo 搜索
  387. yahoo_jp: {
  388. SiteTypeID: 0,
  389. host: 'search.yahoo.co.jp',
  390. functionStart: function() {if (location.pathname.indexOf('/search') > -1) {curSite = DBSite.yahoo_jp;}},
  391. pager: {
  392. type: 1,
  393. nextLink: 'css;.Pagenation__next > a[href]',
  394. pageElement: 'css;.Contents__innerGroupBody > div',
  395. insertPosition: ['css;.Contents__innerGroupBody', 3],
  396. replaceE: 'css;.Pagenation',
  397. scrollDelta: 1500
  398. }
  399. }, // Yahoo 搜索 (JP)
  400. qwant: {
  401. SiteTypeID: 0,
  402. host: 'www.qwant.com',
  403. functionStart: function() {locationchange = true; if (location.search.indexOf('q=') > -1 && location.search.indexOf('t=web') > -1) {curSite = DBSite.qwant;}},
  404. pager: {
  405. type: 2,
  406. nextLink: 'button[data-testid="buttonShowMore"]',
  407. intervals: 500,
  408. scrollDelta: 1500
  409. }
  410. }, // Qwant 搜索
  411. ecosia: {
  412. SiteTypeID: 0,
  413. host: 'www.ecosia.org',
  414. functionStart: function() {if (location.pathname === '/search') {curSite = DBSite.ecosia;}},
  415. pager: {
  416. type: 1,
  417. nextLink: 'css;nav.pagination a[href][aria-label="Next page"]',
  418. pageElement: 'css;section.mainline > div:not(.related-queries)',
  419. insertPosition: ['css;nav.pagination', 1],
  420. replaceE: 'css;nav.pagination',
  421. scrollDelta: 1500
  422. }
  423. }, // Ecosia 搜索
  424. magi: {
  425. SiteTypeID: 0,
  426. host: 'magi.com',
  427. functionStart: function() {if (location.pathname === '/search') {curSite = DBSite.magi;}},
  428. pager: {
  429. type: 2,
  430. nextLink: '.card[data-type="next"]',
  431. nextText: '加载更多',
  432. scrollDelta: 1500
  433. }
  434. }, // Magi 搜索
  435. baidu_tieba: {
  436. SiteTypeID: 0,
  437. host: 'tieba.baidu.com',
  438. functionStart: function() {if (location.pathname === '/f') {
  439. baidu_tieba_1(); // 右侧悬浮发帖按钮点击事件(解决自动翻页导致无法发帖的问题)
  440. curSite = DBSite.baidu_tieba;
  441. //} else if (location.pathname.indexOf('/p/') > -1) {
  442. //curSite = DBSite.baidu_tieba_post;
  443. } else if (location.pathname === '/f/search/res') {
  444. curSite = DBSite.baidu_tieba_search;
  445. }},
  446. insStyle: 'img.j_retract {margin-top: 0 !important;margin-bottom: 0 !important;}', // 修复帖子列表中预览图片,在切换下一个/上一个图片时,多出来的图片上下边距
  447. pager: {
  448. type: 4,
  449. nextLink: baidu_tieba_functionNext,
  450. pageElement: 'css;#thread_list > li',
  451. insertPosition: ['css;#thread_list', 3],
  452. insertElement: baidu_tieba_insertElement,
  453. replaceE: 'css;#frs_list_pager',
  454. intervals: 3000,
  455. scrollDelta: 2000
  456. },
  457. function: {
  458. before: baidu_tieba_functionBefore
  459. }
  460. }, // 百度贴吧 - 帖子列表
  461. baidu_tieba_post: {
  462. SiteTypeID: 0,
  463. pager: {
  464. type: 1,
  465. nextLink: '//li[contains(@class,"pb_list_pager")]/a[contains(text(),"下一页")][@href]',
  466. pageElement: 'css;#j_p_postlist > div',
  467. insertPosition: ['css;#j_p_postlist', 3],
  468. replaceE: 'css;li.pb_list_pager',
  469. scrollDelta: 1000
  470. }
  471. }, // 百度贴吧 - 帖子内
  472. baidu_tieba_search: {
  473. SiteTypeID: 0,
  474. pager: {
  475. type: 1,
  476. nextLink: '//a[@class="next"][@href]',
  477. pageElement: 'css;#j_p_postlist > *',
  478. insertPosition: ['css;#j_p_postlist', 3],
  479. replaceE: 'css;.pager.pager-search',
  480. scriptType: 1,
  481. scrollDelta: 1000
  482. }
  483. }, // 百度贴吧 - 搜索页
  484. douban_subject_comments: {
  485. SiteTypeID: 0,
  486. host: 'movie.douban.com',
  487. functionStart: function() {if (location.pathname.indexOf('/subject') > -1 && location.pathname.indexOf('/comments') > -1) { // 短评列表
  488. curSite = DBSite.douban_subject_comments;
  489. } else if (location.pathname.indexOf('/subject') > -1 && location.pathname.indexOf('/reviews') > -1) { // 影评列表
  490. curSite = DBSite.douban_subject_reviews;
  491. } else if(location.pathname.indexOf('/subject') > -1 && location.pathname.indexOf('/episode') > -1) { // 电视剧每集评论
  492. curSite = DBSite.douban_subject_episode;
  493. }},
  494. pager: {
  495. type: 1,
  496. nextLink: '//a[@class="next"][@href]',
  497. pageElement: 'css;#comments > .comment-item',
  498. insertPosition: ['css;#paginator', 1],
  499. replaceE: 'css;#paginator',
  500. scrollDelta: 1000
  501. }
  502. }, // 豆瓣 - 短评
  503. douban_subject_reviews: {
  504. SiteTypeID: 0,
  505. pager: {
  506. type: 1,
  507. nextLink: '//link[@rel="next"][@href]',
  508. pageElement: 'css;.review-list > div',
  509. insertPosition: ['css;.review-list', 3],
  510. replaceE: 'css;.paginator',
  511. scrollDelta: 1000
  512. }
  513. }, // 豆瓣 - 影评
  514. douban_subject_episode: {
  515. SiteTypeID: 0,
  516. pager: {
  517. type: 1,
  518. nextLink: '//link[@rel="next"][@href]',
  519. pageElement: 'css;#comments > div',
  520. insertPosition: ['css;#comments', 3],
  521. replaceE: 'css;.paginator',
  522. scrollDelta: 1000
  523. }
  524. }, // 豆瓣 - 剧评
  525. douban_group: {
  526. SiteTypeID: 0,
  527. host: 'www.douban.com',
  528. functionStart: function() {if (location.pathname.indexOf('/group/topic/') > -1) {
  529. curSite = DBSite.douban_group_topic;
  530. } else if (location.pathname.indexOf('/group/explore') > -1) {
  531. curSite = DBSite.douban_group_explore;
  532. } else if (location.pathname.indexOf('/group/') > -1 && location.pathname.indexOf('/discussion') > -1) {
  533. curSite = DBSite.douban_group;
  534. }},
  535. pager: {
  536. type: 1,
  537. nextLink: 'css;span.next > a',
  538. pageElement: 'css;table.olt > tbody > tr:not(.th)',
  539. insertPosition: ['css;table.olt > tbody', 3],
  540. replaceE: 'css;.paginator',
  541. scrollDelta: 1000
  542. }
  543. }, // 豆瓣 - 小组
  544. douban_group_explore: {
  545. SiteTypeID: 0,
  546. pager: {
  547. type: 1,
  548. nextLink: 'css;span.next > a',
  549. pageElement: 'css;#content .article > div > .channel-item',
  550. insertPosition: ['css;#content .article > div', 3],
  551. replaceE: 'css;.paginator',
  552. scrollDelta: 1000
  553. }
  554. }, // 豆瓣 - 小组讨论精选
  555. douban_group_topic: {
  556. SiteTypeID: 0,
  557. pager: {
  558. type: 1,
  559. nextLink: 'css;span.next > a',
  560. pageElement: 'css;#comments > li',
  561. insertPosition: ['css;#comments', 3],
  562. replaceE: 'css;.paginator',
  563. scrollDelta: 1000
  564. }
  565. }, // 豆瓣 - 小组帖子内
  566. weibo_comment: {
  567. SiteTypeID: 0,
  568. host: 'weibo.com',
  569. pager: {
  570. type: 2,
  571. nextLink: 'a[action-type="click_more_comment"]',
  572. nextText: '查看更多c',
  573. scrollDelta: 1000
  574. }
  575. }, // 微博评论
  576. tianya: {
  577. SiteTypeID: 0,
  578. host: 'bbs.tianya.cn',
  579. functionStart: function() {if (location.pathname.indexOf('/list') > -1) {
  580. curSite = DBSite.tianya;
  581. } else if (location.pathname.indexOf('/post') > -1) {
  582. curSite = DBSite.tianya_post;
  583. }},
  584. pager: {
  585. type: 1,
  586. nextLink: '//div[contains(@class, "pages")]/div[@class="links"]/a[contains(text(), "下一页")]',
  587. pageElement: 'css;.tab-bbs-list > tbody:not(:first-of-type)',
  588. insertPosition: ['css;table.tab-bbs-list', 3],
  589. replaceE: '//div[contains(@class, "pages")]',
  590. scrollDelta: 1500
  591. }
  592. }, // 天涯社区
  593. tianya_post: {
  594. SiteTypeID: 0,
  595. pager: {
  596. type: 1,
  597. nextLink: 'a.js-keyboard-next[href]',
  598. pageElement: 'css;.atl-main > div[class="atl-item"]',
  599. insertPosition: ['css;.atl-main', 3],
  600. replaceE: 'css;.atl-pages > form',
  601. scrollDelta: 1500
  602. }
  603. }, // 天涯社区 - 帖子内
  604. nga_thread: {
  605. SiteTypeID: 0,
  606. host: ['bbs.nga.cn', 'ngabbs.com', 'nga.178.com', 'g.nga.cn'],
  607. iframe: true,
  608. functionStart: function() {locationchange = true;
  609. if (location.pathname === '/thread.php') { // 帖子列表
  610. curSite = DBSite.nga_thread;
  611. } else if (location.pathname === '/read.php') { // 帖子内
  612. curSite = DBSite.nga_read;
  613. }},
  614. pager: {
  615. type: 1,
  616. nextLink: 'css;#pagebbtm a[title="下一页"][href]',
  617. pageElement: 'css;#topicrows > tbody, #topicrows > script',
  618. insertPosition: ['css;#topicrows', 3],
  619. replaceE: 'css;div[name="pageball"]',
  620. scriptType: 2,
  621. scrollDelta: 1000
  622. },
  623. function: {
  624. after: nga_thread_functionAfter
  625. }
  626. }, // NGA - 各版块帖子列表
  627. nga_read: {
  628. SiteTypeID: 0,
  629. pager: {
  630. type: 1,
  631. nextLink: 'css;#pagebbtm a[title*="下一页"][href]',
  632. pageElement: 'id("m_posts_c")/table | id("m_posts_c")/script | //script[contains(text(), "commonui.userInfo.setAll")]',
  633. insertPosition: ['css;#m_posts_c', 3],
  634. replaceE: 'css;div[name="pageball"]',
  635. scriptType: 2,
  636. scrollDelta: 1000
  637. }
  638. }, // NGA - 帖子内
  639. v2ex_recent: {
  640. SiteTypeID: 0,
  641. host: ['v2ex.com', 'www.v2ex.com'],
  642. functionStart: function() {if (location.pathname === '/') { // 首页
  643. v2ex_functionAfter('#Main a.topic-link:not([target])');
  644. } else if (location.pathname === '/recent') { // 最近主题页
  645. curSite = DBSite.v2ex_recent;
  646. v2ex_functionAfter('#Main a.topic-link:not([target])');
  647. } else if (location.pathname === '/notifications') { // 提醒消息页
  648. curSite = DBSite.v2ex_notifications;
  649. v2ex_functionAfter('#Main a[href^="/t/"]:not([target])');
  650. } else if (location.pathname === '/balance') { // 账户余额页
  651. curSite = DBSite.v2ex_balance;
  652. } else if (location.pathname.indexOf('/go/') > -1) { // 分类主题页
  653. curSite = DBSite.v2ex_go;
  654. v2ex_functionAfter('#Main a.topic-link:not([target])');
  655. } else if (location.pathname.indexOf('/replies') > -1) { // 用户回复页
  656. curSite = DBSite.v2ex_replies;
  657. v2ex_functionAfter('#Main a[href^="/t/"]:not([target])');
  658. }},
  659. pager: {
  660. type: 1,
  661. nextLink: '//a[@class="page_current"]/following-sibling::a[1][@href]',
  662. pageElement: 'css;.cell.item',
  663. insertPosition: ['//div[@id="Main"]//div[@class="box"]//div[@class="cell"][last()]', 1],
  664. replaceE: 'css;#Main > .box > .cell[style]:not(.item) > table',
  665. scrollDelta: 1500
  666. },
  667. function: {
  668. after: v2ex_functionAfter,
  669. parameter: '#Main a.topic-link:not([target])'
  670. }
  671. }, // V2EX - 最近主题页
  672. v2ex_notifications: {
  673. SiteTypeID: 0,
  674. pager: {
  675. type: 1,
  676. nextLink: '//a[@class="page_current"]/following-sibling::a[1][@href]',
  677. pageElement: 'css;#notifications > div',
  678. insertPosition: ['css;#notifications', 3],
  679. replaceE: 'css;#Main > .box > .cell[style] > table',
  680. scrollDelta: 1500
  681. },
  682. function: {
  683. after: v2ex_functionAfter,
  684. parameter: '#Main a[href^="/t/"]:not([target])'
  685. }
  686. }, // V2EX - 提醒消息页
  687. v2ex_replies: {
  688. SiteTypeID: 0,
  689. pager: {
  690. type: 1,
  691. nextLink: '//a[@class="page_current"]/following-sibling::a[1][@href]',
  692. pageElement: '//div[@id="Main"]//div[@class="box"]//div[@class="dock_area"] | //*[@id="Main"]//div[@class="box"]//div[@class="inner"] | //*[@id="Main"]//div[@class="box"]//div[@class="dock_area"][last()]/following-sibling::div[@class="cell"][1]',
  693. insertPosition: ['//div[@id="Main"]//div[@class="box"]//div[@class="cell"][last()]', 1],
  694. replaceE: 'css;#Main > .box > .cell[style] > table',
  695. scrollDelta: 1500
  696. },
  697. function: {
  698. after: v2ex_functionAfter,
  699. parameter: '#Main a[href^="/t/"]:not([target])'
  700. }
  701. }, // V2EX - 用户回复页
  702. v2ex_go: {
  703. SiteTypeID: 0,
  704. pager: {
  705. type: 1,
  706. nextLink: '//a[@class="page_current"]/following-sibling::a[1][@href]',
  707. pageElement: 'css;#TopicsNode > div',
  708. insertPosition: ['css;#TopicsNode', 3],
  709. replaceE: 'css;#Main > .box > .cell[style] > table',
  710. scrollDelta: 1500
  711. },
  712. function: {
  713. after: v2ex_functionAfter,
  714. parameter: '#Main a.topic-link:not([target])'
  715. }
  716. }, // V2EX - 分类主题页
  717. v2ex_balance: {
  718. SiteTypeID: 0,
  719. pager: {
  720. type: 1,
  721. nextLink: '//a[@class="page_current"]/following-sibling::a[1][@href]',
  722. pageElement: 'css;#Main .box > div:not(.cell) > table > tbody > tr:not(:first-child)',
  723. insertPosition: ['css;#Main .box > div:not(.cell) > table > tbody', 3],
  724. replaceE: 'css;#Main > .box > .cell[style] > table',
  725. scrollDelta: 1000
  726. }
  727. }, // V2EX - 账户余额页
  728. jandan: {
  729. SiteTypeID: 0,
  730. host: 'jandan.net',
  731. functionStart: function() {if (location.pathname === '/' || location.pathname.indexOf('/page/') > -1) {
  732. curSite = DBSite.jandan;
  733. } else if (location.pathname === '/dzh') {
  734. curSite = DBSite.jandan_dzh;
  735. } else {
  736. curSite = DBSite.jandan_comment;
  737. }},
  738. pager: {
  739. type: 1,
  740. nextLink: '//div[@class="wp-pagenavi"]/a[contains(text(), "下一页") or contains(text(), "更多文章")]',
  741. pageElement: 'css;#content > .list-post',
  742. insertPosition: ['css;.wp-pagenavi', 1],
  743. replaceE: 'css;.wp-pagenavi, #nav_prev',
  744. scrollDelta: 1500
  745. },
  746. function: {
  747. before: src_functionBefore,
  748. parameter: [0, 'img[data-original]', 'data-original']
  749. }
  750. }, // 煎蛋网
  751. jandan_comment: {
  752. SiteTypeID: 0,
  753. pager: {
  754. type: 1,
  755. nextLink: 'css;a.previous-comment-page',
  756. pageElement: 'css;ol.commentlist > li[id^="comment-"], script[src^="//cdn.jandan.net/static/min/"]',
  757. insertPosition: ['css;ol.commentlist', 3],
  758. replaceE: 'css;.cp-pagenavi, #nav_prev',
  759. scriptType: 3,
  760. scrollDelta: 1500
  761. }
  762. }, // 煎蛋网
  763. jandan_dzh: {
  764. SiteTypeID: 0,
  765. pager: {
  766. type: 2,
  767. nextLink: '.show_more',
  768. intervals: 1500,
  769. scrollDelta: 1500
  770. }
  771. }, // 煎蛋网 - 大杂烩
  772. qiushibaike: {
  773. SiteTypeID: 0,
  774. host: 'www.qiushibaike.com',
  775. functionStart: function() {insStyle('.qrcode-wrap, .qrcode-wrap-img, .index-side-left-AD1 {display: none !important;}');
  776. if (location.pathname === '/') {
  777. curSite = DBSite.qiushibaike;
  778. } else if (location.pathname.indexOf('/article/') === -1) {
  779. curSite = DBSite.qiushibaike_;
  780. }},
  781. pager: {
  782. type: 1,
  783. nextLink: '//ul[@class="pagination"]//a[./span[@class="next"]]',
  784. pageElement: 'css;.recommend-article > ul > li',
  785. insertPosition: ['css;.recommend-article > ul', 3],
  786. replaceE: 'css;ul.pagination',
  787. scrollDelta: 1500
  788. }
  789. }, // 糗事百科
  790. qiushibaike_: {
  791. SiteTypeID: 0,
  792. pager: {
  793. type: 1,
  794. nextLink: '//ul[@class="pagination"]//a[./span[@class="next"]]',
  795. pageElement: 'css;[id^="qiushi_tag_"]',
  796. insertPosition: ['css;ul.pagination', 1],
  797. replaceE: 'css;ul.pagination',
  798. scrollDelta: 1500
  799. }
  800. }, // 糗事百科 - 分类页
  801. lkong: {
  802. SiteTypeID: 0,
  803. host: 'www.lkong.com',
  804. functionStart: function() {if (location.pathname.indexOf('/forum/') > -1) {
  805. curSite = DBSite.lkong;
  806. } else if (location.pathname.indexOf('/thread/') > -1) {
  807. curSite = DBSite.lkong_thread;
  808. }},
  809. pager: {
  810. type: 1,
  811. nextLink: lkong_functionNext,
  812. pageElement: '//div[@class="main-title"]/parent::div/parent::div | //head/style[@data-emotion-css]',
  813. insertPosition: ['//div[@class="main-title"][1]/parent::div/parent::div/parent::div', 3],
  814. replaceE: 'css;ul.ant-pagination',
  815. intervals: 500,
  816. scrollDelta: 1200
  817. }
  818. }, // 龙的天空 - 各版块帖子列表
  819. lkong_thread: {
  820. SiteTypeID: 0,
  821. pager: {
  822. type: 1,
  823. nextLink: lkong_functionNext,
  824. pageElement: '//div[@class="main-content"]/parent::div | //head/style[@data-emotion-css]',
  825. insertPosition: ['//div[@class="main-content"][1]/parent::div/parent::div', 3],
  826. replaceE: 'css;ul.ant-pagination',
  827. intervals: 500,
  828. scrollDelta: 1200
  829. }
  830. }, // 龙的天空 - 帖子内
  831. pediy_forum: {
  832. SiteTypeID: 0,
  833. host: 'bbs.pediy.com',
  834. functionStart: function() {if (location.pathname.indexOf('/forum-') > -1) {
  835. curSite = DBSite.pediy_forum;
  836. } else if (location.pathname.indexOf('/thread-') > -1) {
  837. if (GM_getValue('menu_discuz_thread_page')) {curSite = DBSite.pediy_thread;}
  838. }},
  839. pager: {
  840. type: 1,
  841. nextLink: '//ul[contains(@class, "pagination")]//a[contains(text(), "▶")]',
  842. pageElement: 'css;table.threadlist > tbody > tr',
  843. insertPosition: ['css;table.threadlist > tbody', 3],
  844. replaceE: 'css;ul.pagination',
  845. scrollDelta: 1500
  846. }
  847. }, // 看雪论坛 - 各版块帖子列表
  848. pediy_thread: {
  849. SiteTypeID: 0,
  850. pager: {
  851. type: 1,
  852. nextLink: '//ul[contains(@class, "pagination")]//a[contains(text(), "▶")]',
  853. pageElement: 'css;table.postlist > tbody > tr[data-pid]',
  854. insertPosition: ['css;table.postlist > tbody > tr:not([data-pid])', 1],
  855. replaceE: 'css;ul.pagination',
  856. scrollDelta: 1500
  857. }
  858. }, // 看雪论坛 - 帖子内
  859. kdslife: {
  860. SiteTypeID: 0,
  861. host: 'club.kdslife.com',
  862. functionStart: function() {
  863. if (location.pathname.indexOf('/f_') > -1) {
  864. curSite = DBSite.kdslife;
  865. } else if (location.pathname.indexOf('/t_') > -1) {
  866. curSite = DBSite.kdslife_t;
  867. }},
  868. pager: {
  869. type: 1,
  870. nextLink: '//div[@class="fr i3_r"]/a[@href][contains(text(), "后一页")]',
  871. pageElement: 'css;ul.main_List > li.i2:not(.h_bg)',
  872. insertPosition: ['css;ul.main_List > li.i3', 1],
  873. replaceE: 'css;ul.main_List > li.i3',
  874. scrollDelta: 1000
  875. }
  876. }, // 宽带山论坛
  877. kdslife_t: {
  878. SiteTypeID: 0,
  879. pager: {
  880. type: 1,
  881. nextLink: '//div[@class="pages"]/a[contains(text(), ">>")]',
  882. pageElement: 'css;#reply_list_panel > *, script[src*="ui/js/kds.js"]',
  883. insertPosition: ['css;#reply_list_panel', 3],
  884. replaceE: 'css;.pages',
  885. scriptType: 3,
  886. scrollDelta: 1000
  887. }
  888. }, // 宽带山论坛 - 帖子内
  889. libaclub: {
  890. SiteTypeID: 0,
  891. host: 'www.libaclub.com',
  892. functionStart: function() {
  893. if (location.pathname === '/' || location.pathname.indexOf('/date_') > -1) {
  894. curSite = DBSite.libaclub;
  895. } else if (location.pathname.indexOf('/f_') > -1) {
  896. curSite = DBSite.libaclub_f;
  897. } else if (location.pathname.indexOf('/t_') > -1 || location.pathname.indexOf('/reply_') > -1) {
  898. curSite = DBSite.libaclub_t;
  899. } else if (location.pathname.indexOf('/prt_') > -1) {
  900. curSite = DBSite.libaclub_prt;
  901. } else if (location.pathname === '/facade.php') {
  902. curSite = DBSite.libaclub_search;
  903. }},
  904. insStyle: 'li.ui-list-merchant-ad, .ui-nav-appImage {display: none !important;}',
  905. pager: {
  906. type: 1,
  907. nextLink: '//div[@class="ui-crumbs-more"]/a[@class="fn-link"][1]',
  908. pageElement: 'css;ul.ui-list > li:not(.ui-list-item-head):not(.ui-list-merchant-ad)',
  909. insertPosition: ['css;ul.ui-list', 3],
  910. replaceE: 'css;div.ui-crumbs-more',
  911. scrollDelta: 1200
  912. }
  913. }, // 篱笆网论坛
  914. libaclub_f: {
  915. SiteTypeID: 0,
  916. insStyle: 'li.ui-list-merchant-ad, .ui-nav-appImage {display: none !important;}',
  917. pager: {
  918. type: 1,
  919. nextLink: '//div[@class="ui-paging"]/a[@class="ui-paging-next"]',
  920. pageElement: 'css;ul.ui-list > li:not(.ui-list-item-head):not(.ui-list-merchant-ad)',
  921. insertPosition: ['css;ul.ui-list', 3],
  922. replaceE: 'css;div.ui-paging',
  923. scrollDelta: 1200
  924. }
  925. }, // 篱笆网论坛 - 各版块帖子列表
  926. libaclub_t: {
  927. SiteTypeID: 0,
  928. insStyle: 'li.ui-list-merchant-ad, .ui-nav-appImage {display: none !important;}',
  929. pager: {
  930. type: 1,
  931. nextLink: 'css;a.ui-paging-next',
  932. pageElement: 'css;.ui-box-content > div.ui-topic, .ui-box-content > a[name]',
  933. insertPosition: ['css;.ui-box-content', 3],
  934. replaceE: 'css;div.ui-paging',
  935. scrollDelta: 1500
  936. }
  937. }, // 篱笆网论坛 - 帖子内
  938. libaclub_prt: {
  939. SiteTypeID: 0,
  940. insStyle: 'li.ui-list-merchant-ad, .ui-nav-appImage {display: none !important;}',
  941. pager: {
  942. type: 1,
  943. nextLink: 'css;a.ui-paging-next',
  944. pageElement: 'css;ul.ui-list > li',
  945. insertPosition: ['css;ul.ui-list', 3],
  946. replaceE: 'css;div.ui-paging',
  947. scrollDelta: 2000
  948. }
  949. }, // 篱笆网论坛 - 帖子内 - 打印版
  950. libaclub_search: {
  951. SiteTypeID: 0,
  952. insStyle: 'li.ui-list-merchant-ad, .ui-nav-appImage {display: none !important;}',
  953. pager: {
  954. type: 1,
  955. nextLink: '//div[@class="ui-page"]/a[contains(text(), "下一页")]',
  956. pageElement: 'css;.ui-box-main > ul.ui-list > li',
  957. insertPosition: ['css;.ui-box-main > ul.ui-list', 3],
  958. replaceE: 'css;div.ui-page',
  959. scrollDelta: 1200
  960. }
  961. }, // 篱笆网论坛 - 搜索页
  962. lowendtalk: {
  963. SiteTypeID: 0,
  964. host: 'lowendtalk.com',
  965. pager: {
  966. type: 1,
  967. nextLink: 'css;a.Next[href]',
  968. pageElement: 'css;ul.DataList > li',
  969. insertPosition: ['css;ul.DataList', 3],
  970. replaceE: 'css;.Pager',
  971. scrollDelta: 1500
  972. }
  973. }, // LowEndTalk
  974. lieyou: {
  975. SiteTypeID: 0,
  976. host: 'bbs.lieyou888.com',
  977. functionStart: function() {if (location.pathname.indexOf('/forum') > -1) {curSite = DBSite.lieyou;}},
  978. pager: {
  979. type: 1,
  980. nextLink: '//div[contains(@class, "_pageNav")]/a[@href][contains(text(), "下一页")]',
  981. pageElement: 'css;ul.gb-bbs-list > li',
  982. insertPosition: ['css;ul.gb-bbs-list', 3],
  983. replaceE: 'css;._pageNav',
  984. scrollDelta: 1000
  985. },
  986. function: {
  987. before: src_functionBefore,
  988. parameter: [0, 'img[original]', 'original']
  989. }
  990. }, // 芥子空间论坛
  991. xcar_forumdisplay: {
  992. SiteTypeID: 0,
  993. host: 'www.xcar.com.cn',
  994. functionStart: function() {if (location.pathname === '/bbs/forumdisplay.php') {curSite = DBSite.xcar_forumdisplay}},
  995. pager: {
  996. type: 1,
  997. nextLink: 'css;a.page_down',
  998. pageElement: 'css;.table-section > dl:not(.table_head)',
  999. insertPosition: ['css;.table-section', 3],
  1000. replaceE: 'css;.forumList_page',
  1001. scrollDelta: 2000
  1002. }
  1003. }, // 爱卡汽车网论坛 - 各版块帖子列表
  1004. flyert_forumdisplay: {
  1005. SiteTypeID: 0,
  1006. host: 'www.flyert.com',
  1007. functionStart: function() {if (location.search.indexOf('mod=forumdisplay') > -1) {
  1008. curSite = DBSite.flyert_forumdisplay;
  1009. } else if (location.search.indexOf('mod=viewthread') > -1) {
  1010. if (GM_getValue('menu_discuz_thread_page')) {curSite = DBSite.flyert_viewthread;}
  1011. }},
  1012. pager: {
  1013. type: 1,
  1014. nextLink: '//a[@class="nxt"][@href][not(contains(@href, "javascript"))]',
  1015. pageElement: 'css;#threadlist table > tbody[id^="normalthread_"]',
  1016. insertPosition: ['id("threadlist")//table/tbody[starts-with(@id, "normalthread_")]/parent::table', 3],
  1017. replaceE: 'css;.pg',
  1018. scrollDelta: 2500
  1019. }
  1020. }, // 飞客网论坛 - 各版块帖子列表
  1021. flyert_viewthread: {
  1022. SiteTypeID: 0,
  1023. pager: {
  1024. type: 1,
  1025. nextLink: '//a[@class="nxt"][@href][not(contains(@href, "javascript"))]',
  1026. pageElement: 'css;#postlist > .comiis_viewbox',
  1027. insertPosition: ['css;#postlist', 3],
  1028. replaceE: 'css;.comiis_pgs > .pg',
  1029. scrollDelta: 3000
  1030. }
  1031. }, // 飞客网论坛 - 帖子内
  1032. adnmb3: {
  1033. SiteTypeID: 0,
  1034. host: 'adnmb3.com',
  1035. functionStart: function() {
  1036. if (location.pathname.indexOf('/m/f/') > -1) {
  1037. curSite = DBSite.adnmb3_mf;
  1038. } else if (location.pathname.indexOf('/m/t/') > -1) {
  1039. curSite = DBSite.adnmb3_mt;
  1040. } else if (location.pathname.indexOf('/f/') > -1 || location.pathname.indexOf('/Forum/') > -1) {
  1041. curSite = DBSite.adnmb3;
  1042. } else if (location.pathname.indexOf('/t/') > -1) {
  1043. curSite = DBSite.adnmb3_t;
  1044. }},
  1045. pager: {
  1046. type: 1,
  1047. nextLink: '//ul[contains(@class, "pagination")]//a[contains(text(), "下一页")]',
  1048. pageElement: 'css;.h-threads-list > *, script[src$="/h.desktop.js"]',
  1049. insertPosition: ['css;.h-threads-list', 3],
  1050. replaceE: '//ul[contains(@class, "pagination")]',
  1051. scriptType: 3,
  1052. scrollDelta: 1500
  1053. }
  1054. }, // A 岛
  1055. adnmb3_t: {
  1056. SiteTypeID: 0,
  1057. pager: {
  1058. type: 1,
  1059. nextLink: '//ul[contains(@class, "pagination")]//a[contains(text(), "下一页")]',
  1060. pageElement: 'css;.h-threads-list > .h-threads-item > .h-threads-item-replys, script[src$="/h.desktop.js"]',
  1061. insertPosition: ['css;.h-threads-list > .h-threads-item', 3],
  1062. replaceE: '//ul[contains(@class, "pagination")]',
  1063. scriptType: 3,
  1064. scrollDelta: 1500
  1065. }
  1066. }, // A 岛 - 帖子内
  1067. adnmb3_mf: {
  1068. SiteTypeID: 0,
  1069. pager: {
  1070. type: 1,
  1071. nextLink: '//li[contains(@class, "pagination-next")]//a[contains(text(), "下一页")]',
  1072. pageElement: 'css;.h-middle > div[id^="threads_"], .h-middle > hr.h-middle > div[id^="threads_"], .h-middle > hr:nth-of-type(n+2), script[src$="/h.mobile.js"]',
  1073. insertPosition: ['css;#h-threads-pagination', 1],
  1074. replaceE: 'css;#h-threads-pagination',
  1075. scriptType: 3,
  1076. scrollDelta: 1500
  1077. }
  1078. }, // A 岛 - 帖子列表(手机版)
  1079. adnmb3_mt: {
  1080. SiteTypeID: 0,
  1081. pager: {
  1082. type: 1,
  1083. nextLink: '//li[contains(@class, "pagination-next")]//a[contains(text(), "下一页")]',
  1084. pageElement: 'css;.h-threads-replylist > div, script[src$="/h.mobile.js"]',
  1085. insertPosition: ['css;.h-threads-replylist', 3],
  1086. replaceE: 'css;#h-threads-pagination',
  1087. scriptType: 3,
  1088. scrollDelta: 1500
  1089. }
  1090. }, // A 岛 - 帖子内(手机版)
  1091. guokr: {
  1092. SiteTypeID: 0,
  1093. host: 'www.guokr.com',
  1094. pager: {
  1095. type: 2,
  1096. nextLink: 'div[class*="LoadMoreWrap"]',
  1097. intervals: 1500,
  1098. scrollDelta: 1500
  1099. }
  1100. }, // 果壳网
  1101. expreview: {
  1102. SiteTypeID: 0,
  1103. host: 'www.expreview.com',
  1104. pager: {
  1105. type: 2,
  1106. nextLink: '#show_article_red_1SHOW',
  1107. intervals: 1500,
  1108. scrollDelta: 1500
  1109. }
  1110. }, // 超能网
  1111. landian: {
  1112. SiteTypeID: 0,
  1113. host: 'www.landian.vip',
  1114. pager: {
  1115. type: 2,
  1116. nextLink: '.load-more > button',
  1117. nextText: '加载更多',
  1118. scrollDelta: 1300
  1119. }
  1120. }, // 蓝点网
  1121. ithome: {
  1122. SiteTypeID: 0,
  1123. host: 'www.ithome.com',
  1124. pager: {
  1125. type: 2,
  1126. nextLink: 'a.more',
  1127. intervals: 1500,
  1128. scrollDelta: 1500
  1129. }
  1130. }, // IT 之家
  1131. _58pic: {
  1132. SiteTypeID: 0,
  1133. host: 'www.58pic.com',
  1134. functionStart: function() {insStyle('.qt-model-t, .qtw-card.place-box.is-one, .search-v3-row .search-v3-back {display: none !important;}'); // 隐藏登录弹窗
  1135. if (location.pathname.indexOf('/tupian/') > -1) {
  1136. curSite = DBSite._58pic;
  1137. } else if (location.pathname.indexOf('/c/') > -1) {
  1138. curSite = DBSite._58pic_c;
  1139. }},
  1140. insStyle: '.qtw-card.place-box.is-two {display: none !important;}', // 隐藏登录弹窗、隐藏末尾很大的 [下一页] 按钮
  1141. pager: {
  1142. type: 1,
  1143. nextLink: '//div[contains(@class,"page-box")]//a[text()="下一页"][@href]',
  1144. pageElement: 'css;.pic-box > .qtw-card',
  1145. insertPosition: ['css;.pic-box', 3],
  1146. replaceE: 'css;.page-box',
  1147. scrollDelta: 2500
  1148. },
  1149. function: {
  1150. before: src_functionBefore,
  1151. parameter: [0, 'img[data-original]', 'data-original']
  1152. }
  1153. }, // 千图网 - 分类/搜索页
  1154. _58pic_c: {
  1155. SiteTypeID: 0,
  1156. pager: {
  1157. type: 1,
  1158. nextLink: '//div[contains(@class,"page-box")]//a[text()="下一页"][@href]',
  1159. pageElement: 'css;.list-box > .qtw-card',
  1160. insertPosition: ['css;.list-box', 3],
  1161. replaceE: 'css;.page-box',
  1162. scrollDelta: 4000
  1163. },
  1164. function: {
  1165. before: src_functionBefore,
  1166. parameter: [0, 'img[data-original]', 'data-original']
  1167. }
  1168. }, // 千图网 - 专题/收藏夹
  1169. pixabay: {
  1170. SiteTypeID: 0,
  1171. host: 'pixabay.com',
  1172. pager: {
  1173. type: 1,
  1174. nextLink: '//a[text()="›"][@href]',
  1175. pageElement: 'css;[class^="results"] > [class^="container"] > div',
  1176. insertPosition: ['css;[class^="results"] > [class^="container"]', 3],
  1177. replaceE: '//a[text()="›"][@href]',
  1178. scrollDelta: 2000
  1179. },
  1180. function: {
  1181. before: src_functionBefore,
  1182. parameter: [0, 'img[data-lazy-src]', 'data-lazy-src']
  1183. }
  1184. }, // Pixabay
  1185. logosc: {
  1186. SiteTypeID: 0,
  1187. host: 'www.logosc.cn',
  1188. functionStart: function() {if (location.pathname.indexOf('/so/') > -1) {curSite = DBSite.logosc;}},
  1189. pager: {
  1190. type: 2,
  1191. nextLink: 'button.so-pablo-button',
  1192. intervals: 1500,
  1193. scrollDelta: 1500
  1194. }
  1195. }, // 搜图神器 (免费无版权)
  1196. puxiang: {
  1197. SiteTypeID: 0,
  1198. host: 'www.puxiang.com',
  1199. functionStart: function() {if (location.pathname === '/search/favorite') {
  1200. curSite = DBSite.puxiang_collect;
  1201. } else if (location.pathname === '/search/puxiang' || location.pathname === '/list' || location.pathname === '/galleries' || location.pathname === '/articles') {
  1202. curSite = DBSite.puxiang;
  1203. } else if (location.pathname === '/') {
  1204. curSite = DBSite.puxiang; curSite.pager.scrollDelta = 4000;
  1205. }},
  1206. pager: {
  1207. type: 1,
  1208. nextLink: 'css;li.next > a[href]',
  1209. pageElement: 'css;.work-list > div',
  1210. insertPosition: ['css;.work-list', 3],
  1211. replaceE: 'css;.pagerbar',
  1212. scrollDelta: 1500
  1213. }
  1214. }, // 普象网 - 作品集/搜索页
  1215. puxiang_collect: {
  1216. SiteTypeID: 0,
  1217. pager: {
  1218. type: 1,
  1219. nextLink: 'css;li.next > a[href]',
  1220. pageElement: 'css;.collect-list > div',
  1221. insertPosition: ['css;.collect-list', 3],
  1222. replaceE: 'css;.pagerbar',
  1223. scrollDelta: 1500
  1224. }
  1225. }, // 普象网 - 收藏夹
  1226. om: {
  1227. SiteTypeID: 0,
  1228. host: 'www.om.cn',
  1229. functionStart: function() {if (location.pathname != '/') {curSite = DBSite.om;}},
  1230. pager: {
  1231. type: 1,
  1232. nextLink: 'css;li.next > a[href]',
  1233. pageElement: 'css;.main_content > ul > li',
  1234. insertPosition: ['css;.main_content > ul', 3],
  1235. replaceE: 'css;ul.pagination',
  1236. scrollDelta: 1500
  1237. }
  1238. }, // 欧模网
  1239. _3dmgame: {
  1240. SiteTypeID: 0,
  1241. host: 'www.3dmgame.com',
  1242. pager: {
  1243. type: 3,
  1244. nextLink: '//li[@class="next"]/a[@href]',
  1245. pageElement: 'css;.news_warp_center > *',
  1246. insertPosition: ['css;.news_warp_center', 3],
  1247. replaceE: 'css;.pagewrap',
  1248. scrollElement: '.pagewrap',
  1249. scrollDelta: 400
  1250. }
  1251. }, // 3DM
  1252. _3dmgame_mod: {
  1253. SiteTypeID: 0,
  1254. host: 'mod.3dmgame.com',
  1255. pager: {
  1256. type: 1,
  1257. nextLink: _3dmgame_mod_functionNext,
  1258. pageElement: '//div[contains(@class, "game-mod-list") or contains(@class, "search-mod-list")] | //script[not(@src or @type)][contains(text(), ".game-mod-page") or contains(text(), ".search-mod-page")]',
  1259. insertPosition: ['//div[contains(@class, "game-mod-wrap") or contains(@class, "search-mod ")]', 3],
  1260. scriptType: 2,
  1261. history: true,
  1262. scrollDelta: 1200
  1263. }
  1264. }, // 3DM MOD站
  1265. ali213_www: {
  1266. SiteTypeID: 0,
  1267. host: 'www.ali213.net',
  1268. pager: {
  1269. type: 3,
  1270. nextLink: 'id("after_this_page")[@href]',
  1271. pageElement: 'css;#Content >*:not(.news_ding):not(.page_fenye)',
  1272. insertPosition: ['css;.page_fenye', 1],
  1273. replaceE: 'css;.page_fenye',
  1274. scrollElement: '.page_fenye',
  1275. scrollDelta: 400
  1276. }
  1277. }, // 游侠网
  1278. ali213_gl: {
  1279. SiteTypeID: 0,
  1280. host: 'gl.ali213.net',
  1281. insStyle: '.n_show_b {display: none !important;}',
  1282. pager: {
  1283. type: 3,
  1284. nextLink: '//a[@class="next n"][@href]',
  1285. pageElement: 'css;.c-detail >*',
  1286. insertPosition: ['css;.c-detail', 3],
  1287. replaceE: 'css;.page_fenye',
  1288. scrollElement: '.page_fenye',
  1289. scrollDelta: 400
  1290. }
  1291. }, // 游侠网 - 攻略
  1292. ali213_pic: {
  1293. SiteTypeID: 0,
  1294. host: 'pic.ali213.net',
  1295. insStyle: 'a.prev, a.next {display: none !important;}',
  1296. pager: {
  1297. type: 1,
  1298. nextLink: 'css;a.next[href]',
  1299. pageElement: 'css;#image-show > img',
  1300. insertPosition: ['css;#image-show', 3],
  1301. replaceE: 'css;#image-show > a',
  1302. scrollDelta: 1200
  1303. }
  1304. }, // 游侠网 - 图库
  1305. gamersky_ent: {
  1306. SiteTypeID: 0,
  1307. host: 'www.gamersky.com',
  1308. functionStart: function() {if (location.pathname.indexOf('/ent/') > -1) {curSite = DBSite.gamersky_ent;} else {curSite = DBSite.gamersky_gl;}},
  1309. pager: {
  1310. type: 3,
  1311. nextLink: '//div[@class="page_css"]/a[text()="下一页"][@href]',
  1312. pageElement: 'css;.Mid2L_con > *:not(.gs_nc_editor):not(.pagecss):not(.page_css):not(.gs_ccs_solve):not(.post_ding)',
  1313. insertPosition: ['css;.page_css', 1],
  1314. replaceE: 'css;.page_css',
  1315. scrollElement: '.page_css',
  1316. scrollDelta: 100
  1317. }
  1318. }, // 游民星空
  1319. gamersky_gl: {
  1320. SiteTypeID: 0,
  1321. pager: {
  1322. type: 3,
  1323. nextLink: '//div[@class="page_css"]/a[text()="下一页"][@href]',
  1324. forceHTTPS: true,
  1325. pageElement: 'css;.Mid2L_con > *:not(.gs_nc_editor):not(.pagecss):not(.gs_ccs_solve):not(.post_ding)',
  1326. insertPosition: ['css;.gs_nc_editor', 1],
  1327. replaceE: 'css;.page_css',
  1328. scrollElement: '.pagecss',
  1329. scrollDelta: -1000
  1330. },
  1331. function: {
  1332. before: gamersky_gl_functionBefore
  1333. }
  1334. }, // 游民星空 - 攻略
  1335. nexusmods: {
  1336. SiteTypeID: 0,
  1337. host: 'www.nexusmods.com',
  1338. pager: {
  1339. type: 4,
  1340. nextLink: nexusmods_functionNext,
  1341. pageElement: 'css;ul.tiles > li',
  1342. insertPosition: ['css;ul.tiles', 3],
  1343. insertElement: nexusmods_insertElement,
  1344. replaceE: 'css;.pagination',
  1345. scrollDelta: 3000
  1346. }
  1347. }, // NexusMods
  1348. steamcommunity: {
  1349. SiteTypeID: 0,
  1350. host: 'steamcommunity.com',
  1351. pager: {
  1352. type: 1,
  1353. nextLink: '//a[@class="pagebtn"][last()][@href]',
  1354. pageElement: 'css;.workshopBrowseItems > *',
  1355. insertPosition: ['css;.workshopBrowseItems', 3],
  1356. replaceE: 'css;.workshopBrowsePaging',
  1357. scriptType: 2,
  1358. scrollDelta: 1500
  1359. }
  1360. }, // 创意工坊 - 项目列表
  1361. yikm: {
  1362. SiteTypeID: 0,
  1363. host: 'www.yikm.net',
  1364. pager: {
  1365. type: 1,
  1366. nextLink: '//ul[@class="pager"]//a[text()="下一页"]',
  1367. pageElement: '//h2[contains(text(), "所有游戏") or contains(text(), "搜索结果")]/following-sibling::div[1]/div',
  1368. insertPosition: ['//h2[contains(text(), "所有游戏") or contains(text(), "搜索结果")]/following-sibling::div[1]', 3],
  1369. replaceE: 'css;ul.pager',
  1370. scrollDelta: 1500
  1371. }
  1372. }, // 小霸王其乐无穷
  1373. cs_rin_ru: {
  1374. SiteTypeID: 0,
  1375. host: 'cs.rin.ru',
  1376. functionStart: function() {if (location.pathname === '/forum/viewforum.php') { // 版块帖子列表
  1377. curSite = DBSite.cs_rin_ru;
  1378. } else if (location.pathname === '/forum/viewtopic.php') { // 帖子内
  1379. if (GM_getValue('menu_discuz_thread_page')) curSite = DBSite.cs_rin_ru_viewtopic;
  1380. } else if (location.pathname === '/forum/search.php') { // 搜索结果
  1381. curSite = DBSite.cs_rin_ru_search;
  1382. }},
  1383. pager: {
  1384. type: 1,
  1385. nextLink: '//td[@class="gensmall"][@align="right"]//a[text()="Next"][@href]',
  1386. pageElement: 'css;#pagecontent > table.tablebg > tbody > tr:not([align])',
  1387. insertPosition: ['css;#pagecontent > table.tablebg > tbody > tr[align]', 1],
  1388. replaceE: 'css;#pagecontent > table:first-child',
  1389. scrollDelta: 1500
  1390. },
  1391. function: {
  1392. before: cs_rin_ru_functionBefore
  1393. }
  1394. }, // cs.rin.ru - 各版块帖子列表
  1395. cs_rin_ru_viewtopic: {
  1396. SiteTypeID: 0,
  1397. pager: {
  1398. type: 1,
  1399. nextLink: 'id("pageheader")/p[@class="gensmall"]//a[text()="Next"][@href]',
  1400. pageElement: 'css;#pagecontent > table.tablebg:not(:nth-last-child(2)):not(:nth-child(2))',
  1401. insertPosition: ['css;#pagecontent > table.tablebg:nth-last-child(2)', 1],
  1402. replaceE: 'css;#pagecontent >table:not(.tablebg), #pageheader p.gensmall',
  1403. scrollDelta: 1500
  1404. }
  1405. }, // cs.rin.ru - 帖子内
  1406. cs_rin_ru_search: {
  1407. SiteTypeID: 0,
  1408. pager: {
  1409. type: 1,
  1410. nextLink: 'id("wrapcentre")/div[@class="nav"]//a[text()="Next"]',
  1411. pageElement: 'css;#wrapcentre > form > table.tablebg > tbody > tr[valign]',
  1412. insertPosition: ['css;#wrapcentre > form > table.tablebg > tbody > tr:last-child', 1],
  1413. replaceE: 'css;#wrapcentre > div',
  1414. scrollDelta: 1500
  1415. }
  1416. }, // cs.rin.ru - 搜索页
  1417. crackhub: {
  1418. SiteTypeID: 0,
  1419. host: 'crackhub.site',
  1420. insStyle: 'html.wp-dark-mode-active .inside-article {background-color: var(--wp-dark-mode-bg);}',
  1421. pager: {
  1422. type: 1,
  1423. nextLink: '//a[@class="next page-numbers"][@href]',
  1424. pageElement: 'css;article[id^="post-"]',
  1425. insertPosition: ['css;nav.paging-navigation', 1],
  1426. replaceE: 'css;nav.paging-navigation',
  1427. scrollDelta: 2000
  1428. }
  1429. }, // Crackhub213
  1430. fitgirl: {
  1431. SiteTypeID: 0,
  1432. host: 'fitgirl-repacks.site',
  1433. pager: {
  1434. type: 1,
  1435. nextLink: '//a[@class="next page-numbers"][@href]',
  1436. pageElement: 'css;article[id^="post-"]',
  1437. insertPosition: ['css;nav.paging-navigation', 1],
  1438. replaceE: 'css;nav.paging-navigation',
  1439. scrollDelta: 2000
  1440. }
  1441. }, // FitGirl Repacks
  1442. pianku: {
  1443. SiteTypeID: 0,
  1444. host: /pianku/,
  1445. functionStart: function() {if (location.pathname != '/') {curSite = DBSite.pianku;}},
  1446. pager: {
  1447. type: 1,
  1448. nextLink: 'css;a.a1[href]',
  1449. pageElement: 'css;.content-list > li',
  1450. insertPosition: ['css;.content-list', 3],
  1451. replaceE: 'css;.pages',
  1452. scrollDelta: 1500
  1453. },
  1454. function: {
  1455. before: src_functionBefore,
  1456. parameter: [0, 'img[data-src]', 'data-src']
  1457. }
  1458. }, // 片库
  1459. cupfox: {
  1460. SiteTypeID: 0,
  1461. host: 'www.cupfox.com',
  1462. pager: {
  1463. type: 2,
  1464. nextLink: '.load-more',
  1465. nextText: '点击加载更多',
  1466. scrollDelta: 700
  1467. }
  1468. }, // 茶杯狐
  1469. novipnoad: {
  1470. SiteTypeID: 0,
  1471. host: 'www.novipnoad.com',
  1472. functionStart: function() {if (location.pathname != '/' && location.pathname.indexOf('.html') === -1) {curSite = DBSite.novipnoad;}},
  1473. pager: {
  1474. type: 1,
  1475. nextLink: 'css;a.nextpostslink',
  1476. pageElement: 'css;.video-listing-content .row > div',
  1477. insertPosition: ['css;.video-listing-content .row', 3],
  1478. replaceE: 'css;.wp-pagenavi',
  1479. scrollDelta: 1500
  1480. },
  1481. function: {
  1482. before: src_functionBefore,
  1483. parameter: [0, 'img[data-original]', 'data-original']
  1484. }
  1485. }, // NO视频
  1486. ddrk: {
  1487. SiteTypeID: 0,
  1488. host: ['ddrk.me', 'ddys.tv'],
  1489. functionStart: function() {if (location.pathname === '/' || location.pathname.indexOf('/category/') > -1 || location.pathname.indexOf('/tag/') > -1) {curSite = DBSite.ddrk;}},
  1490. pager: {
  1491. type: 1,
  1492. nextLink: 'css;a.next',
  1493. pageElement: 'css;.post-box-list > article',
  1494. insertPosition: ['css;.post-box-list', 3],
  1495. replaceE: 'css;.pagination_wrap',
  1496. scrollDelta: 1500
  1497. }
  1498. }, // 低端影视
  1499. nfmovies: {
  1500. SiteTypeID: 0,
  1501. host: 'www.nfmovies.com',
  1502. functionStart: function() {if (location.pathname === '/search.php' || location.pathname.indexOf('/list/') > -1) {curSite = DBSite.nfmovies;}},
  1503. pager: {
  1504. type: 1,
  1505. nextLink: '//ul[contains(@class, "myui-page")]/li/a[contains(text(), "下一页")]',
  1506. pageElement: 'css;ul.myui-vodlist > li',
  1507. insertPosition: ['css;ul.myui-vodlist', 3],
  1508. replaceE: 'css;ul.myui-page',
  1509. scrollDelta: 1500
  1510. },
  1511. function: {
  1512. before: src_functionBefore,
  1513. parameter: [1, 'a[data-original]', 'data-original']
  1514. }
  1515. }, // 奈菲影视
  1516. zxzj: {
  1517. SiteTypeID: 0,
  1518. host: 'www.zxzj.me',
  1519. functionStart: function() {if (location.pathname != '/' && location.pathname.indexOf('/detail/') === -1) {curSite = DBSite.zxzj;}},
  1520. insStyle: 'div.stui-page__all {display: none !important;}',
  1521. pager: {
  1522. type: 1,
  1523. nextLink: '//ul[contains(@class, "stui-page__item")]//a[contains(text(), "下一页")]',
  1524. pageElement: 'css;ul.stui-vodlist > li',
  1525. insertPosition: ['css;ul.stui-vodlist', 3],
  1526. replaceE: 'css;ul.stui-page__item',
  1527. scrollDelta: 1000
  1528. },
  1529. function: {
  1530. before: src_functionBefore,
  1531. parameter: [1, 'a[data-original]', 'data-original']
  1532. }
  1533. }, // 在线之家
  1534. _91mjw: {
  1535. SiteTypeID: 0,
  1536. host: '91mjw.com',
  1537. functionStart: function() {if (location.pathname.indexOf('/video/') === -1 || location.pathname.indexOf('/vplay/') === -1) {curSite = DBSite._91mjw;}},
  1538. pager: {
  1539. type: 1,
  1540. nextLink: 'css;.next-page > a',
  1541. pageElement: 'css;.m-movies > article',
  1542. insertPosition: ['css;.pagination', 1],
  1543. replaceE: 'css;.pagination',
  1544. scrollDelta: 1500
  1545. },
  1546. function: {
  1547. before: src_functionBefore,
  1548. parameter: [0, 'img[data-original]', 'data-original']
  1549. }
  1550. }, // 91 美剧网
  1551. zhenbuka: {
  1552. SiteTypeID: 0,
  1553. host: ['www.zhenbuka3.com', 'www.zhenbuka5.com'],
  1554. functionStart: function() {if (location.pathname.indexOf('/vodtype/') > -1) {curSite = DBSite.zhenbuka;}},
  1555. pager: {
  1556. type: 1,
  1557. nextLink: '//ul[contains(@class, "stui-page")]/li/a[contains(text(), "下一页")]',
  1558. pageElement: 'css;ul.stui-vodlist > li',
  1559. insertPosition: ['css;ul.stui-vodlist', 3],
  1560. replaceE: 'css;ul.stui-page',
  1561. scrollDelta: 1500
  1562. },
  1563. function: {
  1564. before: src_functionBefore,
  1565. parameter: [1, 'a[data-original]', 'data-original']
  1566. }
  1567. }, // 真不卡影院
  1568. dm233: {
  1569. SiteTypeID: 0,
  1570. host: 'www.dm233.cc',
  1571. functionStart: function() {if (location.pathname.indexOf('/catalog/') > -1 || location.pathname === '/recommend/' || location.pathname === '/search') {
  1572. curSite = DBSite.dm233;
  1573. } else if (location.pathname === '/article/') {
  1574. curSite = DBSite.dm233_article;
  1575. } else if (location.pathname === '/rank/') {
  1576. curSite = DBSite.dm233_rank;
  1577. }},
  1578. pager: {
  1579. type: 1,
  1580. nextLink: '//div[@class="pagelist"]//a[contains(text(), "下一页") or contains(text(), "下一頁")]',
  1581. pageElement: 'css;.dhnew ul > li',
  1582. insertPosition: ['css;.dhnew ul', 3],
  1583. replaceE: 'css;.pagelist',
  1584. scrollDelta: 1000
  1585. }
  1586. }, // 233 动漫
  1587. dm233_article: {
  1588. SiteTypeID: 0,
  1589. pager: {
  1590. type: 1,
  1591. nextLink: '//div[@class="pagelist"]//a[contains(text(), "下一页") or contains(text(), "下一頁")]',
  1592. pageElement: 'css;.xgyd ul > li',
  1593. insertPosition: ['css;.xgyd ul', 3],
  1594. replaceE: 'css;.pagelist',
  1595. scrollDelta: 1000
  1596. }
  1597. }, // 233 动漫 - 动漫情报/资讯
  1598. dm233_rank: {
  1599. SiteTypeID: 0,
  1600. pager: {
  1601. type: 1,
  1602. nextLink: '//div[@class="pagelist"]//a[contains(text(), "下一页") or contains(text(), "下一頁")]',
  1603. pageElement: 'css;.side-update.normal-wai > .normal-nei',
  1604. insertPosition: ['css;.side-update.normal-wai', 3],
  1605. replaceE: 'css;.pagelist',
  1606. scrollDelta: 1000
  1607. }
  1608. }, // 233 动漫 - 排行榜
  1609. agefans: {
  1610. SiteTypeID: 0,
  1611. host: 'www.agefans.cc',
  1612. functionStart: function() {if (location.pathname.indexOf('/catalog/') > -1 || location.pathname === '/search') {
  1613. curSite = DBSite.agefans;
  1614. } else if (location.pathname === '/recommend' || location.pathname === '/update') {
  1615. curSite = DBSite.agefans_;
  1616. } else if (location.pathname === '/rank') {
  1617. curSite = DBSite.agefans_rank;
  1618. }},
  1619. pager: {
  1620. type: 1,
  1621. nextLink: 'id("container")//div[@class="blockcontent"]/div[@style][not(@class)]/li/a[@href][contains(text(), "下一页")]',
  1622. pageElement: 'css;#container .blockcontent1 > div',
  1623. insertPosition: ['css;#container .blockcontent1', 3],
  1624. replaceE: 'css;#container .blockcontent > div[style]:not([class])',
  1625. scrollDelta: 1000
  1626. }
  1627. }, // AGE 动漫 - 全部/搜索
  1628. agefans_: {
  1629. SiteTypeID: 0,
  1630. pager: {
  1631. type: 1,
  1632. nextLink: 'id("container")//div[@class="blockcontent"]/div[@style][not(@class)]/li/a[@href][contains(text(), "下一页")]',
  1633. pageElement: 'css;#container .blockcontent > ul > li',
  1634. insertPosition: ['css;#container .blockcontent > ul', 3],
  1635. replaceE: 'css;#container .blockcontent > div[style]:not([class])',
  1636. scrollDelta: 1000
  1637. }
  1638. }, // AGE 动漫 - 其他页
  1639. agefans_rank: {
  1640. SiteTypeID: 0,
  1641. pager: {
  1642. type: 1,
  1643. nextLink: 'id("container")/ul[@style][not(@class)]/li/a[@href][contains(text(), "下一页")]',
  1644. pageElement: 'css;#container > .div_right .blockcontent.div_right_r_3 > ul',
  1645. insertPosition: ['css;#container > .div_right .blockcontent.div_right_r_3', 3],
  1646. replaceE: 'css;#container > ul[style]:not([class])',
  1647. scrollDelta: 1000
  1648. }
  1649. }, // AGE 动漫 - 排行榜
  1650. yhdm: {
  1651. SiteTypeID: 0,
  1652. host: 'www.imomoe.la',
  1653. functionStart: function() {if (location.pathname.indexOf('/list/') > -1) {
  1654. curSite = DBSite.yhdm;
  1655. } else if (location.pathname === '/so.asp' || location.pathname === '/search.asp') {
  1656. curSite = DBSite.yhdm_;
  1657. }},
  1658. pager: {
  1659. type: 1,
  1660. nextLink: '//div[@class="pages"]/a[@href][contains(text(), "下一页")]',
  1661. pageElement: 'css;#contrainer > .img> ul > li',
  1662. insertPosition: ['css;#contrainer > .img> ul', 3],
  1663. replaceE: 'css;.pages',
  1664. mimeType: 'text/html; charset=gb2312',
  1665. scrollDelta: 1000
  1666. }
  1667. }, // 樱花动漫
  1668. yhdm_: {
  1669. SiteTypeID: 0,
  1670. pager: {
  1671. type: 1,
  1672. nextLink: '//div[@class="pages"]/a[@href][contains(text(), "下一页")]',
  1673. pageElement: 'css;#contrainer .fire .pics > ul > li',
  1674. insertPosition: ['css;#contrainer .fire .pics > ul', 3],
  1675. replaceE: 'css;.pages',
  1676. mimeType: 'text/html; charset=gb2312',
  1677. scrollDelta: 1000
  1678. }
  1679. }, // 樱花动漫 - 搜索页等
  1680. zzzfun: {
  1681. SiteTypeID: 0,
  1682. host: 'www.zzzfun.com',
  1683. functionStart: function() {
  1684. if (location.pathname.indexOf('/vod_type') > -1 || location.pathname.indexOf('/vod_show') > -1) {
  1685. curSite = DBSite.zzzfun;
  1686. } else if (location.pathname.indexOf('/vod_search') > -1) {
  1687. curSite = DBSite.zzzfun_search;
  1688. }},
  1689. pager: {
  1690. type: 1,
  1691. nextLink: 'css;#page a[title="下一页"]',
  1692. pageElement: 'css;ul.search-result > a',
  1693. insertPosition: ['css;ul.search-result', 3],
  1694. replaceE: 'css;#page',
  1695. scrollDelta: 1000
  1696. },
  1697. function: {
  1698. before: src_functionBefore,
  1699. parameter: [0, 'img[data-original]', 'data-original']
  1700. }
  1701. }, // ZzzFun 动漫
  1702. zzzfun_search: {
  1703. SiteTypeID: 0,
  1704. pager: {
  1705. type: 1,
  1706. nextLink: 'css;#page a[title="下一页"]',
  1707. pageElement: 'css;ul.show-list > li',
  1708. insertPosition: ['css;ul.show-list', 3],
  1709. replaceE: 'css;#page',
  1710. scrollDelta: 1000
  1711. },
  1712. function: {
  1713. before: src_functionBefore,
  1714. parameter: [0, 'img[data-original]', 'data-original']
  1715. }
  1716. }, // ZzzFun 动漫 - 搜索页
  1717. yinfans: {
  1718. SiteTypeID: 0,
  1719. host: 'www.yinfans.net',
  1720. insStyle: '#post_container {height: auto !important;} #post_container > li {position: static !important; float: left !important; height: 620px !important;}',
  1721. pager: {
  1722. type: 1,
  1723. nextLink: 'css;a.next[href]',
  1724. pageElement: 'css;#post_container > li',
  1725. insertPosition: ['css;#post_container', 3],
  1726. replaceE: 'css;.pagination',
  1727. scrollDelta: 1500
  1728. }
  1729. }, // 音范丝
  1730. btbtt: {
  1731. SiteTypeID: 0,
  1732. host: /btbtt/,
  1733. pager: {
  1734. type: 1,
  1735. nextLink: '//div[@class="page"]/a[contains(text(), "▶") or contains(text(), "下一页")]',
  1736. pageElement: 'css;#threadlist > table, #threadlist > hr',
  1737. insertPosition: ['css;#threadlist', 3],
  1738. replaceE: 'css;.page',
  1739. scrollDelta: 2000
  1740. }
  1741. }, // BT 之家
  1742. bdys: {
  1743. SiteTypeID: 0,
  1744. host: 'www.bd2020.com',
  1745. functionStart: function() {if (location.pathname != '/' && !(/\/\d+\.htm/.test(location.pathname))) {curSite = DBSite.bdys;}},
  1746. pager: {
  1747. type: 2,
  1748. nextLink: 'div.layui-flow-more > a',
  1749. nextText: '加载更多',
  1750. scrollDelta: 1000
  1751. }
  1752. }, // BD 影视
  1753. gaoqing_fm: {
  1754. SiteTypeID: 0,
  1755. host: 'gaoqing.fm',
  1756. pager: {
  1757. type: 2,
  1758. nextLink: '.col-md-12 > a[href], #loadmore > a[href]',
  1759. intervals: 1500,
  1760. scrollDelta: 1000
  1761. }
  1762. }, // 高清电台
  1763. yyds: {
  1764. SiteTypeID: 0,
  1765. host: 'yyds.fans',
  1766. functionStart: function() {
  1767. if (location.search != '' && location.search.indexOf('p=') === -1) {
  1768. curSite = DBSite.yyds;
  1769. }},
  1770. pager: {
  1771. type: 1,
  1772. nextLink: 'css;a.next.page-numbers[href]',
  1773. pageElement: 'css;.list-grouped > div',
  1774. insertPosition: ['css;.list-grouped', 3],
  1775. replaceE: 'css;nav.pagination',
  1776. scrollDelta: 1100
  1777. }
  1778. }, // YYDS 电影
  1779. kisssub: {
  1780. SiteTypeID: 0,
  1781. host: 'www.kisssub.org',
  1782. pager: {
  1783. type: 1,
  1784. nextLink: 'css;a.nextprev',
  1785. pageElement: 'css;#data_list > tr',
  1786. insertPosition: ['css;#data_list', 3],
  1787. replaceE: 'css;.pages',
  1788. scrollDelta: 2500
  1789. }
  1790. }, // 爱恋动漫
  1791. dmhy: {
  1792. SiteTypeID: 0,
  1793. host: ['share.dmhy.org', 'dmhy.anoneko.com'],
  1794. pager: {
  1795. type: 1,
  1796. nextLink: '//div[@class="nav_title"]/a[@href][contains(text(), "下一頁")]',
  1797. pageElement: 'css;#topic_list > tbody > tr',
  1798. insertPosition: ['css;#topic_list > tbody', 3],
  1799. replaceE: 'css;.nav_title',
  1800. scrollDelta: 1500
  1801. },
  1802. function: {
  1803. after: function() {document.body.appendChild(document.createElement('script')).textContent = `$('#topic_list > tbody > tr:even:not(.even):not(.odd)').addClass('even'); $('#topic_list > tbody > tr:odd:not(.even):not(.odd)').addClass('odd');`;}
  1804. }
  1805. }, // 动漫花园
  1806. futaacg: {
  1807. SiteTypeID: 0,
  1808. host: 'futaacg.com',
  1809. pager: {
  1810. type: 1,
  1811. nextLink: 'css;ul.pagination a[rel="next"]',
  1812. pageElement: 'css;.topic-list > div',
  1813. insertPosition: ['css;.topic-list', 3],
  1814. replaceE: 'css;ul.pagination',
  1815. scrollDelta: 1500
  1816. }
  1817. }, // 扶她动漫
  1818. bangumi: {
  1819. SiteTypeID: 0,
  1820. host: 'bangumi.moe',
  1821. pager: {
  1822. type: 2,
  1823. nextLink: '[torrent-list="lattorrents"] button[ng-click="loadMore()"] ,[torrent-list="torrents"] button[ng-click="loadMore()"]',
  1824. intervals: 1000,
  1825. scrollDelta: 1500
  1826. }
  1827. }, // 萌番组
  1828. miobt: {
  1829. SiteTypeID: 0,
  1830. host: ['miobt.com', 'www.36dm.club'],
  1831. functionStart: function() {curSite = DBSite.miobt;
  1832. if (location.host === 'www.36dm.club') {
  1833. curSite.pager.scrollDelta = 1000;
  1834. }},
  1835. pager: {
  1836. type: 1,
  1837. nextLink: '//a[@class="nextprev"][contains(text(), "〉") or contains(text(), "下一页") or contains(text(), "»")]',
  1838. pageElement: 'css;#data_list > tr',
  1839. insertPosition: ['css;#data_list', 3],
  1840. replaceE: 'css;.pages',
  1841. scrollDelta: 2000
  1842. }
  1843. }, // MioBT + 简单动漫
  1844. nyaa: {
  1845. SiteTypeID: 0,
  1846. host: /nyaa\.si/,
  1847. pager: {
  1848. type: 1,
  1849. nextLink: '//a[@rel="next"][@href] | //li[@class="next"]/a[@href]',
  1850. pageElement: 'css;table.torrent-list > tbody > tr',
  1851. insertPosition: ['css;table.torrent-list > tbody', 3],
  1852. replaceE: 'css;ul.pagination',
  1853. scrollDelta: 2000
  1854. }
  1855. }, // Nyaa
  1856. skrbt: {
  1857. SiteTypeID: 0,
  1858. host: /skrbt/,
  1859. functionStart: function() {if (location.pathname === '/search') curSite = DBSite.skrbt;},
  1860. pager: {
  1861. type: 1,
  1862. nextLink: skrbt_functionNext,
  1863. pageElement: 'css;div[class="row"] > .col-md-6 > ul',
  1864. insertPosition: ['css;nav[aria-label*="Page"]', 1],
  1865. replaceE: 'css;ul.pagination',
  1866. scrollDelta: 900
  1867. }
  1868. }, // SkrBT
  1869. rarbgprx: {
  1870. SiteTypeID: 0,
  1871. host: /rarbg/,
  1872. functionStart: function() {if (location.pathname === '/torrents.php') {curSite = DBSite.rarbgprx;}},
  1873. pager: {
  1874. type: 1,
  1875. nextLink: '(//a[@title="next page"])[1][@href]',
  1876. pageElement: 'css;table.lista2t tr.lista2',
  1877. insertPosition: ['css;table.lista2t > tbody', 3],
  1878. replaceE: 'css;#pager_links',
  1879. scrollDelta: 1000
  1880. }
  1881. }, // RARBG
  1882. subdh: {
  1883. SiteTypeID: 0,
  1884. host: 'subdh.com',
  1885. functionStart: function() {if (location.pathname === '/' || location.pathname.indexOf('/list/new') > -1) {
  1886. curSite = DBSite.subdh;
  1887. } else if (location.pathname.indexOf('/search') > -1) {
  1888. curSite = DBSite.subdh_search;
  1889. }},
  1890. pager: {
  1891. type: 1,
  1892. nextLink: '//a[@class="page-link"][contains(text(), "下一页")]',
  1893. pageElement: 'css;.col-lg-9 .bg-white.shadow-sm.rounded-3 > .row.gx-0',
  1894. insertPosition: ['css;.col-lg-9 .bg-white.shadow-sm.rounded-3', 3],
  1895. replaceE: 'css;ul.pagination',
  1896. scrollDelta: 1000
  1897. }
  1898. }, // SubDH
  1899. subdh_search: {
  1900. SiteTypeID: 0,
  1901. pager: {
  1902. type: 1,
  1903. nextLink: '//a[@class="page-link"][contains(text(), "下一页")]',
  1904. pageElement: 'css;.col-lg-9 .bg-white.shadow-sm.rounded-3',
  1905. insertPosition: ['css;nav[aria-label="pagination"]', 1],
  1906. replaceE: 'css;ul.pagination',
  1907. scrollDelta: 1000
  1908. }
  1909. }, // SubDH - 搜索页
  1910. mini4k: {
  1911. SiteTypeID: 0,
  1912. host: 'www.mini4k.com',
  1913. functionStart: function() {if (location.pathname != '/' && !(/\/\d{3,}/.test(location.pathname))) {curSite = DBSite.mini4k;};},
  1914. pager: {
  1915. type: 1,
  1916. nextLink: 'css;a.pager__item--next[href]',
  1917. pageElement: 'css;div[class*="-item-list"] > ul > li',
  1918. insertPosition: ['css;div[class*="-item-list"] > ul', 3],
  1919. replaceE: 'css;.pagination',
  1920. scrollDelta: 2000
  1921. }
  1922. }, // MINI4K
  1923. bthaha: {
  1924. SiteTypeID: 0,
  1925. host: /bthaha/,
  1926. functionStart: function() {if (location.pathname.indexOf('/search/') > -1) {
  1927. curSite = DBSite.bthaha;
  1928. document.querySelectorAll('[id^="list_top"], [id^="list_bottom"]').forEach(function (one) {one.parentElement.parentElement.hidden = true;});
  1929. }},
  1930. insStyle: '[id^="list_top"], [id^="list_bottom"] {display: none !important;}',
  1931. pager: {
  1932. type: 1,
  1933. nextLink: '//ul[@class="pagination"]/li/a[contains(text(), "下一页")]',
  1934. pageElement: 'css;table.table > tbody > tr',
  1935. insertPosition: ['css;table.table > tbody', 3],
  1936. replaceE: 'css;ul.pagination',
  1937. scrollDelta: 1000
  1938. },
  1939. function: {
  1940. before: bthaha_functionBefore
  1941. }
  1942. }, // BTHaha
  1943. a4k: {
  1944. SiteTypeID: 0,
  1945. host: 'www.a4k.net',
  1946. functionStart: function() {if (location.pathname.indexOf('/subtitle/') === -1) {curSite = DBSite.a4k;};},
  1947. pager: {
  1948. type: 1,
  1949. nextLink: 'css;a.pager__item--next[href]',
  1950. pageElement: 'css;ul.list > li',
  1951. insertPosition: ['css;ul.list', 3],
  1952. replaceE: 'css;.pagination',
  1953. scrollDelta: 1000
  1954. }
  1955. }, // A4k 字幕网(字幕)
  1956. assrt: {
  1957. SiteTypeID: 0,
  1958. host: 'assrt.net',
  1959. functionStart: function() {if (location.pathname != '/') {curSite = DBSite.assrt;};},
  1960. pager: {
  1961. type: 1,
  1962. nextLink: assrt_functionNext,
  1963. pageElement: 'css;.resultcard > div:not(#top-banner):not(#bottom-banner)',
  1964. insertPosition: ['css;.pagelinkcard', 1],
  1965. replaceE: 'css;.pagelinkcard',
  1966. scrollDelta: 1000
  1967. }
  1968. }, // 射手网(字幕)
  1969. subhd: {
  1970. SiteTypeID: 0,
  1971. host: 'subhd.tv',
  1972. functionStart: function() {if (location.pathname === '/forum/forum') {
  1973. curSite = DBSite.subhd_forum;
  1974. } else if (location.pathname != '/' && location.pathname != '/zu' && location.pathname.indexOf('/a/') === -1 && location.pathname.indexOf('/d/') === -1 && location.pathname.indexOf('/forum/') === -1) {
  1975. curSite = DBSite.subhd;
  1976. }},
  1977. pager: {
  1978. type: 1,
  1979. nextLink: '//a[@class="page-link"][contains(text(), "下一页")]',
  1980. pageElement: 'css;.bg-white.shadow-sm.rounded-3',
  1981. insertPosition: ['css;nav.clearfix', 1],
  1982. replaceE: 'css;nav.clearfix',
  1983. scrollDelta: 1000
  1984. }
  1985. }, // SubHD(字幕)
  1986. subhd_forum: {
  1987. SiteTypeID: 0,
  1988. pager: {
  1989. type: 1,
  1990. nextLink: '//a[@class="page-link"][contains(text(), "下一页")]',
  1991. pageElement: 'css;.bg-white.shadow-sm.rounded-3 > div',
  1992. insertPosition: ['css;.bg-white.shadow-sm.rounded-3', 3],
  1993. replaceE: 'css;nav.clearfix',
  1994. scrollDelta: 800
  1995. }
  1996. }, // SubHD - forum(字幕)
  1997. qidian: {
  1998. SiteTypeID: 0,
  1999. host: 'www.qidian.com',
  2000. functionStart: function() {if (location.pathname.indexOf('/all/') > -1) {curSite = DBSite.qidian;}},
  2001. pager: {
  2002. type: 1,
  2003. nextLink: 'css;a[class*="pagination-next"][href]',
  2004. pageElement: 'css;ul.all-img-list > li',
  2005. insertPosition: ['css;ul.all-img-list', 3],
  2006. replaceE: 'css;#page-container',
  2007. scrollDelta: 900
  2008. }
  2009. }, // 起点小说
  2010. qidian_read: {
  2011. SiteTypeID: 0,
  2012. host: 'read.qidian.com',
  2013. insStyle: '.admire-wrap {display: none !important;}',
  2014. pager: {
  2015. type: 1,
  2016. nextLink: 'css;a[id$="chapterNext"][href]',
  2017. pageElement: 'css;.main-text-wrap > div:not(.admire-wrap)',
  2018. insertPosition: ['css;.main-text-wrap', 3],
  2019. replaceE: 'css;.chapter-control, title',
  2020. history: true,
  2021. scrollDelta: 900
  2022. }
  2023. }, // 起点小说 - 阅读页
  2024. baoshuu: {
  2025. SiteTypeID: 0,
  2026. host: 'www.baoshuu.com',
  2027. functionStart: function() {if (location.pathname.indexOf('/TXT/list') > -1) curSite = DBSite.baoshuu;},
  2028. pager: {
  2029. type: 1,
  2030. nextLink: '//div[@class="listl2"]//a[@href][text()="下一页"]',
  2031. pageElement: 'css;.listl2 > ul > li',
  2032. insertPosition: ['css;.listl2 > ul', 3],
  2033. replaceE: 'css;listl2 > dl',
  2034. mimeType: 'text/html; charset=gb2312',
  2035. scrollDelta: 900
  2036. }
  2037. }, // 宝书网
  2038. baoshuu_m: {
  2039. SiteTypeID: 0,
  2040. host: 'm.baoshuu.com',
  2041. functionStart: function() {if (location.pathname.indexOf('/TXT/list') > -1) curSite = DBSite.baoshuu_m;},
  2042. pager: {
  2043. type: 1,
  2044. nextLink: '//div[@class="man_first"]//a[@href][text()="下一页"]',
  2045. pageElement: 'css;.man_first > ul > li',
  2046. insertPosition: ['css;.man_first > ul', 3],
  2047. replaceE: 'css;.man_first > dl',
  2048. mimeType: 'text/html; charset=gb2312',
  2049. scrollDelta: 900
  2050. }
  2051. }, // 宝书网- 手机版
  2052. _23wx: {
  2053. SiteTypeID: 0,
  2054. host: 'www.23wx.cc',
  2055. functionStart: function() {if (/\d+\/\d+\.html/.test(location.pathname)) {curSite = DBSite._23wx;}},
  2056. pager: {
  2057. type: 1,
  2058. nextLink: '//div[@class="bottem2"]/a[contains(text(), "下一章")]',
  2059. pageElement: 'css;#content',
  2060. insertPosition: ['css;#content', 5],
  2061. replaceE: 'css;.bottem2, head > title, .bookname > h1',
  2062. mimeType: 'text/html; charset=gbk',
  2063. history: true,
  2064. scrollDelta: 1500
  2065. }
  2066. }, // 顶点小说
  2067. xineyby: {
  2068. SiteTypeID: 0,
  2069. host: 'www.xineyby.com',
  2070. functionStart: function() {if (location.pathname.indexOf('/read/') > -1) {
  2071. curSite = DBSite.xineyby;
  2072. } else if (location.pathname.indexOf('/list/') > -1 || location.pathname.indexOf('/quanben/') > -1 || location.pathname.indexOf('/search') > -1) {
  2073. curSite = DBSite.xineyby_list;
  2074. }},
  2075. pager: {
  2076. type: 1,
  2077. nextLink: 'id("footlink")/a[contains(text(), "下一页")]',
  2078. pageElement: 'css;#contents',
  2079. insertPosition: ['css;#contents', 5],
  2080. replaceE: 'css;#footlink, head > title, #amain dd h1',
  2081. mimeType: 'text/html; charset=gbk',
  2082. history: true,
  2083. scrollDelta: 900
  2084. }
  2085. }, // 无错小说网
  2086. xineyby_list: {
  2087. SiteTypeID: 0,
  2088. pager: {
  2089. type: 1,
  2090. nextLink: 'css;#pagelink a.next[href]',
  2091. pageElement: 'css;#content > dd tbody > tr:not(:first-child)',
  2092. insertPosition: ['css;#content > dd tbody', 3],
  2093. replaceE: 'css;#pagelink',
  2094. mimeType: 'text/html; charset=gbk',
  2095. scrollDelta: 900
  2096. }
  2097. }, // 无错小说网 - 分类/搜索页
  2098. linovel: {
  2099. SiteTypeID: 0,
  2100. host: 'www.linovel.net',
  2101. functionStart: function() {if (/\/book\/\d+\/.+\.html/.test(location.pathname)) {
  2102. insStyle('.reward-section {display: none !important;}');
  2103. } else if (location.pathname.indexOf('/cat/') > -1) {
  2104. curSite = DBSite.linovel;
  2105. }},
  2106. pager: {
  2107. type: 1,
  2108. nextLink: '//ul[@class="pagination"]/li/a[contains(text(), "下一页")]',
  2109. pageElement: 'css;.rank-book-list > div',
  2110. insertPosition: ['css;.rank-book-list', 3],
  2111. replaceE: 'css;ul.pagination',
  2112. scrollDelta: 1000
  2113. }
  2114. }, // 轻之文库
  2115. linovelib: {
  2116. SiteTypeID: 0,
  2117. host: 'www.linovelib.com',
  2118. functionStart: function() {if (/\/novel\/\d+\/.+\.html/.test(location.pathname)) {
  2119. curSite = DBSite.linovelib;
  2120. } else if (location.pathname.indexOf('/wenku/') > -1) {
  2121. curSite = DBSite.linovelib_wenku;
  2122. } else if (location.pathname.indexOf('/top/') > -1 || location.pathname.indexOf('/topfull/') > -1 || location.pathname.indexOf('toplist.php') > -1) {
  2123. curSite = DBSite.linovelib_top;
  2124. }},
  2125. pager: {
  2126. type: 1,
  2127. nextLink: '//p[@class="mlfy_page"]/a[@href][contains(text(), "下一页") or contains(text(), "下一章")]',
  2128. pageElement: 'css;#mlfy_main_text > *',
  2129. insertPosition: ['css;#mlfy_main_text', 3],
  2130. replaceE: 'css;p.mlfy_page, head > title',
  2131. history: true,
  2132. scrollDelta: 1000
  2133. }
  2134. }, // 哔哩轻小说
  2135. linovelib_wenku: {
  2136. SiteTypeID: 0,
  2137. pager: {
  2138. type: 1,
  2139. nextLink: 'css;#pagelink > a.next[href]',
  2140. pageElement: 'css;.store_collist > div.bookbox',
  2141. insertPosition: ['css;.store_collist', 3],
  2142. replaceE: 'css;#pagelink',
  2143. scrollDelta: 1000
  2144. },
  2145. function: {
  2146. before: src_functionBefore,
  2147. parameter: [0, 'img[data-original]', 'data-original']
  2148. }
  2149. }, // 哔哩轻小说 - 文库
  2150. linovelib_top: {
  2151. SiteTypeID: 0,
  2152. pager: {
  2153. type: 1,
  2154. nextLink: 'css;#pagelink > a.next[href]',
  2155. pageElement: 'css;.rankpage_box > div.rank_d_list',
  2156. insertPosition: ['css;div.pages', 1],
  2157. replaceE: 'css;#pagelink',
  2158. scrollDelta: 1000
  2159. },
  2160. function: {
  2161. before: src_functionBefore,
  2162. parameter: [0, 'img[data-original]', 'data-original']
  2163. }
  2164. }, // 哔哩轻小说 - 全本
  2165. linovelib_w: {
  2166. SiteTypeID: 0,
  2167. host: 'w.linovelib.com',
  2168. functionStart: function() {if (/\/novel\/\d+\/.+\.html/.test(location.pathname)) {
  2169. curSite = DBSite.linovelib_w;
  2170. } else if (location.pathname.indexOf('/wenku/') > -1 || location.pathname.indexOf('/sa/') > -1) {
  2171. curSite = DBSite.linovelib_w_wenku;
  2172. }},
  2173. pager: {
  2174. type: 1,
  2175. nextLink: function() {if (ReadParams) {return ReadParams.url_next}; return ''},
  2176. pageElement: '//body/script[contains(text(), "var ReadParams")] | id("apage")/div',
  2177. insertPosition: ['css;#apage', 3],
  2178. replaceE: 'css;head > title',
  2179. history: true,
  2180. scriptType: 2,
  2181. scrollDelta: 1000
  2182. }
  2183. }, // 哔哩轻小说 (手机版)
  2184. linovelib_w_wenku: {
  2185. SiteTypeID: 0,
  2186. pager: {
  2187. type: 1,
  2188. nextLink: 'css;#pagelink > strong+a[href] ,#pagelink a.next[href]',
  2189. pageElement: 'css;ol.book-ol > li',
  2190. insertPosition: ['css;ol.book-ol', 3],
  2191. replaceE: 'css;#pagelink',
  2192. scrollDelta: 1000
  2193. },
  2194. function: {
  2195. before: src_functionBefore,
  2196. parameter: [0, 'img[data-original]', 'data-original']
  2197. }
  2198. }, // 哔哩轻小说 (手机版) - 文库
  2199. cartoonmad: {
  2200. SiteTypeID: 0,
  2201. host: ['www.cartoonmad.com','www.cartoonmad.cc'],
  2202. functionStart: function() {if (location.pathname.indexOf('/comic/') > -1) {
  2203. document.querySelector('body > table > tbody > tr:nth-child(4) > td > table > tbody > tr:first-child > td:first-child > a').href = 'javascript:void(0);'; // 清理图片上的链接
  2204. curSite = DBSite.cartoonmad;
  2205. } else if (location.pathname != '/') {
  2206. curSite = DBSite.cartoonmad_list;
  2207. }},
  2208. insStyle: 'body > table > tbody > tr:nth-child(4) > td > table > tbody > tr:first-child > td:not(:first-child) {display: none !important;} body > table > tbody > tr:nth-child(4) > td > table > tbody > tr:first-child > td:first-child img {max-width: 100%;height: auto;display: block !important;margin: 0 auto !important;}',
  2209. pager: {
  2210. type: 1,
  2211. nextLink: cartoonmad_functionNext,
  2212. pageElement: 'css;body > table > tbody > tr:nth-child(4) > td > table > tbody > tr:first-child > td:first-child img',
  2213. insertPosition: ['css;body > table > tbody > tr:nth-child(4) > td > table > tbody > tr:first-child > td:first-child > a', 3],
  2214. replaceE: 'css;body > table > tbody > tr:nth-child(2), body > table > tbody > tr:nth-child(5)',
  2215. mimeType: 'text/html; charset=big5',
  2216. scrollDelta: 2000
  2217. }
  2218. }, // 动漫狂
  2219. cartoonmad_list: {
  2220. SiteTypeID: 0,
  2221. pager: {
  2222. type: 1,
  2223. nextLink: '//a[@class="pages"][contains(text(), "下一頁")]',
  2224. pageElement: 'css;td[background="/image/content_box4.gif"]+td > table > tbody > tr',
  2225. insertPosition: ['css;td[background="/image/content_box4.gif"]+td > table > tbody', 3],
  2226. replaceE: '//a[@class="pages"]/parent::td/parent::tr | //font[contains(text(), "目前在第")]',
  2227. mimeType: 'text/html; charset=big5',
  2228. scrollDelta: 1000
  2229. }
  2230. }, // 动漫狂 - 分类/搜索页
  2231. manhuacat: {
  2232. SiteTypeID: 0,
  2233. host: 'www.manhuacat.com',
  2234. functionStart: function() {if (/\/manga\/\d+\/.+\.html/.test(location.pathname)) {
  2235. if (getCookie('is_pull') == 'true') { // 强制关闭 [下拉] 模式
  2236. document.cookie='is_pull=false; expires=Thu, 18 Dec 2031 12:00:00 GMT; path=/'; // 写入 Cookie 关闭 [下拉] 模式
  2237. location.reload(); // 刷新网页
  2238. }
  2239. setTimeout(manhuacat_init, 100);
  2240. curSite = DBSite.manhuacat;
  2241. } else if (location.pathname.indexOf('/list') > -1) {
  2242. curSite = DBSite.manhuacat_list;
  2243. } else if (location.pathname.indexOf('/search') > -1 || location.pathname.indexOf('/update') > -1) {
  2244. curSite = DBSite.manhuacat_search;
  2245. }},
  2246. insStyle: '#left, #right, #pull-load, .loading, .pagination, footer {display: none !important;} .img-content > img {display: block !important;margin: 0 auto !important; border: none !important; padding: 0 !important; max-width: 99% !important; height: auto !important;}', // 隐藏不需要的元素,调整图片
  2247. pager: {
  2248. type: 4,
  2249. nextLink: manhuacat_functionNext,
  2250. insertPosition: ['css;.img-content', 3],
  2251. insertElement: manhuacat_insertElement,
  2252. replaceE: 'css;.comic-detail > .breadcrumb-bar, .comic-detail >h2.h4, title, .vg-r-data, body > script:not([src])',
  2253. intervals: 2000,
  2254. scrollDelta: 3000
  2255. }
  2256. }, // 漫画猫
  2257. manhuacat_list: {
  2258. SiteTypeID: 0,
  2259. pager: {
  2260. type: 1,
  2261. nextLink: '//div[contains(@class, "pagination")]//a[@href][contains(text(), "下一页") or contains(text(), "下页")]',
  2262. pageElement: 'css;.comic-main-section > *',
  2263. insertPosition: ['css;.comic-main-section', 3],
  2264. replaceE: 'css;.pagination',
  2265. scrollDelta: 1000
  2266. },
  2267. function: {
  2268. before: src_functionBefore,
  2269. parameter: [0, 'img[data-original]', 'data-original']
  2270. }
  2271. }, // 漫画猫 - 分类页
  2272. manhuacat_search: {
  2273. SiteTypeID: 0,
  2274. pager: {
  2275. type: 1,
  2276. nextLink: '//div[contains(@class, "pagination")]//a[@href][contains(text(), "下一页") or contains(text(), "下页")]',
  2277. pageElement: 'css;.comic-main-section .row > div',
  2278. insertPosition: ['css;.comic-main-section .row', 3],
  2279. replaceE: 'css;.pagination',
  2280. scrollDelta: 1000
  2281. }
  2282. }, // 漫画猫 - 搜索页
  2283. manhuadb: {
  2284. SiteTypeID: 0,
  2285. host: 'www.manhuadb.com',
  2286. functionStart: function() {if (/\/manhua\/\d+\/.+\.html/.test(location.pathname)) {
  2287. if (document.querySelector('img.img-fluid.show-pic')) document.querySelector('img.img-fluid.show-pic').style.display = 'none'; // 隐藏第一个图片(避免重复)
  2288. setTimeout(manhuadb_init, 100);
  2289. curSite = DBSite.manhuadb;
  2290. } else if (location.pathname.indexOf('/list') > -1) {
  2291. curSite = DBSite.manhuacat_list;
  2292. } else if (location.pathname.indexOf('/search') > -1 || location.pathname.indexOf('/update') > -1) {
  2293. curSite = DBSite.manhuacat_search;
  2294. }},
  2295. insStyle: '.row.m-0.pt-3.ad_2_wrap, .row.m-0.ad_1_wrap, .pagination.justify-content-center, #left, #right {display: none !important;}',
  2296. pager: {
  2297. type: 4,
  2298. nextLink: manhuadb_functionNext,
  2299. pageElement: 'css;body > script:not([type]):not([src]), .vg-r-data, ol.links-of-books.num_div',
  2300. insertPosition: ['css;.pjax-container', 3],
  2301. insertElement: manhuadb_insertElement,
  2302. intervals: 5000,
  2303. scrollDelta: 3000
  2304. }
  2305. }, // 漫画 DB
  2306. hicomic: {
  2307. SiteTypeID: 0,
  2308. host: 'www.hicomic.net',
  2309. functionStart: function() {if (location.pathname.indexOf('/chapters/') > -1) {
  2310. setTimeout(hicomic_init, 100);
  2311. curSite = DBSite.hicomic;
  2312. }},
  2313. insStyle: '.content {height: auto !important;} .footer, .left_cursor, .right_cursor, .finish {display: none !important;} .content > img {display: block !important;margin: 0 auto !important;}',
  2314. pager: {
  2315. type: 4,
  2316. nextLink: hicomic_functionNext,
  2317. insertPosition: ['css;.content', 3],
  2318. insertElement: hicomic_insertElement,
  2319. intervals: 5000,
  2320. scrollDelta: 3000
  2321. }
  2322. }, // HiComic (嗨漫画)
  2323. dmzj: {
  2324. SiteTypeID: 0,
  2325. host: 'www.dmzj.com',
  2326. functionStart: function() {if (location.pathname.indexOf('/view/') > -1) {
  2327. if (getCookie('display_mode') != '1') { // 强制开启 [上下滚动阅读] 模式
  2328. document.cookie='display_mode=1; expires=Thu, 18 Dec 2031 12:00:00 GMT; path=/'; // 写入 Cookie 开启 [上下滚动阅读] 模式
  2329. location.reload(); // 刷新网页
  2330. }
  2331. setTimeout(dmzj_init, 100);
  2332. curSite = DBSite.dmzj;
  2333. } else if (location.pathname.indexOf('/category') > -1 || location.pathname.indexOf('/update') > -1) {
  2334. curSite = DBSite.dmzj_list;
  2335. } else if (location.pathname.indexOf('/rank') > -1) {
  2336. curSite = DBSite.dmzj_rank;
  2337. }},
  2338. insStyle: 'p.mh_curr_page, .btmBtnBox, .float_code, #floatCode {display: none !important;} .comic_wraCon > img {display: block !important;margin: 0 auto !important; border: none !important; padding: 0 !important; max-width: 99% !important; height: auto !important;}', // 隐藏中间的页数信息
  2339. pager: {
  2340. type: 4,
  2341. nextLink: dmzj_functionNext,
  2342. insertPosition: ['css;.comic_wraCon', 3],
  2343. insertElement: dmzj_insertElement,
  2344. replaceE: 'css;.wrap_last_mid, .wrap_last_head, title',
  2345. intervals: 2000,
  2346. scrollDelta: 3000
  2347. }
  2348. }, // 动漫之家 - 原创
  2349. dmzj_list: {
  2350. SiteTypeID: 0,
  2351. insStyle: '.wrap_mhlist_l.con_left, .wrap_list {height: auto!important;}',
  2352. pager: {
  2353. type: 1,
  2354. nextLink: 'css;a.pg_next[href]',
  2355. pageElement: 'css;ul.list_con_li > li',
  2356. insertPosition: ['css;ul.list_con_li', 3],
  2357. replaceE: 'css;.page',
  2358. scrollDelta: 1000
  2359. }
  2360. }, // 动漫之家 - 原创 - 分类页
  2361. dmzj_rank: {
  2362. SiteTypeID: 0,
  2363. insStyle: '.wrap_mhlist_l.con_left {height: auto!important;}',
  2364. pager: {
  2365. type: 1,
  2366. nextLink: 'css;a.pg_next[href]',
  2367. pageElement: 'css;.ph_r_con_li > div:not(.ad_column)',
  2368. insertPosition: ['css;.ph_r_con_li', 3],
  2369. replaceE: 'css;.page',
  2370. scrollDelta: 1000
  2371. }
  2372. }, // 动漫之家 - 原创 - 排行榜
  2373. dmzj_manhua: {
  2374. SiteTypeID: 0,
  2375. host: 'manhua.dmzj.com',
  2376. functionStart: function() {if (/\/\d+\.shtml/.test(location.pathname)) {
  2377. let chapterScroll = document.getElementById('qiehuan_txt') // 强制为 [上下滚动阅读] 模式
  2378. if (chapterScroll && chapterScroll.textContent === '切换到上下滚动阅读') {chapterScroll.click();}
  2379. setTimeout(dmzj_manhua_init, 100);
  2380. curSite = DBSite.dmzj_manhua;
  2381. } else if (location.pathname.indexOf('/update') > -1) {
  2382. curSite = DBSite.dmzj_manhua_update;
  2383. }},
  2384. insStyle: 'p.curr_page, .btmBtnBox, .float_code, #floatCode {display: none !important;} #center_box > img {display: block !important;margin: 0 auto !important; border: none !important; padding: 0 !important; max-width: 99% !important; height: auto !important;}', // 隐藏中间的页数信息
  2385. pager: {
  2386. type: 4,
  2387. nextLink: dmzj_manhua_functionNext,
  2388. insertPosition: ['css;#center_box', 3],
  2389. insertElement: dmzj_manhua_insertElement,
  2390. replaceE: 'css;.display_graybg, title',
  2391. intervals: 2000,
  2392. scrollDelta: 3000
  2393. }
  2394. }, // 动漫之家 - 日漫
  2395. dmzj_manhua_update: {
  2396. SiteTypeID: 0,
  2397. pager: {
  2398. type: 1,
  2399. nextLink: '//div[@class="pages"]/a[contains(text(), "下一页")]',
  2400. pageElement: 'css;.newpic_content > *:not(.pages)',
  2401. insertPosition: ['css;.newpic_content', 3],
  2402. replaceE: 'css;.pages',
  2403. scrollDelta: 1000
  2404. }
  2405. }, //动漫之家 - 日漫 - 最新更新
  2406. copymanga: {
  2407. SiteTypeID: 0,
  2408. host: 'www.copymanga.com',
  2409. functionStart: function() {if (location.pathname.indexOf('/chapter/') > -1) {
  2410. curSite = DBSite.copymanga;
  2411. } else if (location.pathname.indexOf('/comics') > -1) {
  2412. curSite = DBSite.copymanga_list;
  2413. }},
  2414. insStyle: '.upMember, .comicContainerAds, .footer {display: none !important;}',
  2415. pager: {
  2416. type: 4,
  2417. nextLink: copymanga_functionNext,
  2418. insertPosition: ['css;ul.comicContent-image-list > li:first-child', 1],
  2419. insertElement: copymanga_insertElement,
  2420. replaceE: 'css;.disposableData, .disposablePass, .disposableUrlPrefix, .disposableUrlSuffix, .footer, h4.header, title',
  2421. intervals: 5000,
  2422. scrollDelta: 3000
  2423. }
  2424. }, // 拷贝漫画
  2425. copymanga_list: {
  2426. SiteTypeID: 0,
  2427. pager: {
  2428. type: 1,
  2429. nextLink: 'css;li.next > a[href]',
  2430. pageElement: 'css;.exemptComic-box > div',
  2431. insertPosition: ['css;.exemptComic-box', 3],
  2432. replaceE: 'css;ul.page-all',
  2433. scrollDelta: 1500
  2434. },
  2435. function: {
  2436. before: src_functionBefore,
  2437. parameter: [0, 'img[data-src]', 'data-src']
  2438. }
  2439. }, // 拷贝漫画 - 分类页
  2440. mhxqiu: {
  2441. SiteTypeID: 0,
  2442. host: 'www.mhxqiu.com',
  2443. functionStart: function() {if (/\/\d+\.html/.test(location.pathname)) { // 阅读页
  2444. curSite = DBSite.mhxqiu;
  2445. } else if (/\/\d+\/$/.test(location.pathname)) { // 目录页
  2446. setTimeout(function(){if (document.getElementById('zhankai')) document.getElementById('zhankai').click();}, 500)
  2447. } else if (/\/(sort|rank)\//.test(location.pathname)) { // 分类页
  2448. curSite = DBSite.mhxqiu_list;
  2449. }},
  2450. insStyle: '.imgFloat_1, .imgFloat_2, .main_control {display: none !important;} body {height: auto !important;}',
  2451. pager: {
  2452. type: 4,
  2453. nextLink: mhxqiu_functionNext,
  2454. insertPosition: ['css;#comicContain', 3],
  2455. insertElement: mhxqiu_insertElement,
  2456. replaceE: 'css;#mainControlNext, h1.chaptername_title, title',
  2457. intervals: 5000,
  2458. scrollDelta: 3000
  2459. }
  2460. }, // 漫画星球
  2461. mhxqiu_list: {
  2462. SiteTypeID: 0,
  2463. pager: {
  2464. type: 1,
  2465. nextLink: '//div[@class="NewPages"]//a[contains(text(), "下一页")]',
  2466. pageElement: 'css;.cy_list_mh > ul',
  2467. insertPosition: ['css;.cy_list_mh', 3],
  2468. replaceE: 'css;.NewPages',
  2469. scrollDelta: 1000
  2470. }
  2471. }, // 漫画星球 - 分类页
  2472. gufengmh: {
  2473. SiteTypeID: 0,
  2474. host: /gufengmh/,
  2475. functionStart: function() {if (/\/\d+.+\.html/.test(location.pathname)) {
  2476. let chapterScroll = document.getElementById('chapter-scroll') // 强制为 [下拉阅读] 模式
  2477. if (chapterScroll && chapterScroll.className === '') {chapterScroll.click();}
  2478. curSite = DBSite.gufengmh;
  2479. } else if (location.pathname.indexOf('/update') > -1 || location.pathname.indexOf('/list') > -1 || location.pathname.indexOf('/search') > -1) {
  2480. curSite = DBSite.gufengmh_list;
  2481. }},
  2482. insStyle: 'p.img_info {display: none !important;}', // 隐藏中间的页数信息
  2483. pager: {
  2484. type: 4,
  2485. nextLink: gufengmh_functionNext,
  2486. pageElement: 'css;body > script:first-child',
  2487. insertPosition: ['css;#images', 3],
  2488. insertElement: gufengmh_insertElement,
  2489. intervals: 5000,
  2490. scrollDelta: 4000
  2491. }
  2492. }, // 古风漫画网
  2493. gufengmh_list: {
  2494. SiteTypeID: 0,
  2495. pager: {
  2496. type: 1,
  2497. nextLink: 'css;li.next > a[href]',
  2498. pageElement: 'css;ul.book-list > li',
  2499. insertPosition: ['css;ul.book-list', 3],
  2500. replaceE: 'css;ul.pagination',
  2501. scrollDelta: 1000
  2502. }
  2503. }, // 古风漫画网 - 分类页
  2504. szcdmj: {
  2505. SiteTypeID: 0,
  2506. host: 'www.szcdmj.com',
  2507. functionStart: function() {if (location.pathname.indexOf('/szcchapter/') > -1) {curSite = DBSite.szcdmj;}},
  2508. insStyle: '.header {opacity: 0.3 !important;}',
  2509. pager: {
  2510. type: 1,
  2511. nextLink: '//div[@class="fanye"][1]/a[@href][text()="下一页" or text()="下一话"]',
  2512. pageElement: 'css;.comicpage > div,title',
  2513. insertPosition: ['css;.comicpage', 3],
  2514. replaceE: 'css;.fanye,h1.title',
  2515. scrollDelta: 2000
  2516. },
  2517. function: {
  2518. before: szcdmj_functionBefore
  2519. }
  2520. }, // 砂之船动漫家
  2521. mangabz: {
  2522. SiteTypeID: 0,
  2523. host: 'mangabz.com',
  2524. functionStart: function() {if (/\/m\d+/.test(location.pathname)) {
  2525. setTimeout(mangabz_init, 500);
  2526. curSite = DBSite.mangabz;
  2527. } else if (/\/\d+bz\//.test(location.pathname)) {
  2528. if (document.querySelector('.detail-list-form-more')) document.querySelector('.detail-list-form-more').click();
  2529. } else if (location.pathname.indexOf('/manga-list') > -1 || location.pathname === '/search') {
  2530. curSite = DBSite.mangabz_list;
  2531. }},
  2532. insStyle: 'body > .container > div:not([id]) {display: none !important;} .top-bar {opacity: 0.3 !important;} #cp_img > img{display: block !important;margin: 0 auto !important;width: auto !important; height: auto !important;}',
  2533. pager: {
  2534. type: 4,
  2535. nextLink: mangabz_functionNext,
  2536. insertPosition: ['css;#cp_img', 3],
  2537. insertElement: mangabz_insertElement,
  2538. replaceE: 'css;p.top-title, body > .container > div:not([id]), title',
  2539. intervals: 500,
  2540. scrollDelta: 1000
  2541. }
  2542. }, // Mangabz 漫画
  2543. mangabz_list: {
  2544. SiteTypeID: 0,
  2545. pager: {
  2546. type: 1,
  2547. nextLink: '//div[@class="page-pagination"]//a[@href][contains(text(), ">")]',
  2548. pageElement: 'css;ul.mh-list > li',
  2549. insertPosition: ['css;ul.mh-list', 3],
  2550. replaceE: 'css;.page-pagination',
  2551. scrollDelta: 800
  2552. }
  2553. }, // Mangabz 漫画 - 分类/搜索页
  2554. _423down: {
  2555. SiteTypeID: 0,
  2556. host: 'www.423down.com',
  2557. functionStart: function() {if (location.pathname.indexOf('.html') === -1) curSite = DBSite._423down;},
  2558. pager: {
  2559. type: 1,
  2560. nextLink: '//div[@class="paging"]//a[contains(text(),"下一页")][@href]',
  2561. pageElement: 'css;div.content-wrap ul.excerpt > li',
  2562. insertPosition: ['css;div.content-wrap ul.excerpt', 3],
  2563. replaceE: 'css;div.paging',
  2564. scrollDelta: 1500
  2565. }
  2566. }, // 423Down
  2567. iao_su: {
  2568. SiteTypeID: 0,
  2569. host: 'iao.su',
  2570. pager: {
  2571. type: 1,
  2572. nextLink: '//li[@class="btn btn-primary next"]//a[@href]',
  2573. pageElement: 'css;#index > article, #archive > article',
  2574. insertPosition: ['css;ol.page-navigator', 1],
  2575. replaceE: 'css;ol.page-navigator',
  2576. scriptType: 4,
  2577. scrollDelta: 1000
  2578. }
  2579. }, // 不死鸟
  2580. sharerw: {
  2581. SiteTypeID: 0,
  2582. host: 'www.sharerw.com',
  2583. functionStart: function() {if (location.pathname.indexOf('.html') === -1) {
  2584. if (location.pathname === '/search.php') {curSite = DBSite.sharerw_search;} else {curSite = DBSite.sharerw;};};},
  2585. pager: {
  2586. type: 1,
  2587. nextLink: 'css;span.next > a[href]',
  2588. pageElement: 'css;.new-post > article',
  2589. insertPosition: ['css;.new-post', 3],
  2590. replaceE: 'css;.pagebar',
  2591. scrollDelta: 1500
  2592. }
  2593. }, // 分享者
  2594. sharerw_search: {
  2595. SiteTypeID: 0,
  2596. pager: {
  2597. type: 1,
  2598. nextLink: 'css;span.next > a[href]',
  2599. pageElement: 'css;#mainbox > article',
  2600. insertPosition: ['css;.pagebar', 1],
  2601. replaceE: 'css;.pagebar',
  2602. scrollDelta: 1500
  2603. }
  2604. }, // 分享者 - 搜索页
  2605. extfans: {
  2606. SiteTypeID: 0,
  2607. host: 'www.extfans.com',
  2608. functionStart: function() {if (location.pathname != '/') {curSite = DBSite.extfans;}},
  2609. pager: {
  2610. type: 1,
  2611. nextLink: 'css;.page a[data-page="next"]',
  2612. pageElement: 'css;.side-left > ul[class*="-list"] > li',
  2613. insertPosition: ['css;.side-left > ul[class*="-list"]', 3],
  2614. replaceE: 'css;.page',
  2615. scrollDelta: 2000
  2616. }
  2617. }, // 扩展迷
  2618. chrome_zzzmh: {
  2619. SiteTypeID: 0,
  2620. host: 'chrome.zzzmh.cn',
  2621. pager: {
  2622. type: 2,
  2623. nextLink: 'button.more-btn',
  2624. intervals: 1000,
  2625. scrollDelta: 1500
  2626. }
  2627. }, // 极简插件
  2628. appinn: {
  2629. SiteTypeID: 0,
  2630. host: 'www.appinn.com',
  2631. pager: {
  2632. type: 1,
  2633. nextLink: '//a[@class="next page-numbers"][@href]',
  2634. pageElement: 'css;section#latest-posts > article',
  2635. insertPosition: ['css;nav.navigation.pagination', 1],
  2636. replaceE: 'css;div.nav-links',
  2637. scrollDelta: 1500
  2638. }
  2639. }, // 小众软件
  2640. isharepc: {
  2641. SiteTypeID: 0,
  2642. host: 'www.isharepc.com',
  2643. pager: {
  2644. type: 1,
  2645. nextLink: 'css;a.next[href]',
  2646. pageElement: 'css;.content > div',
  2647. insertPosition: ['css;nav.pagination', 1],
  2648. replaceE: 'css;nav.pagination',
  2649. scrollDelta: 1000
  2650. }
  2651. }, // 乐软博客
  2652. pc521: {
  2653. SiteTypeID: 0,
  2654. host: ['www.pc521.net', 'www.winos.me'],
  2655. functionStart: function() {if (location.search.slice(0,3) === '?s=') {curSite = DBSite.pc521_search;} else if (location.pathname.indexOf('.html') === -1) {curSite = DBSite.pc521;}},
  2656. pager: {
  2657. type: 2,
  2658. nextLink: 'div[id^="ias_trigger_"]',
  2659. intervals: 1000,
  2660. scrollDelta: 1000
  2661. }
  2662. }, // 不忘初心 + WINOS
  2663. pc521_search: {
  2664. SiteTypeID: 0,
  2665. pager: {
  2666. type: 1,
  2667. nextLink: 'css;a.next[href]',
  2668. pageElement: 'css;#main > ul > li',
  2669. insertPosition: ['css;#main > ul', 3],
  2670. replaceE: 'css;nav.pagination',
  2671. scrollDelta: 1500
  2672. }
  2673. }, // 不忘初心 - 搜索页
  2674. ghxi: {
  2675. SiteTypeID: 0,
  2676. host: 'www.ghxi.com',
  2677. functionStart: function() {if (location.pathname === '/' && !location.search) {curSite = DBSite.ghxi;} else {curSite = DBSite.ghxi_postlist;}},
  2678. pager: {
  2679. type: 2,
  2680. nextLink: '.load-more',
  2681. intervals: 1000,
  2682. scrollDelta: 5000
  2683. }
  2684. }, // 果核剥壳 - 首页
  2685. ghxi_postlist: {
  2686. SiteTypeID: 0,
  2687. pager: {
  2688. type: 1,
  2689. nextLink: 'css;a.next[href]',
  2690. pageElement: 'css;ul.post-loop > li',
  2691. insertPosition: ['css;ul.post-loop', 3],
  2692. replaceE: 'css;ul.pagination',
  2693. scrollDelta: 1500
  2694. },
  2695. function: {
  2696. before: src_functionBefore
  2697. }
  2698. }, // 果核剥壳 - 分类/搜索页
  2699. sixyin: {
  2700. SiteTypeID: 0,
  2701. host: 'www.sixyin.com',
  2702. functionStart: function() {if (location.pathname === '/' && location.search === '') { // 首页
  2703. curSite = DBSite.sixyin;
  2704. } else if (location.pathname.indexOf('.html') === -1) { // 分类页
  2705. curSite = DBSite.sixyin_postlist;
  2706. }},
  2707. pager: {
  2708. type: 2,
  2709. nextLink: '.load-more',
  2710. nextHTML: '点击查看更多',
  2711. scrollDelta: 1500
  2712. }
  2713. }, // 六音软件 - 首页
  2714. sixyin_postlist: {
  2715. SiteTypeID: 0,
  2716. pager: {
  2717. type: 1,
  2718. nextLink: '//a[@class="next"][@href]',
  2719. pageElement: 'css;ul.post-loop > li',
  2720. insertPosition: ['css;ul.post-loop', 3],
  2721. replaceE: 'css;ul.pagination',
  2722. scrollDelta: 1500
  2723. }
  2724. }, // 六音软件 - 分类页
  2725. weidown: {
  2726. SiteTypeID: 0,
  2727. host: 'www.weidown.com',
  2728. functionStart: function() {if (location.pathname.indexOf('/search/') > -1) { //搜索页
  2729. curSite = DBSite.weidown_search;
  2730. } else if (location.pathname.indexOf('/special') > -1) { // 专题页
  2731. curSite = DBSite.weidown_special;
  2732. } else {
  2733. curSite = DBSite.weidown;
  2734. }},
  2735. pager: {
  2736. type: 1,
  2737. nextLink: 'css;a.nextpage',
  2738. pageElement: 'css;.articleWrapper > .itemArticle, .articleWrapper > .richTextItem.search',
  2739. insertPosition: ['css;.articleWrapper', 3],
  2740. replaceE: 'css;#pageGroup',
  2741. scrollDelta: 1500
  2742. }
  2743. }, // 微当下载
  2744. weidown_search: {
  2745. SiteTypeID: 0,
  2746. pager: {
  2747. type: 1,
  2748. nextLink: 'css;a.nextpage',
  2749. pageElement: 'css;.articleListWrapper > .richTextItem.search',
  2750. insertPosition: ['css;#pageGroup', 1],
  2751. replaceE: 'css;#pageGroup',
  2752. scrollDelta: 700
  2753. }
  2754. }, // 微当下载 - 搜索页
  2755. weidown_special: {
  2756. SiteTypeID: 0,
  2757. pager: {
  2758. type: 1,
  2759. nextLink: 'css;a.nextpage',
  2760. pageElement: 'css;.special > .item, .articleWrapper > div',
  2761. insertPosition: ['css;.special, .articleWrapper', 3],
  2762. replaceE: 'css;#pageGroup',
  2763. scrollDelta: 700
  2764. }
  2765. }, // 微当下载 - 专题页
  2766. th_sjy: {
  2767. SiteTypeID: 0,
  2768. host: ['www.th-sjy.com', 'www.puresys.net'],
  2769. pager: {
  2770. type: 1,
  2771. nextLink: 'css;li.next-page > a',
  2772. pageElement: 'css;.content > article',
  2773. insertPosition: ['css;.pagination', 1],
  2774. replaceE: 'css;.pagination',
  2775. scrollDelta: 2000
  2776. },
  2777. function: {
  2778. before: src_functionBefore,
  2779. parameter: [0, 'img[data-src]', 'data-src']
  2780. }
  2781. }, // th-sjy 汉化 + Puresys
  2782. fsylr: {
  2783. SiteTypeID: 0,
  2784. host: 'fsylr.com',
  2785. functionStart: function() {if (location.pathname.indexOf('.html') === -1) {curSite = DBSite.fsylr;}},
  2786. pager: {
  2787. type: 1,
  2788. nextLink: 'css;a.next.page-numbers[href]',
  2789. pageElement: 'css;.posts-con > div:not([class*="posts-"])',
  2790. insertPosition: ['css;.posts-con', 3],
  2791. replaceE: 'css;nav.pagination',
  2792. scrollDelta: 1000
  2793. }
  2794. }, // 发烧友绿软
  2795. iplaysoft_postslist: {
  2796. SiteTypeID: 0,
  2797. host: 'www.iplaysoft.com',
  2798. functionStart: function() {if (location.pathname.indexOf('.html') > -1 || location.pathname.indexOf('/p/') > -1) { // 文章内
  2799. curSite = DBSite.iplaysoft_postcomments;
  2800. } else { // 其他页面
  2801. curSite = DBSite.iplaysoft_postslist;
  2802. }},
  2803. pager: {
  2804. type: 1,
  2805. nextLink: '//div[@class="pagenavi"]//a[@title="下一页"][@href]',
  2806. pageElement: 'css;#postlist > div.entry',
  2807. insertPosition: ['css;#postlist > .pagenavi-button', 1],
  2808. replaceE: 'css;.pagenavi-button, .pagenavi',
  2809. scrollDelta: 1200
  2810. },
  2811. function: {
  2812. before: src_functionBefore,
  2813. parameter: [0, 'img[data-src]', 'data-src']
  2814. }
  2815. }, // 异次元软件
  2816. iplaysoft_postcomments: {
  2817. SiteTypeID: 0,
  2818. pager: {
  2819. type: 2,
  2820. nextLink: '#loadHistoryComments',
  2821. nextTextOf: '展开后面',
  2822. scrollDelta: 1200
  2823. }
  2824. }, // 异次元软件 - 评论
  2825. mpyit: {
  2826. SiteTypeID: 0,
  2827. host: 'www.mpyit.com',
  2828. functionStart: function() {if (location.pathname === '/' && !location.search) {
  2829. curSite = DBSite.mpyit;
  2830. } else if (location.pathname.indexOf('/category/') > -1 || location.search.indexOf('?s=') > -1) { // 搜索页 / 分类页
  2831. curSite = DBSite.mpyit_category;
  2832. }},
  2833. pager: {
  2834. type: 1,
  2835. nextLink: '//a[@class="page-numbers"][@title="下一页"][@href]',
  2836. pageElement: 'css;#post > div[id^="post-"]',
  2837. insertPosition: ['css;#post > #pagenavi', 1],
  2838. replaceE: 'css;#post > #pagenavi',
  2839. scrollDelta: 1700
  2840. }
  2841. }, // 老殁 | 殁漂遥
  2842. mpyit_category: {
  2843. SiteTypeID: 0,
  2844. pager: {
  2845. type: 1,
  2846. nextLink: '//a[@class="page-numbers"][@title="下一页"][@href]',
  2847. pageElement: 'css;#content > div[class^="entry_box"]',
  2848. insertPosition: ['css;#content > #pagenavi', 1],
  2849. replaceE: 'css;#content > #pagenavi',
  2850. scrollDelta: 1700
  2851. }
  2852. }, // 老殁 | 殁漂遥 - 搜索页/分类页
  2853. yxssp: {
  2854. SiteTypeID: 0,
  2855. host: 'www.yxssp.com',
  2856. pager: {
  2857. type: 1,
  2858. nextLink: '//div[@class="page-nav td-pb-padding-side"]/a[last()][@href]',
  2859. pageElement: 'css;.td-modules-container.td-module-number4 > div',
  2860. insertPosition: ['css;.td-modules-container.td-module-number4', 3],
  2861. replaceE: 'css;.page-nav.td-pb-padding-side',
  2862. scrollDelta: 1000
  2863. }
  2864. }, // 异星软件空间
  2865. yrxitong: {
  2866. SiteTypeID: 0,
  2867. host: 'www.yrxitong.com',
  2868. functionStart: function() {
  2869. if (location.pathname === '/sr.jsp') {
  2870. curSite = DBSite.yrxitong_search;
  2871. } else if (location.pathname.indexOf('/h-nd-') === -1) {
  2872. curSite = DBSite.yrxitong;
  2873. }
  2874. },
  2875. pager: {
  2876. type: 1,
  2877. nextLink: 'css;span.pageNext > a',
  2878. pageElement: 'css;#containerFormsCenter .m_news_list > div',
  2879. insertPosition: ['css;#containerFormsCenter .m_news_list', 3],
  2880. replaceE: 'css;.pagenation',
  2881. scrollDelta: 1200
  2882. },
  2883. function: {
  2884. before: src_functionBefore,
  2885. parameter: [1, 'a[data-original]', 'data-original']
  2886. }
  2887. }, // 小鱼儿 yr 系统
  2888. yrxitong_search: {
  2889. SiteTypeID: 0,
  2890. pager: {
  2891. type: 1,
  2892. nextLink: 'css;span.pageNext > a',
  2893. pageElement: 'css;#containerFormsCenter .newsList > div',
  2894. insertPosition: ['css;#containerFormsCenter .newsList', 3],
  2895. replaceE: 'css;.pagenation',
  2896. scrollDelta: 2000
  2897. }
  2898. }, // 小鱼儿 yr 系统 - 搜索页
  2899. sordum: {
  2900. SiteTypeID: 0,
  2901. host: 'www.sordum.org',
  2902. pager: {
  2903. type: 1,
  2904. nextLink: '//a[@class="next page-numbers"][@href]',
  2905. pageElement: 'css;.article > article',
  2906. insertPosition: ['css;nav.navigation.posts-navigation', 1],
  2907. replaceE: 'css;nav.navigation.posts-navigation',
  2908. scrollDelta: 1500
  2909. }
  2910. }, // (下面这几个都是国外博客网站)
  2911. winaero: {
  2912. SiteTypeID: 0,
  2913. host: 'winaero.com',
  2914. functionStart: function() {if (location.pathname === '/blog/' || location.pathname.indexOf('/category/') > -1) curSite = DBSite.winaero;},
  2915. pager: {
  2916. type: 1,
  2917. nextLink: 'css;.nav-previous > a',
  2918. pageElement: 'css;#content > article',
  2919. insertPosition: ['css;#nav-below', 1],
  2920. replaceE: 'css;#nav-below',
  2921. scrollDelta: 1500
  2922. }
  2923. },
  2924. lrepacks: {
  2925. SiteTypeID: 0,
  2926. host: 'lrepacks.net',
  2927. functionStart: function() {if (location.pathname.indexOf('.html') === -1) curSite = DBSite.lrepacks;},
  2928. pager: {
  2929. type: 1,
  2930. nextLink: 'css;.page_next > a',
  2931. pageElement: 'css;#main .post-list article',
  2932. insertPosition: ['css;.page_nav', 1],
  2933. replaceE: 'css;.page_nav',
  2934. scrollDelta: 1500
  2935. },
  2936. function: {
  2937. before: lrepacks_functionBefore
  2938. }
  2939. },
  2940. winhelponline: {
  2941. SiteTypeID: 0,
  2942. host: 'www.winhelponline.com',
  2943. functionStart: function() {if (location.pathname === '/blog/') {curSite = DBSite.winhelponline;}},
  2944. pager: {
  2945. type: 1,
  2946. nextLink: 'css;span.prev > a[href]',
  2947. pageElement: 'css;#main > article',
  2948. insertPosition: ['css;nav.paging-navigation', 1],
  2949. replaceE: 'css;nav.paging-navigation',
  2950. scrollDelta: 2000
  2951. }
  2952. },
  2953. windowslatest: {
  2954. SiteTypeID: 0,
  2955. host: 'www.windowslatest.com',
  2956. pager: {
  2957. type: 1,
  2958. nextLink: '//div[contains(@class, "page-nav")]/a/i[@class="td-icon-menu-right"]/parent::a',
  2959. pageElement: 'css;.td-ss-main-content > div:not(.td-block-title-wrap):not(.page-nav)',
  2960. insertPosition: ['css;.page-nav', 1],
  2961. replaceE: 'css;.page-nav',
  2962. scrollDelta: 2000
  2963. }
  2964. },
  2965. thewindowsclub: {
  2966. SiteTypeID: 0,
  2967. host: 'www.thewindowsclub.com',
  2968. functionStart: function() {curSite = DBSite.thewindowsclub; if (location.pathname === '/') {curSite.pager.scrollDelta = 2000;}},
  2969. pager: {
  2970. type: 1,
  2971. nextLink: 'css;li.pagination-next > a',
  2972. pageElement: 'css;#genesis-content > article',
  2973. insertPosition: ['css;.pagination', 1],
  2974. replaceE: 'css;.pagination',
  2975. scrollDelta: 1500
  2976. }
  2977. },
  2978. gitee: {
  2979. SiteTypeID: 0,
  2980. host: 'search.gitee.com',
  2981. functionStart: function() {if (location.search) curSite = DBSite.gitee;},
  2982. pager: {
  2983. type: 1,
  2984. nextLink: 'css;li.next > a[href]',
  2985. pageElement: 'css;#hits-list > div',
  2986. insertPosition: ['css;#hits-list', 3],
  2987. replaceE: 'css;ul.pagination',
  2988. scrollDelta: 1000
  2989. }
  2990. }, // Gitee - 搜索页
  2991. github_star: {
  2992. SiteTypeID: 0,
  2993. host: 'github.com',
  2994. functionStart: function() {locationchange = true;
  2995. if (location.search.indexOf('tab=stars') > -1) {
  2996. curSite = DBSite.github_star;
  2997. } else if ((location.pathname.indexOf('/issues') > -1 && location.pathname.indexOf('/issues/') === -1) || (location.pathname.indexOf('/pulls') > -1 && location.pathname.indexOf('/pulls/') === -1)) {
  2998. curSite = DBSite.github_issues;
  2999. } else if (location.pathname.indexOf('/discussions') > -1 && !(/\/discussions\/\d+/.test(location.pathname)) && location.pathname.indexOf('new') === -1) {
  3000. curSite = DBSite.github_discussions;
  3001. } else if (location.pathname.indexOf('/releases') > -1 && location.pathname.indexOf('/releases/tag/') === -1 && location.pathname.indexOf('edit') === -1) {
  3002. curSite = DBSite.github_releases;
  3003. } else if (location.pathname.indexOf('/tags') > -1 && location.pathname.indexOf('/tags/') === -1) {
  3004. curSite = DBSite.github_tags;
  3005. } else if (location.pathname.indexOf('/commits') > -1) {
  3006. curSite = DBSite.github_commits;
  3007. } else if (location.pathname.indexOf('/search') > -1) {
  3008. if (!location.search) return
  3009. if (location.search.indexOf('type=Repositories') > -1 || location.search.indexOf('type=') === -1) {
  3010. curSite = DBSite.github_search;
  3011. } else if (location.search.indexOf('type=code') > -1) {
  3012. curSite = DBSite.github_search_code;
  3013. } else if (location.search.indexOf('type=commits') > -1) {
  3014. curSite = DBSite.github_search_commit;
  3015. } else if (location.search.indexOf('type=issues') > -1 || location.search.indexOf('type=discussions') > -1) {
  3016. curSite = DBSite.github_search_issue;
  3017. } else if (location.search.indexOf('type=registrypackages') > -1) {
  3018. curSite = DBSite.github_search_package;
  3019. } else if (location.search.indexOf('type=marketplace') > -1) {
  3020. curSite = DBSite.github_search_marketplace;
  3021. } else if (location.search.indexOf('type=topics') > -1) {
  3022. curSite = DBSite.github_search_topics;
  3023. } else if (location.search.indexOf('type=wikis') > -1) {
  3024. curSite = DBSite.github_search_wiki;
  3025. } else if (location.search.indexOf('type=users') > -1) {
  3026. curSite = DBSite.github_search_user;
  3027. }
  3028. }},
  3029. pager: {
  3030. type: 1,
  3031. nextLink: '//div[@class="paginate-container"]//a[@href][contains(text(), "Next")]',
  3032. pageElement: 'css;#js-pjax-container .position-relative div[class^="col-lg-"] > div:not(.position-relative):not(.paginate-container)',
  3033. insertPosition: ['css;.paginate-container', 1],
  3034. replaceE: 'css;.paginate-container',
  3035. scrollDelta: 3000
  3036. }
  3037. }, // Github - 用户 Star 列表
  3038. github_issues: {
  3039. SiteTypeID: 0,
  3040. pager: {
  3041. type: 1,
  3042. nextLink: 'css;a.next_page',
  3043. pageElement: 'css;.js-navigation-container.js-active-navigation-container > div[id^="issue_"]',
  3044. insertPosition: ['css;.js-navigation-container.js-active-navigation-container', 3],
  3045. replaceE: 'css;.pagination',
  3046. scrollDelta: 3000
  3047. }
  3048. }, // Github - Issues 列表 / PR 列表
  3049. github_discussions: {
  3050. SiteTypeID: 0,
  3051. pager: {
  3052. type: 1,
  3053. nextLink: 'css;a.next_page',
  3054. pageElement: 'css;#repo-content-pjax-container div[data-discussion-hovercards-enabled] > div',
  3055. insertPosition: ['css;#repo-content-pjax-container div[data-discussion-hovercards-enabled]', 3],
  3056. replaceE: 'css;.pagination',
  3057. scrollDelta: 3000
  3058. }
  3059. }, // Github - Discussions 列表
  3060. github_releases: {
  3061. SiteTypeID: 0,
  3062. pager: {
  3063. type: 1,
  3064. nextLink: '//div[@class="pagination"]/a[contains(text(), "Next")]',
  3065. pageElement: 'css;.repository-content >.position-relative > div',
  3066. insertPosition: ['css;.repository-content >.position-relative', 3],
  3067. replaceE: 'css;.pagination',
  3068. scrollDelta: 3000
  3069. }
  3070. }, // Github - Releases 列表
  3071. github_tags: {
  3072. SiteTypeID: 0,
  3073. pager: {
  3074. type: 1,
  3075. nextLink: '//div[@class="pagination"]/a[contains(text(), "Next")]',
  3076. pageElement: 'css;.repository-content > .Box > div.Box-row',
  3077. insertPosition: ['css;.repository-content > .Box', 3],
  3078. replaceE: 'css;.pagination',
  3079. scrollDelta: 3000
  3080. }
  3081. }, // Github - Tags 列表
  3082. github_commits: {
  3083. SiteTypeID: 0,
  3084. pager: {
  3085. type: 1,
  3086. nextLink: '//div[@class="paginate-container"]//a[contains(text(), "Older")]',
  3087. pageElement: 'css;div.js-navigation-container > div',
  3088. insertPosition: ['css;div.js-navigation-container', 3],
  3089. replaceE: 'css;.paginate-container',
  3090. scrollDelta: 3000
  3091. }
  3092. }, // Github - Commits 列表
  3093. github_search: {
  3094. SiteTypeID: 0,
  3095. pager: {
  3096. type: 1,
  3097. nextLink: 'css;a.next_page',
  3098. pageElement: 'css;ul.repo-list > li',
  3099. insertPosition: ['css;ul.repo-list', 3],
  3100. replaceE: 'css;.pagination',
  3101. scrollDelta: 1500
  3102. }
  3103. }, // Github - Search 列表
  3104. github_search_code: {
  3105. SiteTypeID: 0,
  3106. pager: {
  3107. type: 1,
  3108. nextLink: 'css;a.next_page',
  3109. pageElement: 'css;.code-list > div',
  3110. insertPosition: ['css;.code-list', 3],
  3111. replaceE: 'css;.pagination',
  3112. scrollDelta: 1500
  3113. }
  3114. }, // Github - Search 列表 - Code
  3115. github_search_commit: {
  3116. SiteTypeID: 0,
  3117. pager: {
  3118. type: 1,
  3119. nextLink: 'css;a.next_page',
  3120. pageElement: 'css;#commit_search_results > div',
  3121. insertPosition: ['css;#commit_search_results', 3],
  3122. replaceE: 'css;.pagination',
  3123. scrollDelta: 1500
  3124. }
  3125. }, // Github - Search 列表 - Commit
  3126. github_search_issue: {
  3127. SiteTypeID: 0,
  3128. pager: {
  3129. type: 1,
  3130. nextLink: 'css;a.next_page',
  3131. pageElement: 'css;.issue-list > div > div',
  3132. insertPosition: ['css;.issue-list > div', 3],
  3133. replaceE: 'css;.pagination',
  3134. scrollDelta: 1500
  3135. }
  3136. }, // Github - Search 列表 - Issues/Discussions
  3137. github_search_package: {
  3138. SiteTypeID: 0,
  3139. pager: {
  3140. type: 1,
  3141. nextLink: 'css;a.next_page',
  3142. pageElement: 'css;#package_search_results > div',
  3143. insertPosition: ['css;#package_search_results', 3],
  3144. replaceE: 'css;.pagination',
  3145. scrollDelta: 1500
  3146. }
  3147. }, // Github - Search 列表 - Package
  3148. github_search_marketplace: {
  3149. SiteTypeID: 0,
  3150. pager: {
  3151. type: 1,
  3152. nextLink: 'css;a.next_page',
  3153. pageElement: 'css;.issue-list > div',
  3154. insertPosition: ['css;.issue-list', 3],
  3155. replaceE: 'css;.pagination',
  3156. scrollDelta: 1500
  3157. }
  3158. }, // Github - Search 列表 - Marketplace
  3159. github_search_topics: {
  3160. SiteTypeID: 0,
  3161. pager: {
  3162. type: 1,
  3163. nextLink: 'css;a.next_page',
  3164. pageElement: 'css;.topic-list > div',
  3165. insertPosition: ['css;.topic-list', 3],
  3166. replaceE: 'css;.pagination',
  3167. scrollDelta: 1500
  3168. }
  3169. }, // Github - Search 列表 - Topics
  3170. github_search_wiki: {
  3171. SiteTypeID: 0,
  3172. pager: {
  3173. type: 1,
  3174. nextLink: 'css;a.next_page',
  3175. pageElement: 'css;#wiki_search_results > div:first-child > div',
  3176. insertPosition: ['css;#wiki_search_results > div:first-child', 3],
  3177. replaceE: 'css;.pagination',
  3178. scrollDelta: 1500
  3179. }
  3180. }, // Github - Search 列表 - wiki
  3181. github_search_user: {
  3182. SiteTypeID: 0,
  3183. pager: {
  3184. type: 1,
  3185. nextLink: 'css;a.next_page',
  3186. pageElement: 'css;#user_search_results > div:first-child > div',
  3187. insertPosition: ['css;#user_search_results > div:first-child', 3],
  3188. replaceE: 'css;.pagination',
  3189. scrollDelta: 1500
  3190. }
  3191. }, // Github - Search 列表 - user
  3192. stackoverflow: {
  3193. SiteTypeID: 0,
  3194. host: 'stackoverflow.com',
  3195. functionStart: function() {if (location.pathname.indexOf('/questions') > -1) {
  3196. curSite = DBSite.stackoverflow;
  3197. } else if (location.pathname === '/search') {
  3198. curSite = DBSite.stackoverflow_search;
  3199. } else if (location.pathname === '/tags') {
  3200. curSite = DBSite.stackoverflow_tags;
  3201. } else if (location.pathname === '/users') {
  3202. curSite = DBSite.stackoverflow_users;
  3203. }},
  3204. pager: {
  3205. type: 1,
  3206. nextLink: 'css;a[href][rel="next"]',
  3207. pageElement: 'css;#questions > div',
  3208. insertPosition: ['css;#questions', 3],
  3209. replaceE: 'css;.pager',
  3210. scrollDelta: 1500
  3211. }
  3212. }, // StackOverflow - Questions
  3213. stackoverflow_tags: {
  3214. SiteTypeID: 0,
  3215. pager: {
  3216. type: 1,
  3217. nextLink: 'css;a[href][rel="next"]',
  3218. pageElement: 'css;#tags-browser > div',
  3219. insertPosition: ['css;#tags-browser', 3],
  3220. replaceE: 'css;.pager',
  3221. scrollDelta: 1500
  3222. }
  3223. }, // StackOverflow - Tags
  3224. stackoverflow_users: {
  3225. SiteTypeID: 0,
  3226. pager: {
  3227. type: 1,
  3228. nextLink: 'css;a[href][rel="next"]',
  3229. pageElement: 'css;#user-browser > div:first-child > div',
  3230. insertPosition: ['css;#user-browser > div:first-child', 3],
  3231. replaceE: 'css;.pager',
  3232. scrollDelta: 1500
  3233. }
  3234. }, // StackOverflow - Users
  3235. stackoverflow_search: {
  3236. SiteTypeID: 0,
  3237. pager: {
  3238. type: 1,
  3239. nextLink: 'css;a[href][rel="next"]',
  3240. pageElement: 'css;.js-search-results > div:first-child > div',
  3241. insertPosition: ['css;.js-search-results > div:first-child', 3],
  3242. replaceE: 'css;.pager',
  3243. scrollDelta: 1500
  3244. }
  3245. }, // StackOverflow - Search
  3246. segmentfault: {
  3247. SiteTypeID: 0,
  3248. host: 'segmentfault.com',
  3249. functionStart: function() {locationchange = true;
  3250. if (location.pathname.indexOf('/questions') > -1) {
  3251. curSite = DBSite.segmentfault;
  3252. } else if (location.pathname === '/search') {
  3253. curSite = DBSite.segmentfault_search;
  3254. }},
  3255. pager: {
  3256. type: 1,
  3257. nextLink: '//a[@class="page-link"][contains(text(), "下一页")]',
  3258. pageElement: 'css;ul.list-group > li',
  3259. insertPosition: ['css;ul.list-group', 3],
  3260. replaceE: 'css;ul.pagination',
  3261. scrollDelta: 1000
  3262. }
  3263. }, // SegmentFault - Questions
  3264. segmentfault_search: {
  3265. SiteTypeID: 0,
  3266. pager: {
  3267. type: 1,
  3268. nextLink: 'css;a[href][rel="next"]',
  3269. pageElement: 'css;.search-result > section',
  3270. insertPosition: ['css;.search-result > div:last-child', 1],
  3271. replaceE: 'css;ul.pagination',
  3272. scrollDelta: 1000
  3273. }
  3274. }, // SegmentFault - Search
  3275. libgen: {
  3276. SiteTypeID: 0,
  3277. host: /libgen/,
  3278. functionStart: function() {if (location.pathname === '/search.php') {curSite = DBSite.libgen;}},
  3279. pager: {
  3280. type: 1,
  3281. nextLink: '//font/a[@href][contains(text(), "►")]',
  3282. pageElement: 'css;table[rules="rows"] > tbody > tr:nth-of-type(n+2), .paginator+script:not([src])',
  3283. insertPosition: ['css;table[rules="rows"] > tbody', 3],
  3284. replaceE: '//td[./font/a[@href][contains(text(), "►")]]',
  3285. scriptType: 2,
  3286. history: true,
  3287. scrollDelta: 2000
  3288. }
  3289. }, // 学术
  3290. pubmed: {
  3291. SiteTypeID: 0,
  3292. host: 'pubmed.ncbi.nlm.nih.gov',
  3293. pager: {
  3294. type: 2,
  3295. nextLink: 'button.load-button.next-page',
  3296. nextText: 'Show more',
  3297. scrollDelta: 1500
  3298. }
  3299. }, // 学术
  3300. google_scholar: {
  3301. SiteTypeID: 0,
  3302. pager: {
  3303. type: 1,
  3304. nextLink: '//a[./span[@class="gs_ico gs_ico_nav_next"]]',
  3305. pageElement: 'css;#gs_res_ccl_mid > *',
  3306. insertPosition: ['css;#gs_res_ccl_mid', 3],
  3307. replaceE: 'id("gs_n")',
  3308. scriptType: 1,
  3309. scrollDelta: 2000
  3310. }
  3311. }, // 谷歌学术
  3312. bing_academic: {
  3313. SiteTypeID: 0,
  3314. insStyle: 'li.aca_algo_count {display: none !important;}',
  3315. pager: {
  3316. type: 1,
  3317. nextLink: 'css;a.sb_pagN[href]',
  3318. pageElement: 'css;#b_results > li.aca_algo',
  3319. insertPosition: ['css;#b_results .b_pag', 1],
  3320. replaceE: 'css;#b_results .b_pag',
  3321. scrollDelta: 1000
  3322. }
  3323. }, // 必应学术
  3324. baidu_xueshu: {
  3325. SiteTypeID: 0,
  3326. host: 'xueshu.baidu.com',
  3327. functionStart: function() {if (location.pathname === '/s') {
  3328. curSite = DBSite.baidu_xueshu;
  3329. } else if (location.pathname.indexOf('journal/navigation') > -1) {
  3330. curSite = DBSite.baidu_xueshu_journal;
  3331. } else if (location.pathname.indexOf('paper/show') > -1) {
  3332. curSite = DBSite.baidu_xueshu_paper;
  3333. }},
  3334. pager: {
  3335. type: 1,
  3336. nextLink: 'id("page")/a[./i[@class="c-icon-pager-next"]][@href]',
  3337. pageElement: 'css;#bdxs_result_lists > div.result',
  3338. insertPosition: ['css;#bdxs_result_lists', 3],
  3339. replaceE: 'css;#page',
  3340. history: true,
  3341. scrollDelta: 1000
  3342. }
  3343. }, // 百度学术
  3344. baidu_xueshu_journal: {
  3345. SiteTypeID: 0,
  3346. pager: {
  3347. type: 1,
  3348. nextLink: 'css;a.res-page-next[href]',
  3349. pageElement: 'css;#journaldetail > div',
  3350. insertPosition: ['css;#journaldetail', 3],
  3351. replaceE: 'css;.res-page',
  3352. history: true,
  3353. scrollDelta: 1000
  3354. }
  3355. }, // 百度学术
  3356. baidu_xueshu_paper: {
  3357. SiteTypeID: 0,
  3358. pager: {
  3359. type: 2,
  3360. nextLink: 'div:not([style*="display: none"]) > .more_btn',
  3361. nextText: '加载更多',
  3362. scrollDelta: 1000
  3363. }
  3364. }, // 百度学术
  3365. so_xueshu: {
  3366. SiteTypeID: 0,
  3367. host: 'xueshu.so.com',
  3368. functionStart: function() {if (location.pathname === '/s') {curSite = DBSite.so_xueshu;}},
  3369. pager: {
  3370. type: 1,
  3371. nextLink: 'css;a#snext[href]',
  3372. pageElement: 'css;ul.list > li',
  3373. insertPosition: ['css;ul.list', 3],
  3374. replaceE: 'css;#page',
  3375. scrollDelta: 1000
  3376. }
  3377. }, // 360 学术
  3378. wikihow: {
  3379. SiteTypeID: 0,
  3380. host: ['www.wikihow.com', 'zh.wikihow.com'],
  3381. functionStart: function() {if (location.pathname.indexOf('/Category:') > -1) {
  3382. curSite = DBSite.wikihow;
  3383. } else if (location.pathname.indexOf('/wikiHowTo') > -1 && location.search.indexOf('?search=') > -1) {
  3384. curSite = DBSite.wikihow_search;
  3385. }},
  3386. pager: {
  3387. type: 1,
  3388. nextLink: 'css;a.pag_next',
  3389. pageElement: 'css;#cat_all > .cat_grid > div',
  3390. insertPosition: ['css;#cat_all > .cat_grid', 3],
  3391. replaceE: 'css;#large_pagination',
  3392. scriptType: 4,
  3393. scrollDelta: 2000
  3394. }
  3395. }, // 指南
  3396. wikihow_search: {
  3397. SiteTypeID: 0,
  3398. pager: {
  3399. type: 1,
  3400. nextLink: 'css;#searchresults_footer > a.buttonright',
  3401. pageElement: 'css;#searchresults_list > a',
  3402. insertPosition: ['css;#searchresults_list', 3],
  3403. replaceE: 'css;#searchresults_footer',
  3404. scrollDelta: 3000
  3405. }
  3406. }, // 指南 - 搜索页
  3407. afreecatv: {
  3408. SiteTypeID: 0,
  3409. host: 'www.afreecatv.com',
  3410. pager: {
  3411. type: 2,
  3412. nextLink: '.btn-more > button',
  3413. intervals: 2000,
  3414. scrollDelta: 1000
  3415. }
  3416. }, // 直播
  3417. greasyfork: {
  3418. SiteTypeID: 0,
  3419. host: 'greasyfork.org',
  3420. functionStart: function() {if (/\/scripts$/.test(location.pathname) || location.pathname.indexOf('/scripts/by-site/') > -1) {
  3421. curSite = DBSite.greasyfork;
  3422. } else if (/\/feedback$/.test(location.pathname)) {
  3423. curSite = DBSite.greasyfork_feedback;
  3424. } else if (location.pathname.indexOf('/discussions') > -1 && !(/\/\d+/.test(location.pathname))) {
  3425. curSite = DBSite.greasyfork_discussions;
  3426. }},
  3427. pager: {
  3428. type: 1,
  3429. nextLink: '//a[@class="next_page"][@href]',
  3430. pageElement: 'css;ol#browse-script-list > li',
  3431. insertPosition: ['css;ol#browse-script-list', 3],
  3432. replaceE: 'css;.pagination',
  3433. scrollDelta: 1000
  3434. }
  3435. }, // 脚本
  3436. greasyfork_feedback: {
  3437. SiteTypeID: 0,
  3438. pager: {
  3439. type: 1,
  3440. nextLink: '//a[@class="next_page"][@href]',
  3441. pageElement: 'css;.script-discussion-list > div',
  3442. insertPosition: ['css;.script-discussion-list', 3],
  3443. replaceE: 'css;.pagination',
  3444. scrollDelta: 1500
  3445. }
  3446. }, // 脚本 - 反馈页
  3447. greasyfork_discussions: {
  3448. SiteTypeID: 0,
  3449. pager: {
  3450. type: 1,
  3451. nextLink: '//a[@class="next_page"][@href]',
  3452. pageElement: 'css;.discussion-list > div',
  3453. insertPosition: ['css;.discussion-list', 3],
  3454. replaceE: 'css;.pagination',
  3455. scrollDelta: 1000
  3456. }
  3457. }, // 脚本 - 讨论页
  3458. ruyile_xuexiao: {
  3459. SiteTypeID: 0,
  3460. host: 'www.ruyile.com',
  3461. functionStart: function() {
  3462. if (location.pathname === '/xuexiao/') {
  3463. curSite = DBSite.ruyile_xuexiao;
  3464. } else if (location.pathname === '/data/') {
  3465. curSite = DBSite.ruyile_data;
  3466. } else if (location.pathname === '/shijuan/') {
  3467. curSite = DBSite.ruyile_shijuan;
  3468. }},
  3469. pager: {
  3470. type: 1,
  3471. nextLink: '//div[@class="fy"]/a[contains(text(), "下一页")][@href]',
  3472. pageElement: 'css;.xxlb > .sk',
  3473. insertPosition: ['css;.xxlb', 3],
  3474. replaceE: 'css;.fy',
  3475. scrollDelta: 1000
  3476. }
  3477. }, // 如意了教育 - 学校
  3478. ruyile_data: {
  3479. SiteTypeID: 0,
  3480. pager: {
  3481. type: 1,
  3482. nextLink: '//div[@class="fy"]/a[contains(text(), "下一页")][@href]',
  3483. pageElement: 'css;.m1_z > .lbk',
  3484. insertPosition: ['css;.page', 1],
  3485. replaceE: 'css;.fy',
  3486. scrollDelta: 1000
  3487. }
  3488. }, // 如意了教育 - 数据
  3489. ruyile_shijuan: {
  3490. SiteTypeID: 0,
  3491. pager: {
  3492. type: 1,
  3493. nextLink: '//div[@class="fy"]/a[contains(text(), "下一页")][@href]',
  3494. pageElement: 'css;.m1_z > .m2_lb',
  3495. insertPosition: ['css;.page', 1],
  3496. replaceE: 'css;.fy',
  3497. scrollDelta: 1000
  3498. }
  3499. }, // 如意了教育 - 试卷
  3500. w3school_cn: {
  3501. SiteTypeID: 0,
  3502. host: 'www.w3school.com.cn',
  3503. functionStart: function() {if (location.pathname.split('/').length > 2) {curSite = DBSite.w3school_cn;}},
  3504. pager: {
  3505. type: 1,
  3506. nextLink: function() { // 过滤部分非本页的参考手册
  3507. let next = document.querySelector('li.next > a')
  3508. if (next.href.indexOf('/index.') === -1) return next.href;
  3509. curSite = {SiteTypeID: 0}; return ''
  3510. },
  3511. pageElement: 'css;#maincontent > h1, #maincontent > div:not(#tpn):not(#bpn)',
  3512. insertPosition: ['css;#bpn', 1],
  3513. replaceE: 'css;ul.prenext, #navsecond, head > title',
  3514. history: true,
  3515. forceHTTPS: true,
  3516. scrollDelta: 2000
  3517. }
  3518. }, // W3school
  3519. runoob: {
  3520. SiteTypeID: 0,
  3521. host: 'www.runoob.com',
  3522. functionStart: function() {if (location.pathname.split('/').length > 2) {
  3523. curSite = DBSite.runoob;
  3524. }},
  3525. insStyle: '#comments, #postcomments, #respond, #footer {display: none !important;} .article-intro h1:not(:nth-of-type(1)) {margin: 30px 0 10px 0;}',
  3526. pager: {
  3527. type: 1,
  3528. nextLink: function() { // 过滤部分非本页的参考手册
  3529. let next = document.querySelector('#leftcolumn > a[style]~a')
  3530. if (next.href.split('/').length === location.href.split('/').length && next.href.split('/')[3] === location.href.split('/')[3]) return next.href;
  3531. next.href = location.href; curSite = {SiteTypeID: 0}; return ''
  3532. },
  3533. pageElement: 'css;#content > *',
  3534. insertPosition: ['css;#content', 3],
  3535. replaceE: 'css;.previous-next-links, #leftcolumn, head > title',
  3536. history: true,
  3537. forceHTTPS: true,
  3538. scrollDelta: 1000
  3539. },
  3540. function: {
  3541. after: function() { // 左侧栏高亮当前页面标题
  3542. let title = document.title.split(' | '); if (title.length > 1) {title = title[0]; document.querySelectorAll('#leftcolumn > a').forEach(function(e){if (e.innerText === title) {e.style = 'background-color: rgb(150, 185, 125); font-weight: bold; color: rgb(255, 255, 255);';}})}
  3543. }
  3544. }
  3545. }, // 菜鸟教程
  3546. netbian: {
  3547. SiteTypeID: 0,
  3548. host: 'pic.netbian.com',
  3549. insStyle: 'li.nextpage {display: none !important;}',
  3550. pager: {
  3551. type: 1,
  3552. nextLink: '//div[@class="page"]/a[contains(text(),"下一页")]',
  3553. pageElement: 'css;.slist ul > li:not(.nextpage)',
  3554. insertPosition: ['css;.slist ul', 3],
  3555. replaceE: 'css;.page',
  3556. mimeType: 'text/html; charset=gbk',
  3557. scrollDelta: 1000
  3558. }
  3559. }, // 彼岸图网
  3560. ioliu: {
  3561. SiteTypeID: 0,
  3562. host: 'bing.ioliu.cn',
  3563. functionStart: function() {if (location.pathname.indexOf('/photo/') === -1 && location.pathname.indexOf('.html') === -1) {curSite = DBSite.ioliu; document.head.appendChild(document.createElement('base')).target = '_blank';}},
  3564. insStyle: '.progressive--not-loaded {filter: none !important;}',
  3565. pager: {
  3566. type: 1,
  3567. nextLink: '//div[@class="page"]/a[@href][contains(text(), "下一页")]',
  3568. pageElement: 'css;body > .container > div.item',
  3569. insertPosition: ['css;body > .container', 3],
  3570. replaceE: 'css;.page',
  3571. scrollDelta: 1000
  3572. }
  3573. }, // 必应壁纸
  3574. nastol: {
  3575. SiteTypeID: 0,
  3576. host: 'www.nastol.com.ua',
  3577. pager: {
  3578. type: 1,
  3579. nextLink: '//a[./span[@class="nav-next"]]',
  3580. pageElement: 'css;#dle-content > div',
  3581. insertPosition: ['css;#dle-content > noindex', 1],
  3582. replaceE: 'css;.navigation',
  3583. mimeType: 'text/html; charset=windows-1251',
  3584. scrollDelta: 1000
  3585. }
  3586. }, // 壁纸
  3587. hdqwalls: {
  3588. SiteTypeID: 0,
  3589. host: 'hdqwalls.com',
  3590. pager: {
  3591. type: 1,
  3592. nextLink: 'css;a#next',
  3593. pageElement: 'css;.wallpapers_container > div.wall-resp',
  3594. insertPosition: ['css;div.pagination_container, .wallpapers_container > div.wall-resp+div:not(.wall-resp)', 1],
  3595. replaceE: 'css;ul.pagination',
  3596. scrollDelta: 1000
  3597. }
  3598. }, // 壁纸
  3599. fnvshen: {
  3600. SiteTypeID: 0,
  3601. host: 'www.fnvshen.com',
  3602. functionStart: function() {
  3603. if (location.pathname.indexOf('/gallery/') > -1 || location.pathname.indexOf('/tag/') > -1) {
  3604. curSite = DBSite.fnvshen;
  3605. } else if (location.pathname.indexOf('/g/') > -1) {
  3606. curSite = DBSite.fnvshen_g;
  3607. } else if (/\/article\/\d+\//.test(location.pathname)) {
  3608. curSite = DBSite.fnvshen_article;
  3609. } else if (location.pathname.indexOf('/article/') > -1) {
  3610. curSite = DBSite.fnvshen_article_list;
  3611. }},
  3612. pager: {
  3613. type: 1,
  3614. nextLink: '//div[@class="pagesYY"]//a[@href][contains(text(), "下一页")]',
  3615. pageElement: 'css;#listdiv > ul > li',
  3616. insertPosition: ['css;#listdiv > ul', 3],
  3617. replaceE: 'css;.pagesYY',
  3618. scrollDelta: 1000
  3619. },
  3620. function: {
  3621. before: src_functionBefore,
  3622. parameter: [0, 'img[data-original]', 'data-original']
  3623. }
  3624. }, // 宅男女神
  3625. fnvshen_g: {
  3626. SiteTypeID: 0,
  3627. insStyle: '.yalayi_box {display: none !important; margin: -4px 0 !important;}',
  3628. pager: {
  3629. type: 1,
  3630. nextLink: 'id("pages")/a[@href][contains(text(), "下一页")]',
  3631. pageElement: 'css;#hgallery > img',
  3632. insertPosition: ['css;#hgallery', 3],
  3633. replaceE: 'css;#pages',
  3634. scrollDelta: 1000
  3635. }
  3636. }, // 宅男女神 - 图片内
  3637. fnvshen_article_list: {
  3638. SiteTypeID: 0,
  3639. pager: {
  3640. type: 1,
  3641. nextLink: '//div[@class="pagesYY"]//a[@href][contains(text(), "下一页")]',
  3642. pageElement: 'css;li.other_girlli',
  3643. insertPosition: ['//ul[./li[@class="other_girlli"]]', 3],
  3644. replaceE: 'css;.pagesYY',
  3645. scrollDelta: 1000
  3646. }
  3647. }, //宅男女神 - 文章列表
  3648. fnvshen_article: {
  3649. SiteTypeID: 0,
  3650. pager: {
  3651. type: 1,
  3652. nextLink: 'css;.pagesYY a.cur+a',
  3653. pageElement: 'css;#articleDiv',
  3654. insertPosition: ['css;#articleDiv', 5],
  3655. replaceE: 'css;.pagesYY',
  3656. scrollDelta: 1000
  3657. }
  3658. }, // 宅男女神 - 文章内
  3659. zhutix: {
  3660. SiteTypeID: 0,
  3661. host: 'zhutix.com',
  3662. functionStart: function() {if (document.getElementById('primary-home')) {
  3663. curSite = DBSite.zhutix_postlist;
  3664. } else {
  3665. curSite = DBSite.zhutix;
  3666. }},
  3667. pager: {
  3668. type: 1,
  3669. nextLink: '//li[@class="next-page"]/a | //div[@class="btn-pager"]/a[contains(text(), "❯")]',
  3670. pageElement: 'css;#post-list > ul > li',
  3671. insertPosition: ['css;#post-list > ul', 3],
  3672. replaceE: 'css;.pagination, .b2-pagenav.post-nav',
  3673. scrollDelta: 1500
  3674. }
  3675. }, // 致美化
  3676. zhutix_postlist: {
  3677. SiteTypeID: 0,
  3678. pager: {
  3679. type: 1,
  3680. nextLink: '//li[@class="next-page"]/a',
  3681. pageElement: 'css;#primary-home > div:not(.pagination)',
  3682. insertPosition: ['css;.pagination', 1],
  3683. replaceE: 'css;.pagination',
  3684. scrollDelta: 1500
  3685. }
  3686. } // 致美化 - 文章列表
  3687. };
  3688. // 生成 SiteTypeID
  3689. generateID();
  3690. // 用于脚本判断(针对部分特殊的网站)
  3691. SiteType = {
  3692. BAIDU_TIEBA: DBSite.baidu_tieba.SiteTypeID,
  3693. GAMERSKY_GL: DBSite.gamersky_gl.SiteTypeID
  3694. };
  3695. }
  3696.  
  3697.  
  3698. if (webType != 1) {
  3699. // < 所有 Discuz!论坛 >
  3700. if (webType === 2) {
  3701. if (document.querySelector('body[id="nv_forum"][class^="pg_"][onkeydown*="27"]')) {
  3702. switch (document.querySelector('body[id="nv_forum"][class^="pg_"][onkeydown*="27"]').className) {
  3703. case 'pg_forumdisplay': // < 各版块帖子列表 >
  3704. discuzForum(); break;
  3705. case 'pg_viewthread': // < 帖子内 >
  3706. if (GM_getValue('menu_discuz_thread_page')) curSite = DBSite.discuz_thread; break;
  3707. case 'pg_guide': // < 导读帖子列表等 >
  3708. curSite = DBSite.discuz_guide; break;
  3709. case 'pg_collection': // < 淘贴列表 >
  3710. curSite = DBSite.discuz_collection; break;
  3711. }
  3712. }
  3713. // 如果上面没有匹配的则继续 < 搜索结果 >
  3714. if (curSite.SiteTypeID === 0) {
  3715. if (location.pathname.indexOf('search') > -1 || document.querySelector('body[id="nv_search"][onkeydown*="27"]')) {
  3716. curSite = DBSite.discuz_search;
  3717. }
  3718. }
  3719. // 如果上面没有匹配的则继续
  3720. if (curSite.SiteTypeID === 0) {
  3721. if (location.pathname.indexOf('.html') > -1) { // 判断是不是静态网页(.html 结尾)
  3722. if (location.pathname.indexOf('/forum-') > -1) { // < 各版块帖子列表 >
  3723. discuzForum();
  3724. } else if (location.pathname.indexOf('/thread-') > -1) { // < 帖子内 >
  3725. if (GM_getValue('menu_discuz_thread_page')) curSite = DBSite.discuz_thread;
  3726. }
  3727. }
  3728. }
  3729. // 如果上面没有匹配的则继续
  3730. if (curSite.SiteTypeID === 0) {
  3731. if (location.search.indexOf('mod=forumdisplay') > -1 || location.pathname.indexOf('forumdisplay.php') > -1) { // < 各版块帖子列表 >
  3732. discuzForum();
  3733. } else if (location.search.indexOf('mod=viewthread') > -1 || location.pathname.indexOf('viewthread.php') > -1) { // < 帖子内 >
  3734. if (GM_getValue('menu_discuz_thread_page')) curSite = DBSite.discuz_thread;
  3735. } else if (location.search.indexOf('mod=guide') > -1) { // < 导读帖子列表 >
  3736. curSite = DBSite.discuz_guide;
  3737. } else if(location.search.indexOf('mod=space') > -1 && location.search.indexOf('do=thread') > -1) { // 别人的主题/回复
  3738. curSite = DBSite.discuz_youspace;
  3739. } else if (location.search.indexOf('mod=collection') > -1) { // < 淘贴列表 >
  3740. curSite = DBSite.discuz_collection;
  3741. } else if (document.getElementById('threadlist')) { // < 部分论坛的各板块 URL 是自定义的 >
  3742. discuzForum();
  3743. } else if (document.getElementById('postlist')) { // < 部分论坛的帖子内 URL 是自定义的 >
  3744. if (GM_getValue('menu_discuz_thread_page')) curSite = DBSite.discuz_thread;
  3745. }
  3746. }
  3747. // < 所有 Flarum 论坛 >
  3748. } else if (webType === 3) {
  3749. DBSite.flarum.functionStart()
  3750. // < 所有使用 WordPress DUX 主题的网站 >
  3751. } else if (webType === 4) {
  3752. if (location.pathname.indexOf('.html') === -1) curSite = DBSite.dux;
  3753. if (location.host === 'apphot.cc') curSite.pager.scrollDelta = 2500; // 对于速度慢的网站,需要增加翻页敏感度
  3754. }
  3755. }
  3756.  
  3757. if (GM_getValue('menu_page_number')) {pageNumber('add');} else {pageNumber('set');} // 显示页码
  3758. pausePageEvent(); // 左键双击网页空白处暂停翻页
  3759.  
  3760. if (locationchange) { // 对于使用 pjax 技术的网站,需要监听 URL 变化来重新判断翻页规则
  3761. nowLocation = location.href
  3762. addLocationchange(); // 自定义 locationchange 事件
  3763. if (webType === 1) {
  3764. window.addEventListener('locationchange', function(){
  3765. if (nowLocation != location.href) {
  3766. nowLocation = location.href; curSite = {SiteTypeID: 0}; pageNum.now = 1; // 重置规则+页码
  3767. registerMenuCommand(); // 重新判断规则
  3768. curSite.pageUrl = ''; // 下一页URL
  3769. pageLoading(); // 自动无缝翻页
  3770.  
  3771. if (GM_getValue('menu_page_number')) {pageNumber('add');} else {pageNumber('set');} // 显示页码
  3772. pausePageEvent(); // 左键双击网页空白处暂停翻页
  3773. }
  3774. })
  3775. } else if (webType === 3) {
  3776. window.addEventListener('locationchange', function(){
  3777. if (nowLocation != location.href) {
  3778. nowLocation = location.href; curSite = {SiteTypeID: 0}; pageNum.now = 1; // 重置规则+页码
  3779. DBSite.flarum.functionStart(); // 重新判断规则
  3780. pageLoading(); // 自动无缝翻页
  3781.  
  3782. if (GM_getValue('menu_page_number')) {pageNumber('add');} else {pageNumber('set');} // 显示页码
  3783. pausePageEvent(); // 左键双击网页空白处暂停翻页
  3784. }
  3785. })
  3786. }
  3787. }
  3788. if (curSite.insStyle) insStyle(curSite.insStyle)
  3789.  
  3790. curSite.pageUrl = ''; // 下一页URL
  3791. //console.log(curSite);
  3792. pageLoading(); // 自动无缝翻页
  3793.  
  3794.  
  3795. // [Discuz! 论坛] 判断各版块帖子列表类型
  3796. function discuzForum() {
  3797. if (document.getElementById('autopbn')) { // 判断是否有 [下一页] 按钮
  3798. curSite = DBSite.discuz_forum;
  3799. } else if (document.getElementById('waterfall')) { // 判断是否为图片模式
  3800. curSite = DBSite.discuz_waterfall; waterfallStyle(); // 图片模式列表样式预处理
  3801. } else {
  3802. curSite = DBSite.discuz_guide;
  3803. }
  3804. }
  3805. // [Discuz! 论坛] 图片模式列表样式预处理
  3806. function waterfallStyle() {
  3807. let width = document.querySelector('#waterfall > li:first-child').style.width;
  3808. insStyle(`#waterfall {height: auto !important; width: 100% !important;} #waterfall > li {width: ${width} !important; float: left !important; position: inherit !important; left: auto !important; top: auto !important;}`);
  3809. }
  3810.  
  3811.  
  3812. // 插入 Style 样式
  3813. function insStyle(style) {
  3814. document.lastElementChild.appendChild(document.createElement('style')).textContent = style;
  3815. }
  3816.  
  3817.  
  3818. // 通用型插入前函数(加载图片)
  3819. function src_functionBefore(pageElems, css) {
  3820. pageElems.forEach(function (one) {
  3821. if (css[0] == 0) { // src 图片
  3822. one.querySelectorAll(css[1]).forEach(function (now) {
  3823. now.src = now.getAttribute(css[2]);
  3824. });
  3825. } else if (css[0] == 1) { // 背景图片
  3826. one.querySelectorAll(css[1]).forEach(function (now) {
  3827. now.style.backgroundImage = 'url("' + now.getAttribute(css[2]) + '")';
  3828. });
  3829. }
  3830. });
  3831. return pageElems
  3832. }
  3833.  
  3834.  
  3835. // [头条搜索] 的插入前函数(过滤相关搜索)
  3836. function toutiao_functionBefore(pageElems) {
  3837. for (let i = 0; i < pageElems.length; i++) {
  3838. let now = pageElems[i].querySelector('div[class*="-header"]')
  3839. if (now && now.textContent === '相关搜索') {
  3840. pageElems.splice(i,1)
  3841. }
  3842. }
  3843. return pageElems
  3844. }
  3845.  
  3846.  
  3847. // [Startpage] 获取下一页地址
  3848. function startpage_functionNext() {
  3849. let form = getElementByXpath('//div[contains(@class, "pagination ")]/form[./button[@class="pagination__next-prev-button next"]]');
  3850. if (form) {
  3851. let action = form.action, value = ''; // 获取提交表单 URL
  3852. form.querySelectorAll('input[name]').forEach(function(input) {value += input.name + '=' + input.value + '&';}) // 生成表单参数
  3853. value = encodeURI(value.replace(/&$/,'')); // 清理最后一个 & 符号,并替换页码
  3854. if (action && value) return (action + '?' + value)
  3855. }
  3856. return '';
  3857. }
  3858.  
  3859.  
  3860. // [百度贴吧](发帖按钮点击事件)
  3861. function baidu_tieba_1() {
  3862. let button = document.querySelector('.tbui_aside_fbar_button.tbui_fbar_post > a');
  3863. if (button) {
  3864. button.remove();
  3865. document.querySelector('li.tbui_aside_fbar_button.tbui_fbar_down').insertAdjacentHTML(addTo(4), '<li class="tbui_aside_fbar_button tbui_fbar_post"><a href="javascript:void(0);" title="因为 [自动无缝翻页] 的原因,请点击该按钮发帖!"></a></li>')
  3866. button = document.querySelector('.tbui_aside_fbar_button.tbui_fbar_post > a');
  3867. if (button) {
  3868. button.onclick = function(){
  3869. let button2 = document.querySelector('div.edui-btn.edui-btn-fullscreen.edui-btn-name-portrait');
  3870. if (button2) {
  3871. button2.click();
  3872. } else {
  3873. alert('提示:登录后才能发帖!');
  3874. }
  3875. return false;
  3876. }
  3877. }
  3878. }
  3879. }
  3880. // [百度贴吧] 的插入前函数(加载图片)
  3881. function baidu_tieba_functionBefore(pageElems) {
  3882. pageElems.forEach(function (one) {
  3883. one.querySelectorAll('img.threadlist_pic[data-original]').forEach(function (now) {
  3884. now.src = now.dataset.original;
  3885. now.style.display = 'inline';
  3886. })
  3887. });
  3888. return pageElems
  3889. }
  3890. // [百度贴吧] 获取下一页地址
  3891. function baidu_tieba_functionNext() {
  3892. let next = document.querySelector('a.next.pagination-item[href]');
  3893. if (next != null && next.nodeType === 1 && next.href && next.href.slice(0,4) === 'http') {
  3894. var url = next.href + '&pagelets=frs-list%2Fpagelet%2Fthread&pagelets_stamp=' + new Date().getTime();
  3895. if (url === curSite.pageUrl) return
  3896. curSite.pageUrl = url;
  3897. getPageElems(curSite.pageUrl);
  3898. };
  3899. }
  3900. // [百度贴吧] 插入数据
  3901. function baidu_tieba_insertElement(newBody, type) {
  3902. if (!newBody) return
  3903. let pageElems = getAllElements(curSite.pager.pageElement, newBody, newBody),
  3904. toElement = getAllElements(curSite.pager.insertPosition[0])[0];
  3905. if (pageElems.length >= 0) {
  3906. // 执行插入前函数
  3907. pageElems = curSite.function.before(pageElems);
  3908. // 插入位置
  3909. let addTo1 = addTo(curSite.pager.insertPosition[1]);
  3910. // 获取 <script> 内容
  3911. const scriptElems = getAllElements('//script', newBody, newBody);
  3912. let scriptText = '';
  3913. for (let i = 0; i < scriptElems.length; i++) {
  3914. if (scriptElems[i].textContent.indexOf('Bigpipe.register("frs-list/pagelet/thread_list"') > -1) {
  3915. scriptText = scriptElems[i].textContent.replace('Bigpipe.register("frs-list/pagelet/thread_list", ','');
  3916. break
  3917. }
  3918. }
  3919. if (scriptText) {
  3920. scriptText = scriptText.slice(0, scriptText.indexOf(').')) // 获取主体内容
  3921. let scriptJSON = JSON.parse(scriptText).content; // 字符串转 JSON
  3922. var temp_baidu_tieba = document.createElement('div'); temp_baidu_tieba.innerHTML = scriptJSON; // 字符串转 Element 元素
  3923. pageElems = curSite.function.before(getAllElements(curSite.pager.pageElement, temp_baidu_tieba, temp_baidu_tieba)); // 插入前执行函数
  3924. pageElems.forEach(function (one) {toElement.insertAdjacentElement(addTo1, one);}); // 插入元素
  3925. // 当前页码 + 1
  3926. pageNum.now = pageNum._now + 1
  3927. // 替换元素
  3928. let oriE = document.querySelectorAll(curSite.pager.pageElement.replace('css;', '')),
  3929. repE = getAllElements(curSite.pager.replaceE, temp_baidu_tieba, temp_baidu_tieba);
  3930. if (oriE.length === repE.length) {
  3931. for (let i = 0; i < oriE.length; i++) {
  3932. oriE[i].outerHTML = repE[i].outerHTML;
  3933. }
  3934. }
  3935. }
  3936. }
  3937. }
  3938.  
  3939.  
  3940. // [NGA(玩家社区)] 的插入后函数(加载各版块帖子列表样式)
  3941. function nga_thread_functionAfter() {
  3942. document.body.appendChild(document.createElement('script')).textContent = 'commonui.topicArg.loadAll();';
  3943. }
  3944.  
  3945.  
  3946. // [V2EX] 的插入后函数(新标签页打开链接)
  3947. function v2ex_functionAfter(css) {
  3948. let links = document.querySelectorAll(css);if (!links) return
  3949. links.forEach(function (_this) {_this.target = '_blank';});
  3950. }
  3951.  
  3952.  
  3953. // [龙的天空] 获取下一页地址
  3954. function lkong_functionNext() {
  3955. let next = document.querySelector('li.ant-pagination-next'), page;
  3956. if (next && next.getAttribute('aria-disabled') === 'false') {
  3957. page = document.querySelector('li.ant-pagination-item-active[title]');
  3958. if (page && page.title) {
  3959. if (curSite.pager.intervals) {
  3960. let _SiteTypeID = curSite.SiteTypeID; curSite.SiteTypeID = 0;
  3961. setTimeout(function(){curSite.SiteTypeID = _SiteTypeID;}, curSite.pager.intervals)
  3962. }
  3963. return (location.origin + location.pathname + '?page=' + ++page.title);
  3964. }
  3965. }
  3966. return '';
  3967. }
  3968.  
  3969.  
  3970. // [3DM MOD] 获取下一页地址
  3971. function _3dmgame_mod_functionNext() {
  3972. let nextNum = getElementByXpath('//li[@class="page-list active"]/following-sibling::li[contains(@class, "page-list")]/a');
  3973. var url = '';
  3974. if (nextNum && nextNum.textContent) {
  3975. nextNum = 'Page=' + nextNum.textContent;
  3976. if (location.search) {
  3977. let search = location.search.replace(/(&)?Page=\d+(&)?/, '');
  3978. if (search === '?') {
  3979. url += location.origin + location.pathname + search + nextNum;
  3980. } else {
  3981. url += location.origin + location.pathname + search + '&' + nextNum;
  3982. }
  3983. } else {
  3984. url += location.origin + location.pathname + '?' + nextNum;
  3985. }
  3986. }
  3987. //console.log(url)
  3988. return url
  3989. }
  3990.  
  3991.  
  3992. // [游民星空-攻略] 的插入前函数(移除下一页底部的 "更多相关内容请关注:xxx" 文字)
  3993. function gamersky_gl_functionBefore(pageElems) {
  3994. pageElems.forEach(function (one) {
  3995. if (one.tagName === 'P' && one.textContent.indexOf('更多相关内容请关注') > -1) {one.style.display = 'none';}
  3996. });
  3997. return pageElems
  3998. }
  3999.  
  4000.  
  4001. // [NexusMods] 获取下一页地址
  4002. function nexusmods_functionNext() {
  4003. if (document.querySelector('.nexus-ui-blocker')) return
  4004. let modList;
  4005. if (location.pathname.indexOf('/news') > -1) {modList = RH_NewsTabContent;} else {modList = RH_ModList;}
  4006. let out_items = JSON.stringify(modList.out_items).replace(/{|}|"/g,''),
  4007. nextNum = getElementByXpath('//div[contains(@class, "pagenav")][1]//a[contains(@class, "page-selected")]/parent::li/following-sibling::li/a'),
  4008. categories = modList.out_items.categories, categoriesUrl = '';
  4009. var url = '';
  4010. if (nextNum && nextNum.innerText) {
  4011. nextNum = nextNum.innerText;
  4012. if (out_items.indexOf('page:') > -1) {
  4013. out_items = out_items.replace(/page:\d+/, `page:${nextNum}`)
  4014. } else {
  4015. out_items += `,page:${nextNum}`;
  4016. }
  4017. if (categories && categories != []) {
  4018. for (let i = 0; i < categories.length; i++) {
  4019. categoriesUrl += `,categories[]:${categories[i]}`
  4020. }
  4021. categoriesUrl = categoriesUrl.replace(/,/,'');
  4022. if (out_items.indexOf('categories:') > -1) {
  4023. out_items = out_items.replace(/categories:\[.*\]/, categoriesUrl)
  4024. }
  4025. }
  4026. url = `https://www.nexusmods.com${modList.uri}?RH_${modList.id}=${out_items}`
  4027. //console.log(nextNum, url, curSite.pageUrl, out_items)
  4028. if (url === curSite.pageUrl) return
  4029. curSite.pageUrl = url;
  4030. //console.log(nextNum, curSite.pageUrl, out_items)
  4031. getPageElems(curSite.pageUrl)
  4032. }
  4033. }
  4034. // [NexusMods] 插入数据
  4035. function nexusmods_insertElement(newBody, type) {
  4036. if (!newBody) return
  4037. let pageElems = getAllElements(curSite.pager.pageElement, newBody, newBody), // 主体元素
  4038. toElement = getAllElements(curSite.pager.insertPosition[0])[0], // 插入位置的元素
  4039. addTo1 = addTo(curSite.pager.insertPosition[1]); // 插入位置
  4040. // 添加下载数据
  4041. pageElems.forEach(function (one) {
  4042. let now = one.querySelector('.mod-tile-left');
  4043. if (now) {
  4044. let downloadCount = now.querySelector('.downloadcount > span.flex-label');
  4045. if (downloadCount) {
  4046. //console.log(now.dataset.gameId, now.dataset.modId)
  4047. if (GlobalModStats[now.dataset.gameId] && GlobalModStats[now.dataset.gameId][now.dataset.modId]) {
  4048. downloadCount.textContent = shortFormat(parseInt(GlobalModStats[now.dataset.gameId][now.dataset.modId].total));
  4049. }
  4050. }
  4051. }
  4052. });
  4053. // 插入网页
  4054. pageElems.forEach(function (one) {toElement.insertAdjacentElement(addTo1, one);});
  4055. // 当前页码 + 1
  4056. pageNum.now = pageNum._now + 1
  4057. // 替换元素
  4058. let oriE = document.querySelectorAll(curSite.pager.replaceE.replace('css;', '')),
  4059. repE = getAllElements(curSite.pager.replaceE, newBody, newBody);
  4060. if (oriE.length === repE.length) {
  4061. for (let i = 0; i < oriE.length; i++) {
  4062. oriE[i].outerHTML = repE[i].outerHTML;
  4063. }
  4064. }
  4065. }
  4066.  
  4067.  
  4068. // [cs_rin_ru] 各版块帖子列表的插入前函数(过滤置顶帖子)
  4069. function cs_rin_ru_functionBefore(pageElems) {
  4070. for (let i = 0; i < pageElems.length; i++) {
  4071. if (pageElems[i].textContent.replace(/\n| /g,'') === 'Topics') {
  4072. pageElems.splice(0,i+1);
  4073. break;
  4074. }
  4075. }
  4076. return pageElems
  4077. }
  4078.  
  4079. // [SkrBT] 获取下一页地址
  4080. function skrbt_functionNext() {
  4081. let page = document.querySelector('a[onclick][aria-label="Next"]');
  4082. if (page) {page = /(?<=\()\d+(?=\))/.exec(page.onclick)[0];} else {return '';} // 获取下一页页码
  4083. if (page) {
  4084. let action = document.getElementById('search-form').action, value = ''; // 获取提交表单 URL
  4085. document.querySelectorAll('#search-form input[name]').forEach(function(input) {value += input.name + '=' + input.value + '&';}) // 生成表单参数
  4086. value = encodeURI(value.replace(/&$/,'').replace(/p=\d+/,'p=' + page)); // 清理最后一个 & 符号,并替换页码
  4087. if (action && value) return (action + '?' + value)
  4088. }
  4089. return '';
  4090. }
  4091.  
  4092.  
  4093. // [BTHaha] 的插入前函数(隐藏底部元素)
  4094. function bthaha_functionBefore(pageElems) {
  4095. pageElems.forEach(function (one) {
  4096. let now = one.querySelector('[id^="list_top"], [id^="list_bottom"]')
  4097. if (now) {one.hidden = true;}
  4098. });
  4099. return pageElems
  4100. }
  4101.  
  4102.  
  4103. // [射手网] 获取下一页地址
  4104. function assrt_functionNext() {
  4105. let nextXPAHT = '//a[@id="pl-nav"][@href][contains(text(), ">")]'
  4106. let url = getElementByXpath(nextXPAHT);
  4107. if (url) {
  4108. url = /(?<=\()\d+(?=,)/.exec(url.href)[0]
  4109. if (url) {
  4110. return (location.origin + location.pathname + location.search.replace(/(&)?page=\d+$/,'') + '&page=' + url);
  4111. }
  4112. }
  4113. return '';
  4114. }
  4115.  
  4116.  
  4117. // [LRepacks] 的插入前函数(调整 class)
  4118. function lrepacks_functionBefore(pageElems) {
  4119. pageElems.forEach(function (one) {
  4120. let now = one.querySelector('.slideUp, .elementFade')
  4121. if (now) {
  4122. now.className = now.className.replace('slideUp','slideUpRun').replace('elementFade','elementFadeRun');
  4123. }
  4124. });
  4125. return pageElems
  4126. }
  4127.  
  4128.  
  4129. // [漫画狂] 获取下一页地址
  4130. function cartoonmad_functionNext() {
  4131. let nextXPAHT = '//a[@class="pages"][contains(text(),"下一頁")]',
  4132. nextPXPATH = '//a[@class="pages"][contains(string(),"下一話")]'
  4133. let url = getElementByXpath(nextXPAHT);
  4134. if (url) {
  4135. if (url.getAttribute('href') === 'thend.asp') {
  4136. url = getElementByXpath(nextPXPATH)
  4137. if (url) return url.href;
  4138. pausePage = false;
  4139. GM_notification({text: `注意:该网站早期漫画(如海贼王、柯南)因为网站自身问题而无法翻至下一话(仅限于显示为 [第 X 卷]/[下一卷] 的)。\n因此需要手动去 [目录页] 进入下一卷!`, timeout: 10000});
  4140. } else {
  4141. return url.href;
  4142. }
  4143. }
  4144. return '';
  4145. }
  4146.  
  4147.  
  4148. // [漫画猫] 初始化(显示本话所以图片)
  4149. function manhuacat_init() {
  4150. let _img = '';
  4151. for (let now of img_data_arr) {
  4152. _img += `<img src="${asset_domain}${img_pre}${now}">`;
  4153. }
  4154. document.querySelector('.img-content > img').remove();
  4155. document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), _img); // 将 img 标签插入到网页中
  4156.  
  4157. }
  4158. // [漫画猫] 获取下一页地址
  4159. function manhuacat_functionNext(pageElems, type) {
  4160. if (type === 'url') {
  4161. if(pageElems.code == '0000') {
  4162. if (pageElems.url === curSite.pageUrl) return
  4163. curSite.pageUrl = pageElems.url;
  4164. getPageElems(curSite.pageUrl); // 真正的下一页链接
  4165. }
  4166. } else {
  4167. let vg_r_data = document.querySelector('.vg-r-data');
  4168. if (vg_r_data) {
  4169. 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');
  4170. }
  4171. }
  4172. }
  4173. // [漫画猫] 插入数据
  4174. function manhuacat_insertElement(pageElems, type) {
  4175. if (!pageElems) return
  4176. if (type === 'url') { // 获取下一页链接
  4177. manhuacat_functionNext(pageElems, type); return
  4178. }
  4179.  
  4180. // 添加历史记录
  4181. window.history.pushState(`{title: ${document.title}, url: ${location.href}}`, pageElems.querySelector('title').textContent, curSite.pageUrl);
  4182.  
  4183. // 替换元素
  4184. let oriE = document.querySelectorAll(curSite.pager.replaceE.replace('css;', '')),
  4185. repE = getAllElements(curSite.pager.replaceE, pageElems, pageElems);
  4186. if (oriE.length === repE.length) {
  4187. for (let i = 0; i < oriE.length; i++) {
  4188. oriE[i].outerHTML = repE[i].outerHTML;
  4189. }
  4190. }
  4191.  
  4192. // 插入图片
  4193. let _img = '', _img_arr = LZString.decompressFromBase64(getElementByXpath('//body/script[not(@src)][contains(text(), "img_data")]').textContent.split('"')[1]).split(','), vg_r_data = document.querySelector('.vg-r-data');;
  4194. for (let now of _img_arr) {
  4195. _img += `<img src="${vg_r_data.dataset.chapterDomain}${img_pre}${now}">`;
  4196. }
  4197. if (_img) {
  4198. document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), _img); // 将 img 标签插入到网页中
  4199. // 当前页码 + 1
  4200. pageNum.now = pageNum._now + 1
  4201. }
  4202. }
  4203.  
  4204.  
  4205. // [漫画DB] 初始化(将本话其余图片插入网页中)
  4206. function manhuadb_init() {
  4207. let _img = '',
  4208. data = document.querySelector('.vg-r-data'), imgDate;
  4209. if (!data) return
  4210. document.querySelectorAll(curSite.pager.pageElement.replace('css;', '')).forEach(function (one) {
  4211. if (one.tagName === 'SCRIPT' && one.textContent.indexOf('var img_data =') > -1) {
  4212. let json = JSON.parse(window.atob(one.textContent.split("'")[1]));
  4213. if (json) {
  4214. let _img = '';
  4215. for (let i = 0; i < json.length; i++) { // 遍历图片文件名数组,组合为 img 标签
  4216. let src = data.dataset.host + data.dataset.img_pre + json[i].img;
  4217. _img += `<img class="img-fluid show-pic" src="${src}">`
  4218. }
  4219. document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), _img); // 将 img 标签插入到网页中
  4220. }
  4221. }
  4222. })
  4223. }
  4224. // [漫画DB] 获取下一页地址
  4225. function manhuadb_functionNext() {
  4226. let nextArr = document.querySelectorAll('a.fixed-a-es'), next;
  4227. var url = '';
  4228. if (nextArr.length == 0) return
  4229. for (let i = 0; i < nextArr.length; i++) {
  4230. if (nextArr[i].className.indexOf('active') > -1) {
  4231. if (nextArr[i+1]) url = nextArr[i+1].href;
  4232. break;
  4233. }
  4234. }
  4235. if (url === curSite.pageUrl) return
  4236. curSite.pageUrl = url
  4237. getPageElems(curSite.pageUrl);
  4238. }
  4239. // [漫画DB] 插入数据
  4240. function manhuadb_insertElement(pageElems, type) {
  4241. if (!pageElems) return
  4242. let oriE = document.querySelectorAll(curSite.pager.pageElement.replace('css;', '')),
  4243. repE = getAllElements(curSite.pager.pageElement, pageElems, pageElems);
  4244. if (oriE.length === repE.length) {
  4245. for (let i = 0; i < oriE.length; i++) {
  4246. oriE[i].outerHTML = repE[i].outerHTML;
  4247. }
  4248. // 当前页码 + 1
  4249. pageNum.now = pageNum._now + 1
  4250. manhuadb_init(); // 将刚刚替换的图片插入网页中
  4251. }
  4252. }
  4253.  
  4254.  
  4255. // [HiComic(嗨漫画)] 初始化(将本话其余图片插入网页中)
  4256. function hicomic_init() {
  4257. let _img = '';
  4258. document.querySelectorAll('.chapter > section:not(:first-child) > section[val]').forEach(function (one) {
  4259. let src = one.getAttribute('val');
  4260. if (src.indexOf('!p_c_c_') === -1) src += '!p_c_c_h'
  4261. _img += `<img src="${src}">`
  4262. })
  4263. document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), _img); // 将 img 标签插入到网页中
  4264. window.document.title = window.document.title.replace(/(\(第.+\))? - HiComic/, `(${document.querySelector('.chapter_name').textContent}) - HiComic`); // 修改网页标题(加上 第 X 话)
  4265. }
  4266. // [HiComic(嗨漫画)] 获取下一页地址
  4267. function hicomic_functionNext() {
  4268. let nextId;
  4269. nextId = document.querySelector('.next_chapter:not(.end)')
  4270. if (nextId && nextId.id && nextId.id != 'None') {
  4271. curSite.pageUrl = location.href;
  4272. getPageElems(`https://www.hicomic.net/api/web/chapter/${nextId.id}/contents`, 'json');
  4273. }
  4274. }
  4275. // [HiComic(嗨漫画)] 插入数据
  4276. function hicomic_insertElement(pageElems, type) {
  4277. if (!pageElems || pageElems.code != 200) return
  4278. if (pageElems.results.chapter.next) { // 写入下一页的 UUID
  4279. document.querySelector('.next_chapter').id = pageElems.results.chapter.next;
  4280. } else {
  4281. document.querySelector('.next_chapter').id = 'None';
  4282. document.querySelector('.next_chapter').classList.add('end');
  4283. }
  4284. document.querySelector('.chapter_name').textContent = pageElems.results.chapter.name; // 修改漫画标题
  4285. let title = window.document.title.replace(/(\(第.+\))? - HiComic/, `(${pageElems.results.chapter.name}) - HiComic`)
  4286. window.history.pushState(`{title: ${document.title}, url: ${location.href}}`, title, curSite.pageUrl); // 添加历史记录
  4287. window.document.title = title; // 修改当前网页标题为下一话的标题
  4288. let _img = '';
  4289. for (let i = 0; i < pageElems.results.chapter.contents.length; i++) { // 遍历图片文件名数组,组合为 img 标签
  4290. let src = pageElems.results.chapter.contents[i].url;
  4291. if (src.indexOf('!p_c_c_') === -1) src += '!p_c_c_h';
  4292. _img += `<img src="${src}">`
  4293. }
  4294. document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), _img); // 将 img 标签插入到网页中
  4295. // 当前页码 + 1
  4296. pageNum.now = pageNum._now + 1
  4297. }
  4298.  
  4299.  
  4300. // [动漫之家] 初始化(调整本话其余图片)
  4301. function dmzj_init() {
  4302. let _img = '';
  4303. document.querySelectorAll('.comic_wraCon > a > img').forEach(function (one) {
  4304. _img += `<img src="${one.dataset.original}">`;
  4305. one.parentElement.remove();
  4306. })
  4307. document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), _img); // 将 img 标签插入到网页中
  4308.  
  4309. }
  4310. // [动漫之家] 获取下一页地址
  4311. function dmzj_functionNext() {
  4312. let next;
  4313. next = document.querySelector('span.next > a[href]')
  4314. if (next) {
  4315. if (next.href === curSite.pageUrl) return
  4316. curSite.pageUrl = next.href;
  4317. getPageElems(curSite.pageUrl);
  4318. }
  4319. }
  4320. // [动漫之家] 插入数据
  4321. function dmzj_insertElement(pageElems, type) {
  4322. if (!pageElems) return
  4323. // 插入并运行 <script>
  4324. let scriptElement = pageElems.querySelectorAll('head > script[type]:not([src])'), scriptText = '';
  4325. scriptElement.forEach(function (one) {scriptText += ';' + one.textContent;});
  4326. if (scriptText) document.body.appendChild(document.createElement('script')).textContent = scriptText;
  4327.  
  4328. // 插入图片
  4329. let _img = '', _img_arr;
  4330. if (pages.indexOf('|') === -1) {
  4331. _img_arr = JSON.parse(pages.replace(/\r\n/g,'|')).page_url.split('|');
  4332. } else {
  4333. _img_arr = JSON.parse(pages).page_url.split('|');
  4334. }
  4335. for (let now of _img_arr) {
  4336. _img += `<img src="${img_prefix}${now}">`;
  4337. }
  4338. if (_img) {
  4339. document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), _img); // 将 img 标签插入到网页中
  4340.  
  4341. // 添加历史记录
  4342. window.history.pushState(`{title: ${document.title}, url: ${location.href}}`, pageElems.querySelector('title').textContent, curSite.pageUrl);
  4343.  
  4344. // 替换元素
  4345. let oriE = document.querySelectorAll(curSite.pager.replaceE.replace('css;', '')),
  4346. repE = getAllElements(curSite.pager.replaceE, pageElems, pageElems);
  4347. if (oriE.length === repE.length) {
  4348. for (let i = 0; i < oriE.length; i++) {
  4349. oriE[i].outerHTML = repE[i].outerHTML;
  4350. }
  4351. // 当前页码 + 1
  4352. pageNum.now = pageNum._now + 1
  4353. }
  4354. }
  4355. }
  4356.  
  4357.  
  4358. // [动漫之家-漫画] 初始化(调整本话其余图片)
  4359. function dmzj_manhua_init() {
  4360. let _img = '';
  4361. document.querySelectorAll('#center_box > .inner_img img[src]').forEach(function (one) {
  4362. _img += `<img src="${one.dataset.original}">`;
  4363. one.parentElement.parentElement.remove();
  4364. })
  4365. document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), _img); // 将 img 标签插入到网页中
  4366.  
  4367. }
  4368. // [动漫之家-漫画] 获取下一页地址
  4369. function dmzj_manhua_functionNext() {
  4370. let next;
  4371. next = document.getElementById('next_chapter')
  4372. if (next) {
  4373. if (next.href === curSite.pageUrl) return
  4374. curSite.pageUrl = next.href;
  4375. getPageElems(curSite.pageUrl);
  4376. }
  4377. }
  4378. // [动漫之家-漫画] 插入数据
  4379. function dmzj_manhua_insertElement(pageElems, type) {
  4380. if (!pageElems) return
  4381. // 插入并运行 <script>
  4382. let scriptElement = pageElems.querySelectorAll('head > script[type]:not([src])'), scriptText = '';
  4383. scriptElement.forEach(function (one) {scriptText += ';' + one.textContent;});
  4384. if (scriptText) document.body.appendChild(document.createElement('script')).textContent = scriptText;
  4385.  
  4386. // 插入图片
  4387. let _img = '';
  4388. for (let now of arr_pages) {
  4389. _img += `<img src="${img_prefix}${now}">`;
  4390. }
  4391. if (_img) {
  4392. document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), _img); // 将 img 标签插入到网页中
  4393.  
  4394. // 添加历史记录
  4395. window.history.pushState(`{title: ${document.title}, url: ${location.href}}`, pageElems.querySelector('title').textContent, curSite.pageUrl);
  4396.  
  4397. // 替换元素
  4398. let oriE = document.querySelectorAll(curSite.pager.replaceE.replace('css;', '')),
  4399. repE = getAllElements(curSite.pager.replaceE, pageElems, pageElems);
  4400. if (oriE.length === repE.length) {
  4401. for (let i = 0; i < oriE.length; i++) {
  4402. oriE[i].outerHTML = repE[i].outerHTML;
  4403. }
  4404. // 当前页码 + 1
  4405. pageNum.now = pageNum._now + 1
  4406. }
  4407. }
  4408. }
  4409.  
  4410.  
  4411. // [拷贝漫画] 获取下一页地址
  4412. function copymanga_functionNext() {
  4413. let next;
  4414. next = document.querySelector('.comicContent-next > a[href]')
  4415. if (next) {
  4416. if (next.href === curSite.pageUrl) return
  4417. curSite.pageUrl = next.href;
  4418. getPageElems(curSite.pageUrl);
  4419. }
  4420. }
  4421. // [拷贝漫画] 插入数据
  4422. function copymanga_insertElement(pageElems, type) {
  4423. if (!pageElems) return
  4424. // 添加历史记录
  4425. window.history.pushState(`{title: ${document.title}, url: ${location.href}}`, pageElems.querySelector('title').textContent, curSite.pageUrl);
  4426. let oldImg = document.querySelector('.comicContent-image-list').innerHTML;
  4427.  
  4428. // 替换元素
  4429. let oriE = document.querySelectorAll(curSite.pager.replaceE.replace('css;', '')),
  4430. repE = getAllElements(curSite.pager.replaceE, pageElems, pageElems);
  4431. if (oriE.length === repE.length) {
  4432. for (let i = 0; i < oriE.length; i++) {
  4433. oriE[i].outerHTML = repE[i].outerHTML;
  4434. }
  4435. // 插入并运行 <script>
  4436. document.body.appendChild(document.createElement('script')).src = document.querySelector('body > script[async][src*="comic_content_pass"]').src;
  4437. setTimeout(function(){
  4438. document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), oldImg); // 将 img 标签插入到网页中
  4439. }, 100);
  4440. // 当前页码 + 1
  4441. pageNum.now = pageNum._now + 1
  4442. }
  4443. }
  4444.  
  4445.  
  4446. // [漫画星球] 获取下一页地址
  4447. function mhxqiu_functionNext() {
  4448. let next = document.querySelector('#mainControlNext');
  4449. if (next) {
  4450. if (next.href === curSite.pageUrl) return
  4451. curSite.pageUrl = next.href;
  4452. getPageElems(curSite.pageUrl);
  4453. }
  4454. }
  4455. // [漫画星球] 插入数据
  4456. function mhxqiu_insertElement(pageElems, type) {
  4457. if (!pageElems) return
  4458. // 插入并运行 <script>
  4459. let scriptElement = getElementByXpath('//body/script[@type][not(@src)][contains(text(), "eval(")]', pageElems);
  4460. if (scriptElement) document.body.appendChild(document.createElement('script')).textContent = scriptElement.textContent;
  4461.  
  4462. // 插入图片
  4463. let _img = '';
  4464. for (let now of newImgs) {
  4465. _img += `<li style="margin:0 auto;"><div style="display: inline-block;zoom: 1;"><img src="${now}" class="loaded lazy" style="opacity: 1;box-shadow:none;"></div></li>`;
  4466. }
  4467. if (_img) {
  4468. document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), _img); // 将 img 标签插入到网页中
  4469.  
  4470. // 添加历史记录
  4471. window.history.pushState(`{title: ${document.title}, url: ${location.href}}`, pageElems.querySelector('title').textContent, curSite.pageUrl);
  4472.  
  4473. // 替换元素
  4474. let oriE = document.querySelectorAll(curSite.pager.replaceE.replace('css;', '')),
  4475. repE = getAllElements(curSite.pager.replaceE, pageElems, pageElems);
  4476. if (oriE.length === repE.length) {
  4477. for (let i = 0; i < oriE.length; i++) {
  4478. oriE[i].outerHTML = repE[i].outerHTML;
  4479. }
  4480. // 当前页码 + 1
  4481. pageNum.now = pageNum._now + 1
  4482. }
  4483. }
  4484. }
  4485.  
  4486.  
  4487. // [古风漫画网] 获取下一页地址
  4488. function gufengmh_functionNext() {
  4489. let pageElems = document.querySelector(curSite.pager.pageElement.replace('css;', '')); // 寻找数据所在元素
  4490. if (pageElems) {
  4491. let comicUrl, nextId;
  4492. var url = '';
  4493. pageElems.textContent.split(';').forEach(function (one){ // 分号 ; 分割为数组并遍历
  4494. //console.log(one)
  4495. if (one.indexOf('comicUrl') > -1) { // 下一页 URL 前半部分
  4496. comicUrl = one.split('"')[1];
  4497. } else if (one.indexOf('nextChapterData') > -1) { // 下一页 URL 的后半部分 ID
  4498. nextId = one.split('"id":')[1].split(',')[0];
  4499. }
  4500. })
  4501. if (comicUrl && nextId && nextId != 'null') { // 组合到一起就是下一页 URL
  4502. url = comicUrl + nextId + '.html'
  4503. if (url === curSite.pageUrl) return
  4504. curSite.pageUrl = url
  4505. getPageElems(curSite.pageUrl); // 访问下一页 URL 获取
  4506. }
  4507. }
  4508. }
  4509. // [古风漫画网] 插入数据
  4510. function gufengmh_insertElement(pageElems, type) {
  4511. if (pageElems) {
  4512. let url = curSite.pageUrl;
  4513. pageElems = getAllElements(curSite.pager.pageElement, pageElems, pageElems)[0];
  4514. let chapterImages, chapterPath;
  4515. document.querySelector(curSite.pager.pageElement.replace('css;', '')).innerText = pageElems.textContent; // 将当前网页内的数据所在元素内容改为刚刚获取的下一页数据内容,以便循环获取下一页 URL
  4516. pageElems.textContent.split(';').forEach(function (one){ // 分号 ; 分割为数组并遍历
  4517. //console.log(one)
  4518. if (one.indexOf('chapterImages') > -1) { // 图片文件名数组
  4519. chapterImages = one.replace(/^.+\[/, '').replace(']', '').replaceAll('"', '').split(',')
  4520. } else if (one.indexOf('chapterPath') > -1) { // 图片文件路径
  4521. chapterPath = one.split('"')[1];
  4522. } else if (one.indexOf('pageTitle') > -1) { // 网页标题
  4523. let title = one.split('"')[1];
  4524. window.history.pushState(`{title: ${document.title}, url: ${location.href}}`, title, url); // 添加历史记录
  4525. window.document.title = title; // 修改当前网页标题为下一页的标题
  4526. }
  4527. })
  4528. if (chapterImages && chapterPath) {
  4529. let _img = '';
  4530. chapterImages.forEach(function (one2){ // 遍历图片文件名数组,组合为 img 标签
  4531. _img += '<img src="https://res.xiaoqinre.com/' + chapterPath + one2 + '" data-index="0" style="display: inline-block;">'
  4532. })
  4533. document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), _img); // 将 img 标签插入到网页中
  4534. // 当前页码 + 1
  4535. pageNum.now = pageNum._now + 1
  4536. }
  4537. }
  4538. }
  4539.  
  4540.  
  4541. // [砂之船动漫家] 的插入前函数(加载图片)
  4542. function szcdmj_functionBefore(pageElems) {
  4543. pageElems.forEach(function (one) {
  4544. if (one.tagName === 'TITLE') {
  4545. let title = one.textContent;
  4546. window.history.pushState(`{title: ${document.title}, url: ${location.href}}`, title, curSite.pageUrl); // 添加历史记录
  4547. window.document.title = title; // 修改当前网页标题为下一页的标题
  4548. one.style.display = 'none';
  4549. } else {
  4550. let now = one.querySelector('img[data-original]')
  4551. if (now) {
  4552. now.src = now.dataset.original;
  4553. now.style.display = 'inline';
  4554. }
  4555. }
  4556. });
  4557. return pageElems
  4558. }
  4559.  
  4560.  
  4561. // [Mangabz 漫画] 初始化(调整本话图片)
  4562. function mangabz_init() {
  4563. pageNumber('del');
  4564. let showimage = document.getElementById('showimage'),
  4565. cp_img = document.getElementById('cp_img'),
  4566. cp_image = document.getElementById('cp_image');
  4567. if (showimage) {showimage.removeAttribute('oncontextmenu');}
  4568. if (cp_img) {cp_img.removeAttribute('oncontextmenu');}
  4569. if (cp_image) {
  4570. cp_image.removeAttribute('oncontextmenu');
  4571. cp_image.removeAttribute('id');
  4572. cp_image.removeAttribute('style');
  4573. }
  4574. }
  4575. // [Mangabz 漫画] 获取下一页地址
  4576. function mangabz_functionNext() {
  4577. var url = '';
  4578. if (MANGABZ_PAGE === MANGABZ_IMAGE_COUNT) { // 下一话
  4579. url = getElementByXpath('//a[./img[contains(@src, "icon_xiayizhang")]]')
  4580. if (url === curSite.pageUrl) return
  4581. curSite.pageUrl = url
  4582. //console.log(curSite.pageUrl)
  4583. getPageElems(curSite.pageUrl); // 访问下一话 URL 获取
  4584. } else { // 下一页
  4585. if (!mkey) var mkey = '';
  4586. url = location.origin + location.pathname + 'chapterimage.ashx' + `?cid=${MANGABZ_CID}&page=${MANGABZ_PAGE + 1}&key=${(mkey)}&_cid=${MANGABZ_CID}&_mid=${MANGABZ_MID}&_dt=${MANGABZ_VIEWSIGN_DT}&_sign=${MANGABZ_VIEWSIGN}`
  4587. if (url === curSite.pageUrl) return
  4588. curSite.pageUrl = url
  4589. //console.log(curSite.pageUrl)
  4590. getPageElems(curSite.pageUrl, 'text', 'GET', '', 'Next'); // 访问下一页 URL 获取
  4591. }
  4592. }
  4593. // [Mangabz 漫画] 插入数据
  4594. function mangabz_insertElement(pageElems, type) {
  4595. if (pageElems) {
  4596. if (type === 'Next') {
  4597. let imgArr = eval(pageElems),
  4598. _img = '';
  4599. for (let now of imgArr) {
  4600. _img += `<img src="${now}">`;
  4601. }
  4602. if (_img) {
  4603. document.querySelector(curSite.pager.insertPosition[0].replace('css;', '')).insertAdjacentHTML(addTo(curSite.pager.insertPosition[1]), _img); // 将 img 标签插入到网页中
  4604.  
  4605. // 添加历史记录
  4606. MANGABZ_PAGE += imgArr.length;
  4607. window.history.pushState(`{title: ${document.title}, url: ${location.href}}`, document.title, location.origin + MANGABZ_CURL.substring(0, MANGABZ_CURL.length - 1) + '-p' + MANGABZ_PAGE + '/');
  4608. }
  4609. } else {
  4610. // 插入 <script> 标签
  4611. let scriptElement = pageElems.querySelectorAll('html:not([dir]) > head > script:not([src])'), scriptText = '';
  4612. scriptElement.forEach(function (one) {scriptText += ';' + one.textContent;});
  4613. if (scriptText) {
  4614. document.body.appendChild(document.createElement('script')).textContent = scriptText;
  4615.  
  4616. window.history.pushState(`{title: ${document.title}, url: ${location.href}}`, pageElems.querySelector('title').textContent, curSite.pageUrl);
  4617.  
  4618. // 替换待替换元素
  4619. let oriE = getAllElements(curSite.pager.replaceE),
  4620. repE = getAllElements(curSite.pager.replaceE, pageElems, pageElems);
  4621. if (oriE.length === repE.length) {
  4622. for (let i = 0; i < oriE.length; i++) {
  4623. oriE[i].outerHTML = repE[i].outerHTML;
  4624. }
  4625. }
  4626. MANGABZ_PAGE = 0;
  4627. mangabz_functionNext();
  4628. }
  4629. }
  4630. }
  4631. }
  4632.  
  4633.  
  4634. // 自动无缝翻页
  4635. function pageLoading() {
  4636. if (curSite.SiteTypeID > 0) {
  4637. windowScroll(function (direction, e) {
  4638. if (direction === 'down' && pausePage === true && curSite.SiteTypeID > 0) { // 下滑 且 未暂停翻页 且 SiteTypeID > 0 时,才准备翻页
  4639. let scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop,
  4640. scrollHeight = window.innerHeight || document.documentElement.clientHeight,
  4641. scrollDelta = curSite.pager.scrollDelta;
  4642.  
  4643. if (curSite.pager.type === 3) { // <<<<< 翻页类型 3(依靠元素距离可视区域底部的距离来触发翻页)>>>>>
  4644. let scrollElement = document.querySelector(curSite.pager.scrollElement);
  4645. //console.log(scrollElement.offsetTop - (scrollTop + scrollHeight), scrollDelta, curSite.SiteTypeID)
  4646. if (scrollElement.offsetTop - (scrollTop + scrollHeight) <= scrollDelta) {
  4647. if (curSite.SiteTypeID === SiteType.GAMERSKY_GL) curSite.pager.scrollDelta -= 800 // 游民星空 gl 的比较奇葩,需要特殊处理下
  4648. ShowPager.loadMorePage();
  4649. }
  4650.  
  4651. } else {
  4652. if (document.documentElement.scrollHeight <= scrollHeight + scrollTop + scrollDelta) {
  4653.  
  4654. if (curSite.pager.type === 2) { // <<<<< 翻页类型 2(网站自带了自动无缝翻页功能,只需要点击下一页按钮即可)>>>>>
  4655. let autopbn = document.querySelector(curSite.pager.nextLink);
  4656. if (autopbn) { // 寻找下一页链接
  4657. // 避免重复点击翻页按钮
  4658. if (curSite.pager.nextText) { // 按钮文本,当按钮文本 = 该文本时,才会点击按钮加载下一页
  4659. if (autopbn.innerText === curSite.pager.nextText) {autopbn.click(); pageNum.now = pageNum._now + 1;} // 当前页码 + 1
  4660.  
  4661. } else if (curSite.pager.nextTextOf) { // 按钮文本的一部分,当按钮文本包含该文本时,才会点击按钮加载下一页
  4662. if (autopbn.innerText.indexOf(curSite.pager.nextTextOf) > -1) {autopbn.click(); pageNum.now = pageNum._now + 1;} // 当前页码 + 1
  4663.  
  4664. } else if (curSite.pager.nextHTML) { // 按钮内元素,当按钮内元素 = 该元素内容时,才会点击按钮加载下一页
  4665. if (autopbn.innerHTML === curSite.pager.nextHTML) {autopbn.click(); pageNum.now = pageNum._now + 1;} // 当前页码 + 1
  4666.  
  4667. } else { // 如果没有指定按钮文字就直接点击
  4668. autopbn.click(); pageNum.now = pageNum._now + 1; // 当前页码 + 1
  4669. // 对于没有按钮文字变化的按钮,可以指定间隔时间(默认 300ms)
  4670. if (!curSite.pager.intervals) {curSite.pager.intervals = 300;}
  4671. let _SiteTypeID = curSite.SiteTypeID; curSite.SiteTypeID = 0;
  4672. setTimeout(function(){curSite.SiteTypeID = _SiteTypeID;}, curSite.pager.intervals)
  4673. }
  4674. }
  4675.  
  4676. } else if (curSite.pager.type === 1) { // <<<<< 翻页类型 1(由脚本实现自动无缝翻页)>>>>>
  4677. ShowPager.loadMorePage();
  4678.  
  4679. } else if (curSite.pager.type === 4) { // <<<<< 翻页类型 4(部分简单的动态加载类网站)>>>>>
  4680. // 为百度贴吧的发帖考虑...
  4681. if (!(document.documentElement.scrollHeight <= scrollHeight + scrollTop + 200 && curSite.SiteTypeID === SiteType.BAIDU_TIEBA)) {
  4682. curSite.pager.nextLink();
  4683. }
  4684. if (curSite.pager.intervals) {
  4685. let _SiteTypeID = curSite.SiteTypeID;
  4686. curSite.SiteTypeID = 0;
  4687. setTimeout(function(){curSite.SiteTypeID = _SiteTypeID;}, curSite.pager.intervals)
  4688. }
  4689. }
  4690. }
  4691. }
  4692. }
  4693. });
  4694. }
  4695. }
  4696.  
  4697.  
  4698. // 启用/禁用 (当前网站)
  4699. function menu_disable(type) {
  4700. switch(type) {
  4701. case 'check':
  4702. if(check()) {return true;} else {return false;}; break;
  4703. case 'add':
  4704. add(); break;
  4705. case 'del':
  4706. del(); break;
  4707. }
  4708.  
  4709. function check() { // 存在返回真,不存在返回假
  4710. let list = GM_getValue('menu_disable'); // 读取网站列表
  4711. if (list.indexOf(location.host) === -1) return false // 不存在返回假
  4712. return true
  4713. }
  4714.  
  4715. function add() {
  4716. if (check()) return
  4717. let list = GM_getValue('menu_disable'); // 读取网站列表
  4718. list.push(location.host); // 追加网站域名
  4719. GM_setValue('menu_disable', list); // 写入配置
  4720. location.reload(); // 刷新网页
  4721. }
  4722.  
  4723. function del() {
  4724. if (!check()) return
  4725. let list = GM_getValue('menu_disable'), // 读取网站列表
  4726. index = list.indexOf(location.host);
  4727. list.splice(index, 1); // 删除网站域名
  4728. GM_setValue('menu_disable', list); // 写入配置
  4729. location.reload(); // 刷新网页
  4730. }
  4731. }
  4732.  
  4733.  
  4734. // 左键双击网页空白处暂停翻页
  4735. function pausePageEvent() {
  4736. if (!GM_getValue('menu_pause_page')) return
  4737. if (curSite.SiteTypeID === 0) return
  4738. document.body.addEventListener('dblclick', function () {
  4739. if (pausePage) {
  4740. pausePage = false;
  4741. GM_notification({text: `❌ 已暂停本页 [自动无缝翻页]\n (再次双击可恢复)`, timeout: 2000});
  4742. } else {
  4743. pausePage = true;
  4744. GM_notification({text: `✅ 已恢复本页 [自动无缝翻页]\n (再次双击可暂停)`, timeout: 2000});
  4745. }
  4746. });
  4747. }
  4748.  
  4749.  
  4750. // 显示页码
  4751. function pageNumber(type) {
  4752. if (curSite.SiteTypeID === 0) {let status = document.getElementById('Autopage_number');if (status) {status.style.display = 'none';}; return}
  4753. let status = document.getElementById('Autopage_number');
  4754. switch (type) {
  4755. case 'add':
  4756. add(); break;
  4757. case 'del':
  4758. del(); break;
  4759. case 'set':
  4760. set(); break;
  4761. }
  4762.  
  4763. function add(){
  4764. if (status) {
  4765. if (status.style.display === 'none') {status.style.display = 'flex';}
  4766. return
  4767. }
  4768. // 插入网页
  4769. let _html = `<style>#Autopage_number {top: calc(75vh) !important;left: 0 !important;width: 32px;height: 32px;padding: 6px !important;display: flex;position: fixed !important;opacity: 0.5;transition: .2s;z-index: 1000 !important;cursor: pointer;user-select: none !important;flex-direction: column;align-items: center;justify-content: center;box-sizing: content-box;border-radius: 0 50% 50% 0;transform-origin: center !important;transform: translateX(-8px);background-color: #eee;-webkit-tap-highlight-color: transparent;box-shadow: 1px 1px 3px 0px #aaa !important;color: #000 !important;} #Autopage_number:hover {opacity: 0.9;transform: translateX(0);}</style>
  4770. <div id="Autopage_number" title="1. 此处数字为 [当前页码] (可在脚本菜单中关闭)&#10;&#10;2. 鼠标左键点击此处 [临时暂停本页自动无缝翻页](再次点击可恢复)">${pageNum._now}</div>`
  4771. document.body.insertAdjacentHTML('beforeend', _html);
  4772. // 点击事件(临时暂停翻页)
  4773. document.getElementById('Autopage_number').onclick = function () {
  4774. if (pausePage) {
  4775. pausePage = false; this.style = 'color: #FF5722 !important; font-style: italic !important;';
  4776. } else {
  4777. pausePage = true; this.style = '';
  4778. }
  4779. };
  4780. status = document.getElementById('Autopage_number');
  4781. set();
  4782. }
  4783. // 监听储存当前页码的对象值的变化
  4784. function set(){
  4785. Object.defineProperty(pageNum, 'now', {
  4786. set: function(value) {
  4787. this._now = value;
  4788. if (status) status.textContent = value;
  4789. }
  4790. });
  4791. }
  4792. function del(){
  4793. if (!status) return
  4794. status.style.display = 'none';
  4795. }
  4796. }
  4797.  
  4798.  
  4799. // 菜单开关
  4800. function menu_switch(menu_status, Name, Tips) {
  4801. if (menu_status === true){
  4802. GM_setValue(Name, false);
  4803. } else {
  4804. GM_setValue(Name, true);
  4805. }
  4806. if (Name === 'menu_page_number') {
  4807. if (menu_status === true){pageNumber('del');} else {pageNumber('add');}
  4808. registerMenuCommand(); // 重新注册脚本菜单
  4809. } else {
  4810. location.reload();}
  4811. };
  4812.  
  4813.  
  4814. // 生成 ID
  4815. function generateID() {
  4816. let num = 0
  4817. for (let val in DBSite) {
  4818. DBSite[val].SiteTypeID = num = num + 1;
  4819. }
  4820. }
  4821.  
  4822.  
  4823. // 判断是支持
  4824. function doesItSupport() {
  4825. setDBSite(); // 配置 DBSite 变量对象
  4826.  
  4827. // 遍历判断是否是某个已支持的网站,顺便直接赋值
  4828. let support = false;
  4829. for (let now in DBSite) { // 遍历对象
  4830. if (!DBSite[now].host) continue; // 如果不存在则继续下一个循环
  4831. if (Array.isArray(DBSite[now].host)) { // 如果是数组
  4832. for (let i of DBSite[now].host) { // 遍历数组
  4833. if (i === location.host) {
  4834. if (DBSite[now].functionStart) {
  4835. DBSite[now].functionStart();
  4836. } else {
  4837. curSite = DBSite[now];
  4838. }
  4839. support = true; break; // 如果找到了就退出循环
  4840. }
  4841. }
  4842. } else if (DBSite[now].host instanceof RegExp) {
  4843. if (DBSite[now].host.test(location.host)) {
  4844. if (self != top) {if (!DBSite[now].iframe) break;} // 如果当前位于 iframe 框架下,就需要判断是否需要执行
  4845. if (DBSite[now].functionStart) {
  4846. DBSite[now].functionStart();
  4847. } else {
  4848. curSite = DBSite[now];
  4849. }
  4850. support = true; break; // 如果找到了就退出循环
  4851. }
  4852. } else if (DBSite[now].host === location.host) {
  4853. if (self != top) {if (!DBSite[now].iframe) break;} // 如果当前位于 iframe 框架下,就需要判断是否需要执行
  4854. if (DBSite[now].functionStart) {
  4855. DBSite[now].functionStart();
  4856. } else {
  4857. curSite = DBSite[now];
  4858. }
  4859. support = true; break; // 如果找到了就退出循环
  4860. }
  4861. }
  4862.  
  4863. if (support) {
  4864. console.info('[自动无缝翻页] - 其他网站(独立规则)'); return 1;
  4865. } else if (document.querySelector('meta[name="author"][content*="Discuz!"], meta[name="generator"][content*="Discuz!"]') || document.querySelector('body[id="nv_forum"][class^="pg_"][onkeydown*="27"]') || document.querySelector('body[id="nv_search"][onkeydown*="27"]') || (document.querySelector('a[href*="www.discuz.net"]') && document.querySelector('a[href*="www.discuz.net"]').textContent.indexOf('Discuz!') > -1) || (document.getElementById('ft') && document.getElementById('ft').textContent.indexOf('Discuz!') > -1)) {
  4866. console.info('[自动无缝翻页] - Discuz! 论坛'); return 2;
  4867. } else if (document.getElementById('flarum-loading')) {
  4868. console.info('[自动无缝翻页] - Flarum 论坛'); return 3;
  4869. } else if (document.querySelector('link[href*="themes/dux" i], script[src*="themes/dux" i]')) {
  4870. console.info('[自动无缝翻页] - 使用 WordPress DUX 主题的网站'); return 4;
  4871. } else if (self != top) {
  4872. return -1;
  4873. }
  4874. return 0;
  4875. }
  4876.  
  4877.  
  4878. // 获取 Cookie
  4879. function getCookie(name) {
  4880. if (!name) return ''
  4881. let arr = document.cookie.split(';');
  4882. name += '='
  4883. for (let i=0; i<arr.length; i++) {
  4884. let now = arr[i].trim();
  4885. if (now.indexOf(name) == 0) return now.substring(name.length, now.length);
  4886. }
  4887. return '';
  4888. }
  4889.  
  4890.  
  4891. // 类型 4 专用
  4892. function getPageElems(url, type = '', method = 'GET', data = '', type2) {
  4893. //console.log(url, data)
  4894. let mimeType = '';
  4895. if (curSite.pager.mimeType) mimeType = curSite.pager.mimeType;
  4896. GM_xmlhttpRequest({
  4897. url: url,
  4898. method: method,
  4899. data: data,
  4900. responseType: type,
  4901. overrideMimeType: mimeType,
  4902. headers: {
  4903. 'Referer': location.href,
  4904. 'Content-Type': (method === 'POST') ? 'application/x-www-form-urlencoded':''
  4905. },
  4906. timeout: 5000,
  4907. onload: function (response) {
  4908. try {
  4909. //console.log('最终 URL:' + response.finalUrl, '返回内容:' + response.responseText)
  4910. switch (type) {
  4911. case 'json':
  4912. curSite.pager.insertElement(response.response, type2);
  4913. break;
  4914. case 'text':
  4915. curSite.pager.insertElement(response.responseText, type2)
  4916. break;
  4917. default:
  4918. curSite.pager.insertElement(ShowPager.createDocumentByString(response.responseText), type2)
  4919. }
  4920. } catch (e) {
  4921. console.log(e);
  4922. }
  4923. }
  4924. });
  4925. }
  4926.  
  4927.  
  4928. // 插入位置
  4929. function addTo(num) {
  4930. switch (num) {
  4931. case 1:
  4932. return 'beforebegin'; break;
  4933. case 2:
  4934. return 'afterbegin'; break;
  4935. case 3:
  4936. return 'beforeend'; break;
  4937. case 4:
  4938. return 'afterend'; break;
  4939. case 5:
  4940. return 'beforeend'; break;
  4941. }
  4942. }
  4943.  
  4944.  
  4945. // 滚动条事件
  4946. function windowScroll(fn1) {
  4947. var beforeScrollTop = document.documentElement.scrollTop || document.body.scrollTop,
  4948. fn = fn1 || function () {};
  4949. setTimeout(function () { // 延时 1 秒执行,避免刚载入到页面就触发翻页事件
  4950. window.addEventListener('scroll', function (e) {
  4951. var afterScrollTop = document.documentElement.scrollTop || document.body.scrollTop,
  4952. delta = afterScrollTop - beforeScrollTop;
  4953. if (delta == 0) return false;
  4954. fn(delta > 0 ? 'down' : 'up', e);
  4955. beforeScrollTop = afterScrollTop;
  4956. }, false);
  4957. }, 1000)
  4958. }
  4959.  
  4960.  
  4961. // 修改自 https://greasyfork.org/scripts/14178 , https://github.com/machsix/Super-preloader
  4962. var ShowPager = {
  4963. getFullHref: function (e) {
  4964. if (e != null && e.nodeType === 1 && e.href && e.href.slice(0,4) === 'http') return e.href;
  4965. return '';
  4966. },
  4967. createDocumentByString: function (e) {
  4968. if (e) {
  4969. if ('HTML' !== document.documentElement.nodeName) return (new DOMParser).parseFromString(e, 'application/xhtml+xml');
  4970. var t;
  4971. try { t = (new DOMParser).parseFromString(e, 'text/html');} catch (e) {}
  4972. if (t) return t;
  4973. if (document.implementation.createHTMLDocument) {
  4974. t = document.implementation.createHTMLDocument('ADocument');
  4975. } else {
  4976. try {((t = document.cloneNode(!1)).appendChild(t.importNode(document.documentElement, !1)), t.documentElement.appendChild(t.createElement('head')), t.documentElement.appendChild(t.createElement('body')));} catch (e) {}
  4977. }
  4978. if (t) {
  4979. var r = document.createRange(),
  4980. n = r.createContextualFragment(e);
  4981. r.selectNodeContents(document.body);
  4982. t.body.appendChild(n);
  4983. for (var a, o = { TITLE: !0, META: !0, LINK: !0, STYLE: !0, BASE: !0}, i = t.body, s = i.childNodes, c = s.length - 1; c >= 0; c--) o[(a = s[c]).nodeName] && i.removeChild(a);
  4984. return t;
  4985. }
  4986. } else console.error('没有找到要转成 DOM 的字符串');
  4987. },
  4988. loadMorePage: function () {
  4989. if (curSite.pager) {
  4990. var url;
  4991. if (typeof curSite.pager.nextLink == 'function') {
  4992. url = curSite.pager.nextLink();
  4993. } else {
  4994. if (curSite.pager.nextLink.slice(0,4) === 'css;') {
  4995. url = this.getFullHref(getElementByCSS(curSite.pager.nextLink.slice(4)));
  4996. } else {
  4997. url = this.getFullHref(getElementByXpath(curSite.pager.nextLink));
  4998. }
  4999. }
  5000. //console.log(url, curSite.pageUrl);
  5001. if (url === '') return;
  5002. if (curSite.pager.forceHTTPS && location.protocol === 'https:') {url = url.replace(/^http:/,'https:');}
  5003. if (curSite.pageUrl === url) return;// 避免重复加载相同的页面
  5004. curSite.pageUrl = url;
  5005. let mimeType = '';
  5006. if (curSite.pager.mimeType) mimeType = curSite.pager.mimeType;
  5007. // 读取下一页的数据
  5008. GM_xmlhttpRequest({
  5009. url: url,
  5010. method: 'GET',
  5011. overrideMimeType: mimeType,
  5012. headers: {
  5013. 'Referer': location.href
  5014. },
  5015. timeout: 5000,
  5016. onload: function (response) {
  5017. try {
  5018. processResult(response);
  5019. } catch (e) {
  5020. console.log(e);
  5021. }
  5022. }
  5023. });
  5024. }
  5025. },
  5026. };
  5027. function processResult(response) {
  5028. //console.log('最终 URL:' + response.finalUrl, '返回内容:' + response.responseText)
  5029. var newBody = ShowPager.createDocumentByString(response.responseText);
  5030. let pageElems = getAllElements(curSite.pager.pageElement, newBody, newBody),
  5031. toElement = getAllElements(curSite.pager.insertPosition[0])[0];
  5032. //console.log(curSite.pager.pageElement, pageElems, curSite.pager.insertPosition, toElement)
  5033.  
  5034. if (pageElems.length >= 0) {
  5035. // 如果有插入前函数就执行函数
  5036. if (curSite.function && curSite.function.before) {
  5037. if (curSite.function.parameter) { // 如果指定了参数
  5038. pageElems = curSite.function.before(pageElems, curSite.function.parameter);
  5039. } else {
  5040. pageElems = curSite.function.before(pageElems);
  5041. }
  5042. }
  5043.  
  5044. // 插入位置
  5045. let addTo1 = addTo(curSite.pager.insertPosition[1]);
  5046.  
  5047. // 插入新页面元素
  5048. if (curSite.pager.insertPosition[1] === 4) { // 插入到目标本身后面,需要合并后一起插入
  5049. let afterend = '';
  5050. pageElems.forEach(function (one) {afterend += one.outerHTML;});
  5051. toElement.insertAdjacentHTML(addTo1, afterend);
  5052. } else if (curSite.pager.insertPosition[1] === 5) { // 插入到目标内部末尾(针对文本)
  5053. let afterend = '';
  5054. pageElems.forEach(function (one) {afterend += one.innerHTML;});
  5055. toElement.insertAdjacentHTML(addTo1, afterend);
  5056. } else {
  5057. pageElems.forEach(function (one) {toElement.insertAdjacentElement(addTo1, one);});
  5058. }
  5059.  
  5060. // 当前页码 + 1
  5061. pageNum.now = pageNum._now + 1
  5062.  
  5063. // 插入 <script> 标签
  5064. if (curSite.pager.scriptType) {
  5065. let scriptText = '';
  5066. if (curSite.pager.scriptType === 1) { // 下一页的所有 <script> 标签
  5067. const scriptElems = getAllElements('//script', newBody, newBody);
  5068. scriptElems.forEach(function (one) {
  5069. if (one.src) {
  5070. toElement.appendChild(document.createElement('script')).src = one.src;
  5071. } else {
  5072. scriptText += ';' + one.textContent;
  5073. }
  5074. });
  5075. toElement.appendChild(document.createElement('script')).textContent = scriptText;
  5076. } else if (curSite.pager.scriptType === 2) { // 下一页主体元素同级 <script> 标签
  5077. pageElems.forEach(function (one) {if (one.tagName === 'SCRIPT') {scriptText += ';' + one.textContent;}});
  5078. if (scriptText) toElement.appendChild(document.createElement('script')).textContent = scriptText;
  5079. } else if (curSite.pager.scriptType === 3) { // 下一页主体元素同级 <script> 标签(远程文件)
  5080. pageElems.forEach(function (one) {if (one.tagName === 'SCRIPT' && one.src) {toElement.appendChild(document.createElement('script')).src = one.src;}});
  5081. } else if (curSite.pager.scriptType === 4) { // 下一页主体元素子元素 <script> 标签
  5082. pageElems.forEach(function (one) {
  5083. const scriptElems = one.querySelectorAll('script');
  5084. scriptElems.forEach(function (script) {scriptText += ';' + script.textContent;});
  5085. });
  5086. if (scriptText) toElement.appendChild(document.createElement('script')).textContent = scriptText;
  5087. }
  5088. }
  5089.  
  5090. // 添加历史记录
  5091. if (curSite.pager.history && curSite.pager.history == true) {
  5092. window.history.pushState(`{title: ${document.title}, url: ${location.href}}`, newBody.querySelector('title').textContent, curSite.pageUrl);
  5093. }
  5094.  
  5095. // 替换待替换元素
  5096. if (curSite.pager.replaceE) {
  5097. try {
  5098. let oriE = getAllElements(curSite.pager.replaceE),
  5099. repE = getAllElements(curSite.pager.replaceE, newBody, newBody);
  5100. //console.log(oriE, repE);
  5101. if (oriE.length === repE.length) {
  5102. for (let i = 0; i < oriE.length; i++) {
  5103. oriE[i].outerHTML = repE[i].outerHTML;
  5104. }
  5105. }
  5106. } catch (e) {
  5107. console.log(e);
  5108. }
  5109. }
  5110.  
  5111. // 如果有插入后函数就执行函数
  5112. if (curSite.function && curSite.function.after) {
  5113. if (curSite.function.parameter) { // 如果指定了参数
  5114. curSite.function.after(curSite.function.parameter);
  5115. } else {
  5116. curSite.function.after();
  5117. }
  5118. }
  5119. }
  5120. }
  5121. function getElementByCSS(css, contextNode = document) {
  5122. return contextNode.querySelector(css);
  5123. }
  5124. function getAllElementsByCSS(css, contextNode = document) {
  5125. return [].slice.call(contextNode.querySelectorAll(css));
  5126. }
  5127. function getElementByXpath(xpath, contextNode, doc = document) {
  5128. contextNode = contextNode || doc;
  5129. try {
  5130. const result = doc.evaluate(xpath, contextNode, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
  5131. // 应该总是返回一个元素节点
  5132. return result.singleNodeValue && result.singleNodeValue.nodeType === 1 && result.singleNodeValue;
  5133. } catch (err) {
  5134. throw new Error(`Invalid xpath: ${xpath}`);
  5135. }
  5136. }
  5137. function getAllElementsByXpath(xpath, contextNode, doc = document) {
  5138. contextNode = contextNode || doc;
  5139. const result = [];
  5140. try {
  5141. const query = doc.evaluate(xpath, contextNode, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
  5142. for (let i = 0; i < query.snapshotLength; i++) {
  5143. const node = query.snapshotItem(i);
  5144. // 如果是 Element 节点
  5145. if (node.nodeType === 1) result.push(node);
  5146. }
  5147. } catch (err) {
  5148. throw new Error(`无效 Xpath: ${xpath}`);
  5149. }
  5150. return result;
  5151. }
  5152. function getAllElements(selector, contextNode = undefined, doc = document, win = window, _cplink = undefined) {
  5153. if (!selector) return [];
  5154. contextNode = contextNode || doc;
  5155. if (typeof selector === 'string') {
  5156. if (selector.search(/^css;/i) === 0) {
  5157. return getAllElementsByCSS(selector.slice(4), contextNode);
  5158. } else {
  5159. return getAllElementsByXpath(selector, contextNode, doc);
  5160. }
  5161. } else {
  5162. const query = selector(doc, win, _cplink);
  5163. if (!Array.isArray(query)) {
  5164. throw new Error('getAllElements 返回错误类型');
  5165. } else {
  5166. return query;
  5167. }
  5168. }
  5169. }
  5170.  
  5171. // 自定义 locationchange 事件(用来监听 URL 变化)
  5172. function addLocationchange() {
  5173. history.pushState = ( f => function pushState(){
  5174. var ret = f.apply(this, arguments);
  5175. window.dispatchEvent(new Event('pushstate'));
  5176. window.dispatchEvent(new Event('locationchange'));
  5177. return ret;
  5178. })(history.pushState);
  5179.  
  5180. history.replaceState = ( f => function replaceState(){
  5181. var ret = f.apply(this, arguments);
  5182. window.dispatchEvent(new Event('replacestate'));
  5183. window.dispatchEvent(new Event('locationchange'));
  5184. return ret;
  5185. })(history.replaceState);
  5186.  
  5187. window.addEventListener('popstate',()=>{
  5188. window.dispatchEvent(new Event('locationchange'))
  5189. });
  5190. }
  5191.  
  5192. /*// 监听 XMLHttpRequest URL
  5193. var _send = window.XMLHttpRequest.prototype.send
  5194. function sendReplacement(data) {
  5195. console.log(data)
  5196. return _send.apply(this, arguments);
  5197. }
  5198. window.XMLHttpRequest.prototype.send = sendReplacement;
  5199. // 监听 XMLHttpRequest 模式(GET/POST)和数据
  5200. var _open = window.XMLHttpRequest.prototype.open
  5201. function openReplacement(data) {
  5202. console.log(data, arguments)
  5203. return _open.apply(this, arguments);
  5204. }
  5205. window.XMLHttpRequest.prototype.open = openReplacement;*/
  5206. })();