自动无缝翻页

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