自动无缝翻页

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

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

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