自动无缝翻页

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

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