自动无缝翻页

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

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