自动无缝翻页

无缝拼接下一页内容(瀑布流),目前支持:[所有「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-21 提交的版本,查看 最新版本

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