自动无缝翻页

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

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

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

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址