自动无缝翻页

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