自动无缝翻页

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