自动无缝翻页

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

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

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