自动无缝翻页

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

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

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