自动无缝翻页

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

  1. // ==UserScript==
  2. // @name 自动无缝翻页
  3. // @version 4.2.3
  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;.turn-page-num-wrap.selected', '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;ul[aria-labelledby="discussions-list"] > li',
  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. }, // 图集谷 - 图片页
  4884. tujigu_list: {
  4885. pager: {
  4886. type: 1,
  4887. nextL: 'id("pages")/a[contains(text(), "下一页")]',
  4888. pageE: 'css;.hezi > ul > li',
  4889. insertP: ['//div[@class="hezi"][last()]/ul', 3],
  4890. replaceE: 'css;#pages',
  4891. scrollD: 1000
  4892. }
  4893. }, // 图集谷 - 分类页
  4894. mvtui: {
  4895. host: 'mvtui.com',
  4896. functionS: function() {if (indexOF('.html')) {curSite = DBSite.mvtui;} else {curSite = DBSite.mvtui_list;}},
  4897. pager: {
  4898. type: 1,
  4899. nextL: 'css;.article-paging span.current+a',
  4900. pageE: 'css;.article-content > p',
  4901. replaceE: 'css;.article-paging',
  4902. scrollD: 3000
  4903. }
  4904. }, // 美女推 - 图片页
  4905. mvtui_list: {
  4906. pager: {
  4907. type: 1,
  4908. nextL: 'css;li.next-page a',
  4909. pageE: 'css;#posts > div',
  4910. replaceE: 'css;.pagination',
  4911. scrollD: 1500
  4912. },
  4913. function: {
  4914. bF: src_bF,
  4915. pF: [0, 'img[data-src]', 'data-src']
  4916. }
  4917. }, // 美女推 - 分类页
  4918. mzitu: {
  4919. host: 'www.mzitu.com',
  4920. functionS: function() {if (indexOF(/\/\d+/)) {curSite = DBSite.mzitu;getCSS('.main-image a[href]').href = 'javascript:void(0);'} else {curSite = DBSite.mzitu_list;}},
  4921. pager: {
  4922. type: 1,
  4923. nextL: '//div[@class="pagenavi"]/a[contains(string(), "下一页")]',
  4924. pageE: 'css;.main-image img',
  4925. replaceE: 'css;.pagenavi',
  4926. scrollD: 1500
  4927. }
  4928. }, // 妹子图 - 图片页
  4929. mzitu_list: {
  4930. pager: {
  4931. type: 1,
  4932. nextL: 'css;.next.page-numbers',
  4933. pageE: 'css;.postlist > ul > li',
  4934. replaceE: 'css;.pagination',
  4935. scrollD: 1000
  4936. },
  4937. function: {
  4938. bF: src_bF,
  4939. pF: [0, 'img[data-original]', 'data-original']
  4940. }
  4941. }, // 妹子图 - 分类/搜索页
  4942. xiurenji: {
  4943. host: /\.xiurenji\./,
  4944. functionS: function() {insStyle('img[src$=".gif"]:not([src*="logo"]) {display: none !important;}');
  4945. if (indexOF('.html') && !indexOF('/index')) {
  4946. curSite = DBSite.xiurenji;
  4947. } else if (indexOF('search')) {
  4948. curSite = DBSite.xiurenji_search;
  4949. } else {
  4950. curSite = DBSite.xiurenji_list;
  4951. }},
  4952. pager: {
  4953. type: 1,
  4954. nextL: '//div[@class="page"]/a[contains(text(), "后")]',
  4955. pageE: 'css;div.img > p > *',
  4956. replaceE: 'css;.page',
  4957. scrollD: 2000
  4958. }
  4959. }, // 秀人集 - 图片页
  4960. xiurenji_list: {
  4961. pager: {
  4962. type: 1,
  4963. nextL: '//div[@class="page"]/a[contains(text(), "下页")]',
  4964. pageE: 'css;td >.tp2 > *',
  4965. replaceE: 'css;.page',
  4966. scrollD: 1000
  4967. }
  4968. }, // 秀人集 - 分类页
  4969. xiurenji_search: {
  4970. pager: {
  4971. type: 1,
  4972. nextL: 'css;.page > a.current+a',
  4973. pageE: 'css;.node > *',
  4974. replaceE: 'css;.page',
  4975. scrollD: 1000
  4976. }
  4977. }, // 秀人集 - 搜索页
  4978. mmtvv: {
  4979. host: 'mm.tvv.tw',
  4980. functionS: function() {if (lp == '/' || indexOF('/category/')) {curSite = DBSite.mmtvv;}},
  4981. 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;}',
  4982. pager: {
  4983. type: 1,
  4984. nextL: 'css;a.next',
  4985. pageE: 'css;.blog-listing',
  4986. replaceE: 'css;.pagination',
  4987. scrollD: 1500
  4988. }
  4989. }, // 妹妹图
  4990. mm131: {
  4991. host: ['www.mm131.net', 'www.mmm131.com'],
  4992. functionS: function() {if (indexOF('.html')) {curSite = DBSite.mm131;} else {curSite = DBSite.mm131_list;}},
  4993. history: true,
  4994. retry: 300,
  4995. pager: {
  4996. type: 1,
  4997. nextL: '//div[@class="content-page"]/a[contains(text(), "下一页")]',
  4998. pageE: 'css;.content-pic img',
  4999. replaceE: 'css;.content-page',
  5000. scrollD: 2000
  5001. }
  5002. }, // MM131 - 图片页
  5003. mm131_list: {
  5004. pager: {
  5005. type: 1,
  5006. nextL: '//dd[@class="page"]/a[contains(text(), "下一页")]',
  5007. pageE: 'css;dl.list-left > dd:not([class="page"])',
  5008. replaceE: 'css;.page',
  5009. scrollD: 1000
  5010. }
  5011. }, // MM131 - 分类页
  5012. mm131_m: {
  5013. host: 'm.mmm131.com',
  5014. 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;}},
  5015. history: true,
  5016. retry: true,
  5017. pager: {
  5018. type: 1,
  5019. nextL: '//div[@class="paging"]/a[text()="下一张" or text()="下一页"]',
  5020. pageE: 'css;.post-content img',
  5021. replaceE: 'css;.paging',
  5022. scrollD: 2000
  5023. }
  5024. }, // MM131 - 手机版 - 图片页
  5025. mm131_m_list: {
  5026. pager: {
  5027. type: 1,
  5028. nextL: 'css;#xbtn',
  5029. pageE: 'css;#content > article',
  5030. replaceE: 'css;#webpage',
  5031. scrollD: 2000
  5032. },
  5033. function: {
  5034. bF: src_bF,
  5035. pF: [0, 'img[data-img]', 'data-img']
  5036. }
  5037. }, // MM131 - 手机版 - 分类页
  5038. mm131_m_: {
  5039. pager: {
  5040. type: 2,
  5041. nextL: 'css;#webpage>span[onclick]',
  5042. isHidden: true,
  5043. interval: 500,
  5044. scrollD: 2000
  5045. }
  5046. }, // MM131 - 手机版 - 首页
  5047. mrcong: {
  5048. host: 'mrcong.com',
  5049. functionS: function() {if (lp == '/' || indexOF('/tag/')) {curSite = DBSite.mrcong_list;} else {curSite = DBSite.mrcong;}},
  5050. pager: {
  5051. type: 1,
  5052. nextL: 'css;.post-page-numbers.current+a.post-page-numbers',
  5053. pageE: 'css;#fukie2 > p > img',
  5054. replaceE: 'css;.page-link',
  5055. scrollD: 3000
  5056. }
  5057. }, // MrCong - 图片页
  5058. mrcong_list: {
  5059. pager: {
  5060. type: 3,
  5061. nextL: 'css;.current+a.page',
  5062. pageE: 'css;article.item-list',
  5063. scrollE: 'css;.pagination',
  5064. replaceE: 'css;.pagination',
  5065. scrollD: 2000
  5066. }
  5067. }, // MrCong - 分类页
  5068. buondua: {
  5069. host: 'buondua.com',
  5070. functionS: function() {if (indexOF(/-photos-\d+/)) {curSite = DBSite.buondua;} else {curSite = DBSite.buondua_list;}},
  5071. pager: {
  5072. type: 3,
  5073. nextL: '//nav[@class="pagination"]//span[./a[contains(@class, "is-current")]]/following-sibling::span[1]/a',
  5074. pageE: 'css;.article-fulltext > p',
  5075. scrollE: 'css;nav.pagination',
  5076. replaceE: 'css;nav.pagination',
  5077. scrollD: 1500
  5078. },
  5079. function: {
  5080. bF: src_bF,
  5081. pF: [0, 'img[data-src]', 'data-src']
  5082. }
  5083. }, // Buon Dua - 图片页
  5084. buondua_list: {
  5085. pager: {
  5086. type: 3,
  5087. nextL: 'css;.pagination-next',
  5088. pageE: 'css;.items-row.column, .collection-item.column',
  5089. scrollE: 'css;nav.pagination',
  5090. replaceE: 'css;nav.pagination',
  5091. scrollD: 1200
  5092. },
  5093. function: {
  5094. bF: src_bF,
  5095. pF: [0, 'img[data-src]', 'data-src']
  5096. }
  5097. }, // Buon Dua - 分类页
  5098. fnvshen: {
  5099. host: 'www.fnvshen.com',
  5100. functionS: function() {
  5101. if (indexOF('/gallery/') || indexOF('/tag/')) {
  5102. curSite = DBSite.fnvshen_list;
  5103. } else if (indexOF('/g/')) {
  5104. curSite = DBSite.fnvshen;
  5105. } else if (indexOF(/\/article\/\d+\//)) {
  5106. curSite = DBSite.fnvshen_article;
  5107. } else if (indexOF('/article/')) {
  5108. curSite = DBSite.fnvshen_article_list;
  5109. }},
  5110. pager: {
  5111. type: 1,
  5112. nextL: 'id("pages")/a[contains(text(), "下一页")]',
  5113. pageE: 'css;#hgallery > img',
  5114. replaceE: 'css;#pages',
  5115. scrollD: 1000
  5116. }
  5117. }, // 宅男女神 - 图片页
  5118. fnvshen_list: {
  5119. insStyle: '.yalayi_box {display: none !important; margin: -4px 0 !important;}',
  5120. pager: {
  5121. type: 1,
  5122. nextL: '//div[@class="pagesYY"]//a[contains(text(), "下一页")]',
  5123. pageE: 'css;#listdiv > ul > li',
  5124. replaceE: 'css;.pagesYY',
  5125. scrollD: 1000
  5126. },
  5127. function: {
  5128. bF: src_bF,
  5129. pF: [0, 'img[data-original]', 'data-original']
  5130. }
  5131. }, // 宅男女神 - 分类页
  5132. fnvshen_article_list: {
  5133. pager: {
  5134. type: 1,
  5135. nextL: '//div[@class="pagesYY"]//a[contains(text(), "下一页")]',
  5136. pageE: 'css;li.other_girlli',
  5137. replaceE: 'css;.pagesYY',
  5138. scrollD: 1000
  5139. }
  5140. }, //宅男女神 - 文章列表
  5141. fnvshen_article: {
  5142. pager: {
  5143. type: 1,
  5144. nextL: 'css;.pagesYY a.cur+a',
  5145. pageE: 'css;#articleDiv',
  5146. insertP: ['css;#articleDiv', 6],
  5147. replaceE: 'css;.pagesYY',
  5148. scrollD: 1000
  5149. }
  5150. }, // 宅男女神 - 文章内
  5151. xrmn5: {
  5152. host: 'www.xrmn5.cc',
  5153. functionS: function() {if (indexOF(/\d+\.html/)) {
  5154. curSite = DBSite.xrmn5;
  5155. } else if (indexOF('/search')) {
  5156. curSite = DBSite.xrmn5_search;
  5157. } else {
  5158. curSite = DBSite.xrmn5_list;
  5159. }},
  5160. pager: {
  5161. type: 1,
  5162. nextL: '//div[contains(@class, "page")]//a[contains(text(), "下页")]',
  5163. pageE: 'css;.content_left > p > img',
  5164. replaceE: 'css;.page',
  5165. scrollD: 3000
  5166. }
  5167. }, // 秀人美女 - 图片页
  5168. xrmn5_list: {
  5169. pager: {
  5170. type: 1,
  5171. nextL: '//div[contains(@class, "page")]//a[contains(text(), "下页")]',
  5172. pageE: 'css;ul.update_area_lists > li',
  5173. replaceE: 'css;.page',
  5174. scrollD: 2000
  5175. }
  5176. }, // 秀人美女 - 分类页
  5177. xrmn5_search: {
  5178. pager: {
  5179. type: 1,
  5180. nextL: 'css;.page a.current+a',
  5181. pageE: 'css;div.sousuo',
  5182. replaceE: 'css;.page',
  5183. scrollD: 2000
  5184. }
  5185. }, // 秀人美女 - 搜索页
  5186. jpmn8: {
  5187. host: 'www.jpmn8.com',
  5188. functionS: function() {if (indexOF(/\/\d+\.html/)) {curSite = DBSite.jpmn8;} else if (location.pathname != '/') {curSite = DBSite.jpmn8_list;}},
  5189. insStyle: 'img[onload] {min-height: 500px;}',
  5190. pager: {
  5191. type: 1,
  5192. nextL: '//div[@class="pagination1"]//a[text()="下一页"]',
  5193. pageE: 'css;img[onload]',
  5194. replaceE: 'css;.pagination1',
  5195. scrollD: 3000
  5196. }
  5197. }, // 精品美女 - 图片页
  5198. jpmn8_list: {
  5199. pager: {
  5200. type: 1,
  5201. nextL: '//div[@class="pagination1"]//a[text()="下一页"]',
  5202. pageE: 'css;article.excerpt',
  5203. replaceE: 'css;.pagination1',
  5204. scrollD: 1500
  5205. }
  5206. }, // 精品美女 - 分类页
  5207. ku66: {
  5208. host: 'www.ku66.net',
  5209. functionS: function() {if (/\/\d+\.html/.test(location.pathname)) {curSite = DBSite.ku66;} else {curSite = DBSite.ku66_list;}},
  5210. insStyle: '.content img {min-height: 500px;}',
  5211. pager: {
  5212. type: 1,
  5213. nextL: '//div[@class="NewPages"]//a[text()="下一页"]',
  5214. pageE: 'css;.content > img',
  5215. insertP: ['css;.content', 3],
  5216. replaceE: 'css;.NewPages',
  5217. scrollD: 4000
  5218. }
  5219. }, // 美女图片 - 图片页
  5220. ku66_list: {
  5221. pager: {
  5222. type: 1,
  5223. nextL: '//div[@class="NewPages"]//a[text()="下一页"]',
  5224. pageE: 'css;.TypeList > ul > li',
  5225. insertP: ['css;.TypeList > ul', 3],
  5226. replaceE: 'css;.NewPages',
  5227. scrollD: 1000
  5228. }
  5229. }, // 美女图片 - 分类页
  5230. ku66_m: {
  5231. host: 'm.ku66.net',
  5232. functionS: function() {if (/\/\d+\.html/.test(location.pathname)) {curSite = DBSite.ku66_m;} else {curSite = DBSite.ku66_m_list;}},
  5233. insStyle: '.ArticleImageBox img {min-height: 200px;}',
  5234. pager: {
  5235. type: 1,
  5236. nextL: '//div[@class="article_page"]//a[text()="下一页"]',
  5237. pageE: 'css;.ArticleImageBox > *',
  5238. replaceE: 'css;.article_page',
  5239. scrollD: 4000
  5240. }
  5241. }, // 美女图片 - 手机版 - 图片页
  5242. ku66_m_list: {
  5243. pager: {
  5244. type: 1,
  5245. nextL: '//div[@class="article_page"]//a[text()="下一页"]',
  5246. pageE: 'css;.PictureList > ul > li',
  5247. replaceE: 'css;.article_page',
  5248. scrollD: 1000
  5249. }
  5250. }, // 美女图片 - 手机版 - 分类页
  5251. ku137: {
  5252. host: 'www.ku137.net',
  5253. functionS: function() {if (indexOF(/\/\d+\.html/)) {curSite = DBSite.ku137;} else if (location.pathname != '/') {curSite = DBSite.ku137_list;}},
  5254. insStyle: '.Title9, .dibu1, .dibu2 {display: none !important;} .content img {min-height: 500px;}',
  5255. pager: {
  5256. type: 1,
  5257. nextL: '//div[@class="page"]/a[text()="下一页"]',
  5258. pageE: 'css;.content > img',
  5259. replaceE: 'css;.page',
  5260. scrollD: 3000
  5261. }
  5262. }, // 美女写真 - 图片页
  5263. ku137_list: {
  5264. pager: {
  5265. type: 1,
  5266. nextL: '//div[@class="page"]/a[text()="下一页"]',
  5267. pageE: 'css;.m-list > ul > li',
  5268. replaceE: 'css;.page',
  5269. scrollD: 1500
  5270. }
  5271. }, // 美女写真 - 分类页
  5272. ku137_m: {
  5273. host: 'm.ku137.net',
  5274. functionS: function() {if (indexOF(/\/\d+\.html/)) {curSite = DBSite.ku137_m;} else if (location.pathname != '/') {curSite = DBSite.ku137_m_list;}},
  5275. insStyle: '.ArticleImageBox img {min-height: 300px;}',
  5276. pager: {
  5277. type: 1,
  5278. nextL: '//div[@class="article_page"]//a[text()="下一页"]',
  5279. pageE: 'css;.ArticleImageBox > *',
  5280. replaceE: 'css;.article_page',
  5281. scrollD: 3000
  5282. }
  5283. }, // 美女写真 - 手机版 - 图片页
  5284. ku137_m_list: {
  5285. pager: {
  5286. type: 1,
  5287. nextL: '//div[@class="article_page"]//a[text()="下一页"]',
  5288. pageE: 'css;.PictureList > ul > li',
  5289. replaceE: 'css;.article_page',
  5290. scrollD: 1500
  5291. }
  5292. }, // 美女写真 - 手机版 - 分类页
  5293. mnttz: {
  5294. host: 'www.mnttz.com',
  5295. functionS: function() {if (indexOF(/\/\d+\.html/)) {curSite = DBSite.mnttz;} else {curSite = DBSite.mnttz_list;}},
  5296. insStyle: 'img.content_img {min-height: 500px;}',
  5297. pager: {
  5298. type: 1,
  5299. nextL: 'css;.article-paging > span+a',
  5300. pageE: 'css;img.content_img',
  5301. replaceE: 'css;.article-paging',
  5302. scrollD: 3000
  5303. }
  5304. }, // 美女套图 - 图片页
  5305. mnttz_list: {
  5306. pager: {
  5307. type: 1,
  5308. nextL: 'css;li.next-page > a',
  5309. pageE: 'css;article.excerpt',
  5310. replaceE: 'css;.pagination',
  5311. scrollD: 1500
  5312. },
  5313. function: {
  5314. bF: src_bF,
  5315. pF: [0, 'img[data-src]', 'data-src']
  5316. }
  5317. }, // 美女套图 - 分类页
  5318. kingdom: {
  5319. host: ['kingdom-en.com', 'www.kingdom-en.com', 'm.kingdom-en.com'],
  5320. functionS: function() {if (indexOF(/\/\d+\.html/)) {curSite = DBSite.kingdom;} else {curSite = DBSite.kingdom_list;}},
  5321. insStyle: '.pic_center img {min-height: 300px;} .arcmain > .title, .footer, .index-list-title, .listmain_st {display: none !important;}',
  5322. pager: {
  5323. type: 1,
  5324. nextL: '//a[@class="page_next"] | //div[@class="article_page"]//a[text()="下一页"]',
  5325. pageE: 'css;.pic_center img',
  5326. replaceE: '//div[@class="pages2" or @class="article_page"]',
  5327. scrollD: 4000
  5328. }
  5329. }, // King爱模 - 图片页
  5330. kingdom_list: {
  5331. pager: {
  5332. type: 1,
  5333. nextL: () => getCSS('a.page_next').href.replace(/(www.)?ermo.net/, location.hostname).replace(/http(s)?:/, location.protocol),
  5334. pageE: 'css;.channel_list3 > ul > li, ul#container > li',
  5335. replaceE: 'css;.pages, .list_page',
  5336. scrollD: 1000
  5337. }
  5338. }, // King爱模 - 分类页
  5339. kissgoddess: {
  5340. host: ['kissgoddess.com', 'tw.kissgoddess.com', 'jp.kissgoddess.com'],
  5341. functionS: function() {if (indexOF('/album/') || indexOF('/category/')) curSite = DBSite.kissgoddess;},
  5342. insStyle: '.td-gallery-content > img {min-height: 300px;}',
  5343. pager: {
  5344. type: 1,
  5345. nextL: 'css;a.a1:last-of-type',
  5346. pageE: 'css;.td-gallery-content > img, .td-category-span',
  5347. replaceE: 'css;#pages',
  5348. scrollD: 3000
  5349. },
  5350. function: {
  5351. bF: src_bF,
  5352. pF: [0, 'img[data-original]', 'data-original']
  5353. }
  5354. }, // Kiss Goddess - 图片页
  5355. planetminecraft: {
  5356. host: 'www.planetminecraft.com',
  5357. functionS: function() {if (!indexOF('/forums/') && !indexOF('/posts/')) {curSite = DBSite.planetminecraft;}},
  5358. insStyle: '.resource .r-preview>a img[loading=lazy]:not(.lazyloaded) {visibility: initial !important;}',
  5359. history: true,
  5360. pager: {
  5361. type: 1,
  5362. nextL: 'css;a.pagination_next',
  5363. pageE: 'css;.resource_block > ul.resource_list > li',
  5364. replaceE: 'css;.pagination',
  5365. scrollD: 3000
  5366. }
  5367. }, // Planet Minecraft
  5368. cadtutor: {
  5369. host: 'www.cadtutor.net',
  5370. functionS: function() {
  5371. if (indexOF('/forum/forum/')) {
  5372. curSite = DBSite.cadtutor;
  5373. } else if (indexOF('/forum/topic/') && GM_getValue('menu_discuz_thread_page')) {
  5374. curSite = DBSite.cadtutor_post;
  5375. } else if (indexOF('/forum/search/')) {
  5376. curSite = DBSite.cadtutor_search;
  5377. }},
  5378. pager: {
  5379. type: 1,
  5380. nextL: 'css;a[rel="next"]',
  5381. pageE: 'css;ol.ipsDataList > li:not([data-rowid])~li',
  5382. replaceE: 'css;ul.ipsPagination',
  5383. scrollD: 2000
  5384. }
  5385. }, // CADTutor - 列表页
  5386. cadtutor_post: {
  5387. pager: {
  5388. type: 1,
  5389. nextL: 'css;a[rel="next"]',
  5390. pageE: 'css;#elPostFeed > form > *:not(input):not(.after-first-post)',
  5391. replaceE: 'css;ul.ipsPagination',
  5392. scrollD: 2000
  5393. }
  5394. }, // CADTutor - 帖子内
  5395. cadtutor_search: {
  5396. pager: {
  5397. type: 1,
  5398. nextL: 'css;a[rel="next"]',
  5399. pageE: 'css;ol.ipsStream > li',
  5400. replaceE: 'css;ul.ipsPagination',
  5401. scrollD: 2000
  5402. }
  5403. }, // CADTutor - 搜索页
  5404. theswamp: {
  5405. host: 'www.theswamp.org',
  5406. functionS: function() {
  5407. if (!location.search) return
  5408. if (indexOF('board=', 's')) {
  5409. curSite = DBSite.theswamp;
  5410. } else if (indexOF('topic=', 's') && GM_getValue('menu_discuz_thread_page')) {
  5411. curSite = DBSite.theswamp_post;
  5412. }},
  5413. pager: {
  5414. type: 1,
  5415. nextL: 'css;.pagelinks > strong+a',
  5416. pageE: 'css;#messageindex tbody > tr:not([class])',
  5417. replaceE: 'css;.pagelinks',
  5418. scrollD: 2000
  5419. }
  5420. }, // TheSwamp - 列表页
  5421. theswamp_post: {
  5422. pager: {
  5423. type: 1,
  5424. nextL: 'css;.pagelinks > strong+a',
  5425. pageE: 'css;#forumposts form > *',
  5426. replaceE: 'css;.pagelinks',
  5427. scrollD: 2000
  5428. }
  5429. } // TheSwamp - 帖子内
  5430. };
  5431. // 生成 SiteTypeID
  5432. setSiteTypeID();
  5433. // 用于脚本判断(针对部分特殊的网站)
  5434. SiteType = {
  5435. BAIDU_TIEBA: DBSite.baidu_tieba.SiteTypeID
  5436. };
  5437. }
  5438.  
  5439.  
  5440. if (webType != 1) {
  5441. switch (webType) {
  5442. case 2: // < 所有 Discuz!论坛 >
  5443. discuz_(); break;
  5444. case 3: // < 所有 Flarum 论坛 >
  5445. DBSite.flarum.functionS(); break;
  5446. case 4: // < 所有 phpBB 论坛 >
  5447. DBSite.phpbb.functionS(); break;
  5448. case 5: // < 所有 Xiuno 论坛 >
  5449. DBSite.xiuno.functionS(); break;
  5450. case 6: // < 所有 XenForo 论坛 >
  5451. DBSite.xenforo.functionS(); break;
  5452. case 100: // < 所有使用 WordPress DUX 主题的网站 >
  5453. DBSite.dux.functionS(); if (location.hostname === 'apphot.cc') {curSite.pager.scrollD = 2500;}; break;
  5454. case 101: // < 所有使用 WordPress XIU 主题的网站 >
  5455. DBSite.dux.functionS(); curSite.function = {bF: src_bF, pF: [0, 'img.thumb[data-original]', 'data-original']}; break;
  5456. case 102: // < 所有使用 WordPress D8 主题的网站 >
  5457. DBSite.dux.functionS(); delete curSite.function; break;
  5458. case 103: // < 所有使用 WordPress Begin 主题的网站 >
  5459. DBSite.begin.functionS(); break;
  5460. case 200: // < 所有使用 笔趣阁 模板的小说网站 >
  5461. DBSite.biquge.functionS(); break;
  5462. }
  5463. }
  5464.  
  5465. // 显示页码
  5466. if (GM_getValue('menu_page_number')) {pageNumber('add');} else {pageNumber('set');}
  5467. // 左键双击网页空白处暂停翻页
  5468. pausePageEvent();
  5469. // 强制新标签页打开链接(翻页模式 5/6)
  5470. if (curSite.forceTarget) forceTarget();
  5471.  
  5472. // 对于使用 pjax 技术的网站,需要监听 URL 变化来重新判断翻页规则
  5473. if (locationC) {
  5474. nowLocation = location.href
  5475. addLocationchange(); // 自定义 locationChange 事件
  5476. if (webType === 1) {
  5477. window.addEventListener('locationChange', function(){
  5478. lp = location.pathname;
  5479. //console.log(nowLocation, location.href)
  5480. if (curSite.history && window.top.document.xiu_nowUrl === location.href) {nowLocation = location.href; return}
  5481. if (nowLocation == location.href) return
  5482. if (curSite.pager && curSite.pager.type == 5) {
  5483. if (self != top) {window.top.location.href = location.href;} else {if (getCSS('iframe#xiu_iframe')) {getCSS('iframe#xiu_iframe').remove();}}
  5484. pausePage = true;
  5485. } // 对于翻页模式 5,如果是 iframe 框架内 URL 变动,则升级为顶级页面,如果是顶级页面的 URL 变动,则清理 iframe 框架
  5486. nowLocation = location.href; curSite = {SiteTypeID: 0}; pageNum.now = 1; // 重置规则+页码
  5487. registerMenuCommand(); // 重新判断规则
  5488. //console.log(curSite);
  5489. if (curSite.insStyle) {insStyle(curSite.insStyle)} // 插入 Style CSS 样式
  5490. curSite.pageUrl = ''; // 下一页URL
  5491. pageLoading(); // 自动无缝翻页
  5492.  
  5493. if (GM_getValue('menu_page_number')) {pageNumber('add');} else {pageNumber('set');} // 显示页码
  5494. pausePageEvent(); // 左键双击网页空白处暂停翻页
  5495. })
  5496. } else if (webType === 3) {
  5497. window.addEventListener('locationChange', function(){
  5498. lp = location.pathname;
  5499. if (nowLocation == location.href) return
  5500. nowLocation = location.href; curSite = {SiteTypeID: 0}; pageNum.now = 1; // 重置规则+页码
  5501. DBSite.flarum.functionS(); // 重新判断规则
  5502. if (curSite.insStyle) {insStyle(curSite.insStyle)} // 插入 Style CSS 样式
  5503. pageLoading(); // 自动无缝翻页
  5504.  
  5505. if (GM_getValue('menu_page_number')) {pageNumber('add');} else {pageNumber('set');} // 显示页码
  5506. pausePageEvent(); // 左键双击网页空白处暂停翻页
  5507. })
  5508. }
  5509. }
  5510. // 插入 Style CSS 样式
  5511. if (curSite.insStyle) insStyle(curSite.insStyle)
  5512.  
  5513. // 对翻页模式 5 的子 iframe 添加一个跟随滚动的事件
  5514. if (curSite.pager && curSite.pager.type === 5 && self != top) {
  5515. var beforeScrollTop = document.documentElement.scrollTop || document.body.scrollTop
  5516. window.addEventListener('scroll', function (e) {
  5517. let scrollTop = window.parent.document.documentElement.scrollTop || window.parent.document.body.scrollTop,
  5518. clientHeight = window.parent.document.documentElement.clientHeight || window.parent.document.body.clientHeight,
  5519. scrollHeight = window.parent.document.documentElement.scrollHeight || window.parent.document.body.scrollHeight,
  5520. afterScrollTop = document.documentElement.scrollTop || document.body.scrollTop,
  5521. delta = afterScrollTop - beforeScrollTop;
  5522. if (delta == 0) return false;
  5523. beforeScrollTop = afterScrollTop;
  5524. //console.log(delta, scrollHeight - (scrollTop + clientHeight), '2222')
  5525. if (delta > 0 && scrollTop + clientHeight < scrollHeight) {
  5526. window.parent.scrollBy(0, delta*2);
  5527. }
  5528. }, false);
  5529. }
  5530.  
  5531. curSite.pageUrl = ''; // 下一页URL
  5532. //console.log(curSite);
  5533. pageLoading(); // 自动无缝翻页
  5534.  
  5535.  
  5536. // --------------------------------------------------------
  5537.  
  5538.  
  5539. // [Discuz! 论坛] 判断各版块帖子列表类型
  5540. function discuzForum() {
  5541. if (getCSS('#autopbn')) { // 判断是否有 [下一页] 按钮
  5542. curSite = DBSite.discuz_forum;
  5543. } else if (getCSS('#waterfall')) { // 判断是否为图片模式
  5544. if (!getCSS('#pgbtn, .pgbtn')) { // 如果各版块帖子列表已存在这个元素,说明自带了无缝翻页
  5545. curSite = DBSite.discuz_waterfall; waterfallStyle(); // 图片模式列表样式预处理
  5546. }
  5547. } else {
  5548. curSite = DBSite.discuz_guide;
  5549. }
  5550. }
  5551. function discuz_() {
  5552. if (getCSS('body[id="nv_forum"][class^="pg_"][onkeydown*="27"]')) {
  5553. switch (getCSS('body[id="nv_forum"][class^="pg_"][onkeydown*="27"]').className) {
  5554. case 'pg_forumdisplay': // < 各版块帖子列表 >
  5555. discuzForum(); break;
  5556. case 'pg_viewthread': // < 帖子内 >
  5557. if (GM_getValue('menu_discuz_thread_page')) curSite = DBSite.discuz_thread; break;
  5558. case 'pg_guide': // < 导读帖子列表等 >
  5559. curSite = DBSite.discuz_guide; break;
  5560. case 'pg_collection': // < 淘贴列表 >
  5561. curSite = DBSite.discuz_collection; break;
  5562. }
  5563. }
  5564. // 如果上面没有匹配的则继续 < 搜索结果 >
  5565. if (curSite.SiteTypeID === 0) {
  5566. if (indexOF('search') || getCSS('body[id="nv_search"][onkeydown*="27"]')) {
  5567. curSite = DBSite.discuz_search;
  5568. }
  5569. }
  5570. // 如果上面没有匹配的则继续
  5571. if (curSite.SiteTypeID === 0) {
  5572. if (indexOF('.html')) { // 判断是不是静态网页(.html 结尾)
  5573. if (indexOF('/forum-')) { // < 各版块帖子列表 >
  5574. discuzForum();
  5575. } else if (indexOF('/thread-')) { // < 帖子内 >
  5576. if (GM_getValue('menu_discuz_thread_page')) curSite = DBSite.discuz_thread;
  5577. }
  5578. }
  5579. }
  5580. // 如果上面没有匹配的则继续
  5581. if (curSite.SiteTypeID === 0) {
  5582. if (indexOF('mod=forumdisplay', 's') || indexOF('forumdisplay.php')) { // < 各版块帖子列表 >
  5583. discuzForum();
  5584. } else if (indexOF('mod=viewthread', 's') || indexOF('viewthread.php')) { // < 帖子内 >
  5585. if (GM_getValue('menu_discuz_thread_page')) curSite = DBSite.discuz_thread;
  5586. } else if (indexOF('mod=guide', 's')) { // < 导读帖子列表 >
  5587. curSite = DBSite.discuz_guide;
  5588. } else if(indexOF('mod=space', 's') && indexOF('do=thread', 's')) { // 别人的主题/回复
  5589. curSite = DBSite.discuz_youspace;
  5590. } else if (indexOF('mod=collection', 's')) { // < 淘贴列表 >
  5591. curSite = DBSite.discuz_collection;
  5592. } else if (getCSS('#threadlist')) { // < 部分论坛的各板块 URL 是自定义的 >
  5593. discuzForum();
  5594. } else if (getCSS('#postlist')) { // < 部分论坛的帖子内 URL 是自定义的 >
  5595. if (GM_getValue('menu_discuz_thread_page')) curSite = DBSite.discuz_thread;
  5596. }
  5597. }
  5598. }
  5599. // [Discuz! 论坛] 图片模式列表样式预处理
  5600. function waterfallStyle() {
  5601. let width = getCSS('#waterfall > li:first-child').style.width;
  5602. 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;}`);
  5603. }
  5604.  
  5605.  
  5606. // [谷歌搜索] 的插入前函数(加载视频图片)
  5607. function google_bF(pageElems) {
  5608. if (!indexOF('tbm=nws', 's')){
  5609. pageElems.forEach(function (one) {
  5610. getAllCSS('a[aria-label][href*="https://www.youtube.com/watch?v="]').forEach(function (one1) {
  5611. let img = getCSS('img', one1)
  5612. if (img) img.src = `https://i.ytimg.com/vi/${one1.href.split('?v=')[1]}/mqdefault.jpg`
  5613. })
  5614. });
  5615. }
  5616. return pageElems
  5617. }
  5618.  
  5619.  
  5620. // [必应搜索] 的插入前函数(加载网站图标)
  5621. function bing_bF(pageElems) {
  5622. pageElems.forEach(function (one) {
  5623. getAllCSS('div.rms_iac[data-src]').forEach(function (one1) {
  5624. one1.outerHTML = `<img src="${one1.dataset.src}" height="16" width="16" alt="全球 Web 图标" role="presentation" class="rms_img">`;
  5625. })
  5626. });
  5627. return pageElems
  5628. }
  5629.  
  5630.  
  5631. // [头条搜索] 的插入前函数(过滤相关搜索)
  5632. function toutiao_bF(pageElems) {
  5633. if (getXpath('//div[contains(@class,"-header") and string()="相关搜索"]', pageElems[pageElems.length - 1])) pageElems[pageElems.length - 1].style.display = 'none';
  5634. return pageElems
  5635. }
  5636.  
  5637.  
  5638. // [Startpage] 获取下一页地址
  5639. function startpage_nextL() {
  5640. let form = getXpath('//div[contains(@class, "pagination ")]/form[./button[@class="pagination__next-prev-button next"]]'), value;
  5641. if (form) {
  5642. form.querySelectorAll('input[name]').forEach(function(input) {value += input.name + '=' + input.value + '&';}) // 生成表单参数
  5643. value = encodeURI(value.replace(/&$/,'')); // 清理最后一个 & 符号
  5644. if (form.action && value) return (form.action + '?' + value)
  5645. }
  5646. return '';
  5647. }
  5648.  
  5649.  
  5650. // [SkrBT] 获取下一页地址
  5651. function skrbt_nextL() {
  5652. let page = getCSS('a[onclick][aria-label="Next"]');
  5653. if (page) {page = /(?<=\()\d+(?=\))/.exec(page.onclick)[0];} else {return '';} // 获取下一页页码
  5654. if (page) {
  5655. let action = getCSS('#search-form').action, value = ''; // 获取提交表单 URL
  5656. getAllCSS('#search-form input[name]').forEach(function(input) {value += input.name + '=' + input.value + '&';}) // 生成表单参数
  5657. value = encodeURI(value.replace(/&$/,'').replace(/p=\d+/,'p=' + page)); // 清理最后一个 & 符号,并替换页码
  5658. if (action && value) return (action + '?' + value)
  5659. }
  5660. return '';
  5661. }
  5662.  
  5663.  
  5664. // [百度贴吧](发帖按钮点击事件)
  5665. function baidu_tieba_1() {
  5666. let button = getCSS('.tbui_aside_fbar_button.tbui_fbar_post > a');
  5667. if (button) {
  5668. button.remove();
  5669. 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>')
  5670. button = getCSS('.tbui_aside_fbar_button.tbui_fbar_post > a');
  5671. if (button) {
  5672. button.onclick = function(){
  5673. let button2 = getCSS('div.edui-btn.edui-btn-fullscreen.edui-btn-name-portrait');
  5674. if (button2) {button2.click();} else {alert('提示:登录后才能发帖!');}
  5675. return false;
  5676. }
  5677. }
  5678. }
  5679. }
  5680. // [百度贴吧] 插入数据
  5681. function baidu_tieba_insertE(pageElems, type) {
  5682. if (!pageElems) return
  5683. // 获取 <script> 内容
  5684. const scriptElems = getXpath(`//script[contains(text(), 'Bigpipe.register("frs-list/pagelet/thread_list", ')]`, pageElems, pageElems);
  5685. if (scriptElems) {
  5686. // 从 <script> 中提取帖子列表字符串
  5687. let scriptText = scriptElems.textContent.replace('Bigpipe.register("frs-list/pagelet/thread_list", ','');
  5688. scriptText = scriptText.slice(0, scriptText.indexOf(').'));
  5689. // 字符串转 Element 元素
  5690. let temp_baidu_tieba = document.createElement('div'); temp_baidu_tieba.innerHTML = JSON.parse(scriptText).content;
  5691. processElems(temp_baidu_tieba);
  5692. }
  5693. }
  5694.  
  5695.  
  5696. // [V2EX] 的插入后函数(新标签页打开链接)
  5697. function v2ex_aF(css) {
  5698. let links = getAllCSS(css);if (!links) return
  5699. links.forEach(function (_this) {_this.target = '_blank';});
  5700. }
  5701.  
  5702.  
  5703. // [龙的天空] 获取下一页地址
  5704. function lkong_nextL() {
  5705. let next = getCSS('li.ant-pagination-next'), page;
  5706. if (next && next.getAttribute('aria-disabled') === 'false') {
  5707. page = getCSS('li.ant-pagination-item-active[title]');
  5708. if (page && page.title) {
  5709. return (location.origin + location.pathname + '?page=' + ++page.title);
  5710. }
  5711. }
  5712. return '';
  5713. }
  5714.  
  5715.  
  5716. // [游民星空-攻略] 的插入前函数(移除下一页底部的 "更多相关内容请关注:xxx" 文字)
  5717. function gamersky_gl_bF(pageElems) {
  5718. pageElems.forEach(function (one) {if (one.tagName === 'P' && one.textContent.indexOf('更多相关内容请关注') > -1) {one.style.display = 'none';}});
  5719. return pageElems
  5720. }
  5721.  
  5722.  
  5723. // [NexusMods] 获取下一页地址
  5724. function nexusmods_nextL() {
  5725. if (getCSS('.nexus-ui-blocker')) return
  5726. let modList;
  5727. if (indexOF('/news')) {modList = RH_NewsTabContent;} else {modList = RH_ModList;}
  5728. let out_items = JSON.stringify(modList.out_items).replace(/{|}|"/g,''),
  5729. nextNum = getXpath('//div[contains(@class, "pagenav")][1]//a[contains(@class, "page-selected")]/parent::li/following-sibling::li/a'),
  5730. categories = modList.out_items.categories, categoriesUrl = '';
  5731. var url = '';
  5732. if (nextNum && nextNum.innerText) {
  5733. nextNum = nextNum.innerText;
  5734. if (out_items.indexOf('page:') > -1) {
  5735. out_items = out_items.replace(/page:\d+/, `page:${nextNum}`)
  5736. } else {
  5737. out_items += `,page:${nextNum}`;
  5738. }
  5739. if (categories && categories != []) {
  5740. for (let i = 0; i < categories.length; i++) {
  5741. categoriesUrl += `,categories[]:${categories[i]}`
  5742. }
  5743. categoriesUrl = categoriesUrl.replace(/,/,'');
  5744. if (out_items.indexOf('categories:') > -1) {
  5745. out_items = out_items.replace(/categories:\[.*\]/, categoriesUrl)
  5746. }
  5747. }
  5748. return `https://www.nexusmods.com${modList.uri}?RH_${modList.id}=${out_items}`
  5749. }
  5750. return ''
  5751. }
  5752. // [NexusMods] 的插入前函数(隐藏底部元素)
  5753. function nexusmods_bF(pageElems) {
  5754. pageElems.forEach(function (one) {
  5755. let now = one.querySelector('.mod-tile-left');
  5756. if (now) {
  5757. let downloadCount = now.querySelector('.downloadcount > span.flex-label');
  5758. if (downloadCount) {
  5759. if (GlobalModStats[now.dataset.gameId] && GlobalModStats[now.dataset.gameId][now.dataset.modId]) {
  5760. downloadCount.textContent = shortFormat(parseInt(GlobalModStats[now.dataset.gameId][now.dataset.modId].total));
  5761. }
  5762. }
  5763. }
  5764. });
  5765. return pageElems
  5766. }
  5767.  
  5768.  
  5769. // [cs_rin_ru] 各版块帖子列表的插入前函数(过滤置顶帖子)
  5770. function cs_rin_ru_bF(pageElems) {
  5771. for (let i = 0; i < pageElems.length; i++) {
  5772. if (pageElems[i].textContent.replace(/\n| /g,'') === 'Topics') {
  5773. pageElems.splice(0,i+1);
  5774. break;
  5775. }
  5776. }
  5777. return pageElems
  5778. }
  5779.  
  5780.  
  5781. // [bilibili_search] 获取下一页地址
  5782. function bilibili_search_nextL() {
  5783. if (!location.search) return
  5784. let pageActive = 1, pageLast = parseInt(getXpath('//ul[@class="pages"]/li[contains(@class, "page-item")][not(contains(@class, "next") or contains(@class, "prev"))][last()]').innerText);
  5785. if (!pageLast) return
  5786. if (indexOF(/page=\d+/, 's')) {
  5787. pageActive = parseInt(/page=\d+/.exec(location.search)[0].replace('page=',''))
  5788. }
  5789. if (pageActive < pageLast) {
  5790. if (indexOF(/page=\d+/, 's')) {
  5791. return (location.origin + location.pathname + location.search.replace(/page=\d+/,`page=${pageActive+1}`))
  5792. } else {
  5793. return (location.origin + location.pathname + location.search + `&page=${pageActive+1}`)
  5794. }
  5795. }
  5796. }
  5797. // [bilibili_search] 插入后函数(加载图片)
  5798. function bilibili_search_aF() {
  5799. let result = __INITIAL_STATE__.flow[__INITIAL_STATE__.flow.fields[0]].result;
  5800. if (result.length > 0) {
  5801. let imgArr = getAllCSS('.img > .lazy-img > img[src=""]');
  5802. if (imgArr.length > 0) {
  5803. for (let i = 0; i < imgArr.length; i++) {
  5804. imgArr[i].src = result[i].pic;
  5805. }
  5806. }
  5807. }
  5808. }
  5809.  
  5810.  
  5811. // [Anime1] 获取下一页内容(叠加)
  5812. function anime1_nextL() {
  5813. let next = getCSS('#tablepress-1_next');
  5814. if (next && next.className.indexOf('disabled') === -1) {
  5815. let oldList = getCSS('tbody.row-hover').innerHTML;
  5816. if (oldList) {
  5817. next.click();
  5818. pageNum.now = pageNum._now + 1;
  5819. getCSS('tbody.row-hover').insertAdjacentHTML('afterbegin', oldList); // 插入到列表头部
  5820. }
  5821. }
  5822. }
  5823.  
  5824.  
  5825. // [BTHaha] 的插入前函数(隐藏底部元素)
  5826. function bthaha_bF(pageElems) {
  5827. pageElems.forEach(function (one) {
  5828. let now = one.querySelector('[id^="list_top"], [id^="list_bottom"]')
  5829. if (now) {one.hidden = true;}
  5830. });
  5831. return pageElems
  5832. }
  5833.  
  5834.  
  5835. // [RARBG] 的插入前函数(鼠标指向显示封面)
  5836. function rarbg_bF(pageElems) {
  5837. pageElems.forEach(function (one) {
  5838. one.querySelectorAll('td > a[onmouseover][onmouseout]').forEach(function (now) {
  5839. now.parentElement.parentElement.setAttribute('onmouseover', now.getAttribute('onmouseover')); now.removeAttribute('onmouseover');
  5840. now.parentElement.parentElement.setAttribute('onmouseout', now.getAttribute('onmouseout')); now.removeAttribute('onmouseout');
  5841. });
  5842. });
  5843. return pageElems
  5844. }
  5845.  
  5846.  
  5847. // [LRepacks] 的插入前函数(调整 class)
  5848. function lrepacks_bF(pageElems) {
  5849. pageElems.forEach(function (one) {
  5850. let now = one.querySelector('.slideUp, .elementFade')
  5851. if (now) {
  5852. now.className = now.className.replace('slideUp','slideUpRun').replace('elementFade','elementFadeRun');
  5853. }
  5854. });
  5855. return pageElems
  5856. }
  5857.  
  5858.  
  5859. // [漫画狂] 获取下一页地址
  5860. function cartoonmad_nextL() {
  5861. let url = getXpath('//a[@class="pages"][contains(text(),"下一頁")]');
  5862. if (url) {
  5863. if (url.getAttribute('href') === 'thend.asp') {
  5864. url = getXpath('//a[@class="pages"][contains(string(),"下一話")]')
  5865. if (url) return url.href;
  5866. pausePage = false;
  5867. GM_notification({text: `注意:该网站早期漫画(如海贼王、柯南)因为网站自身问题而无法翻至下一话(仅限于显示为 [第 X 卷]/[下一卷] 的)。\n因此需要手动去 [目录页] 进入下一卷!`, timeout: 10000});
  5868. } else {
  5869. return url.href;
  5870. }
  5871. }
  5872. return '';
  5873. }
  5874.  
  5875.  
  5876. // [漫画猫] 初始化(显示本话所以图片)
  5877. function manhuacat_init() {
  5878. let _img = '';
  5879. for (let now of img_data_arr) {_img += `<img src="${asset_domain}${img_pre}${now}">`;}
  5880. getOne(curSite.pager.insertP[0]).innerHTML = _img;
  5881.  
  5882. }
  5883. // [漫画猫] 获取下一页地址
  5884. function manhuacat_nextL(pageElems, type) {
  5885. if (type === 'url') {
  5886. if(pageElems.code == '0000') {
  5887. if (pageElems.url === curSite.pageUrl) return
  5888. curSite.pageUrl = pageElems.url;
  5889. getPageElems_(curSite.pageUrl); // 真正的下一页链接
  5890. }
  5891. } else {
  5892. let vg_r_data = getCSS('.vg-r-data');
  5893. if (vg_r_data) {
  5894. getPageElems_(`${location.origin}/chapter_num?chapter_id=${vg_r_data.dataset.chapter_num}&ctype=1&type=${vg_r_data.dataset.chapterType};`, 'json', 'GET', '', 'url');
  5895. }
  5896. }
  5897. }
  5898. // [漫画猫] 插入数据
  5899. function manhuacat_insertE(pageElems, type) {
  5900. if (!pageElems) return
  5901. if (type === 'url') { // 获取下一页链接
  5902. manhuacat_nextL(pageElems, type); return
  5903. }
  5904. addHistory(pageElems);
  5905. replaceElems(pageElems);
  5906.  
  5907. // 插入图片
  5908. 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');;
  5909. for (let now of _img_arr) {_img += `<img src="${vg_r_data.dataset.chapterDomain}${img_pre}${now}">`;}
  5910. if (_img) {
  5911. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中
  5912. pageNum.now = pageNum._now + 1
  5913. }
  5914. }
  5915.  
  5916.  
  5917. // [漫画柜] 初始化(将本话其余图片插入网页中)
  5918. function manhuagui_init() {
  5919. // hook imgDate 代码
  5920. SMH.imgData = function(n) {window['imgDate'] = n;return{preInit:function(){}}}
  5921. // 重新执行本页的 imgDate 代码
  5922. insScript(curSite.pager.pageE);
  5923. let _img = '', imgPath = `${location.protocol}//i.hamreus.com${window['imgDate'].path}`;
  5924. //console.log(imgPath, window['imgDate'])
  5925. if (!(window['imgDate']) || !(imgPath)) return
  5926. // 遍历图片文件名数组,组合为 img 标签
  5927. 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}">`;}
  5928. // 插入并覆盖原来的一个图片
  5929. getOne(curSite.pager.insertP[0]).innerHTML = _img;
  5930. pausePage = true;
  5931. }
  5932. // [漫画柜] 获取下一页地址
  5933. function manhuagui_nextL() {
  5934. if (window['imgDate'].nextId == 0) return
  5935. var url = location.origin + location.pathname.replace(window['imgDate'].cid.toString(), window['imgDate'].nextId.toString())
  5936. if (url === curSite.pageUrl) return
  5937. curSite.pageUrl = url
  5938. getPageElems_(curSite.pageUrl);
  5939. }
  5940. // [漫画柜] 插入数据
  5941. function manhuagui_insertE(pageElems, type) {
  5942. if (!pageElems) return
  5943. // 重新执行本页的 imgDate 代码
  5944. insScript(curSite.pager.pageE, document.body, pageElems);
  5945. let _img = '', imgPath = `${location.protocol}//i.hamreus.com${window['imgDate'].path}`;
  5946. //console.log(imgPath, window['imgDate'])
  5947. if (!(window['imgDate']) || !(imgPath)) return
  5948. // 遍历图片文件名数组,组合为 img 标签
  5949. 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}">`;}
  5950. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img);
  5951. addHistory(pageElems);
  5952. pageNum.now = pageNum._now + 1
  5953. }
  5954.  
  5955.  
  5956. // [漫画 DB] 初始化(将本话其余图片插入网页中)
  5957. function manhuadb_init() {
  5958. let _img = '', data = getCSS('.vg-r-data'), imgDate;
  5959. if (!data) return
  5960. getAllCSS(curSite.pager.pageE.replace('css;', '')).forEach(function (one) {
  5961. if (one.tagName === 'SCRIPT' && one.textContent.indexOf('var img_data =') > -1) {
  5962. let json = JSON.parse(window.atob(one.textContent.split("'")[1]));
  5963. if (json) {
  5964. let _img = '';
  5965. 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}">`;}
  5966. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中
  5967. }
  5968. }
  5969. })
  5970. }
  5971. // [漫画 DB] 获取下一页地址
  5972. function manhuadb_nextL() {
  5973. let nextArr = getAllCSS('a.fixed-a-es'), next;
  5974. var url = '';
  5975. if (nextArr.length == 0) return
  5976. for (let i = 0; i < nextArr.length; i++) {
  5977. if (nextArr[i].className.indexOf('active') > -1) {
  5978. if (nextArr[i+1]) url = nextArr[i+1].href;
  5979. break;
  5980. }
  5981. }
  5982. if (url === curSite.pageUrl) return
  5983. curSite.pageUrl = url
  5984. getPageElems_(curSite.pageUrl);
  5985. }
  5986. // [漫画 DB] 插入数据
  5987. function manhuadb_insertE(pageElems, type) {
  5988. if (!pageElems) return
  5989. if (replaceElems(pageElems, curSite.pager.pageE, curSite.pager.pageE)) {
  5990. addHistory(pageElems);
  5991. pageNum.now = pageNum._now + 1
  5992. manhuadb_init(); // 将刚刚替换的图片插入网页中
  5993. }
  5994. }
  5995.  
  5996.  
  5997. // [HiComic(嗨漫画)] 初始化(将本话其余图片插入网页中)
  5998. function hicomic_init() {
  5999. let _img = '';
  6000. getAllCSS('.chapter > section:not(:first-child) > section[val]').forEach(function (one) {
  6001. let src = one.getAttribute('val');
  6002. if (src.indexOf('!p_c_c_') === -1) src += '!p_c_c_h'
  6003. _img += `<img src="${src}">`
  6004. })
  6005. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中
  6006. window.document.title = window.document.title.replace(/(\(第.+\))? - HiComic/, `(${getCSS('.chapter_name').textContent}) - HiComic`); // 修改网页标题(加上 第 X 话)
  6007. }
  6008. // [HiComic(嗨漫画)] 获取下一页地址
  6009. function hicomic_nextL() {
  6010. let nextId;
  6011. nextId = getCSS('.next_chapter:not(.end)')
  6012. if (nextId && nextId.id && nextId.id != 'None') {
  6013. curSite.pageUrl = location.href;
  6014. getPageElems_(`https://www.hicomic.net/api/web/chapter/${nextId.id}/contents`, 'json');
  6015. }
  6016. }
  6017. // [HiComic(嗨漫画)] 插入数据
  6018. function hicomic_insertE(pageElems, type) {
  6019. if (!pageElems || pageElems.code != 200) return
  6020. if (pageElems.results.chapter.next) { // 写入下一页的 UUID
  6021. getCSS('.next_chapter').id = pageElems.results.chapter.next;
  6022. } else {
  6023. getCSS('.next_chapter').id = 'None';
  6024. getCSS('.next_chapter').classList.add('end');
  6025. }
  6026. curSite.pageUrl =`https://www.hicomic.net/chapters/${pageElems.results.chapter.uuid}/contents`
  6027. getCSS('.chapter_name').textContent = pageElems.results.chapter.name; // 修改漫画标题
  6028. addHistory(pageElems, window.document.title.replace(/(\(第.+\))? - HiComic/, `(${pageElems.results.chapter.name}) - HiComic`));
  6029. let _img = '';
  6030. for (let i = 0; i < pageElems.results.chapter.contents.length; i++) { // 遍历图片文件名数组,组合为 img 标签
  6031. let src = pageElems.results.chapter.contents[i].url;
  6032. if (src.indexOf('!p_c_c_') === -1) src += '!p_c_c_h';
  6033. _img += `<img src="${src}">`
  6034. }
  6035. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中
  6036. pageNum.now = pageNum._now + 1
  6037. }
  6038.  
  6039.  
  6040. // [动漫之家] 初始化(调整本话其余图片)
  6041. function dmzj_init(css) {
  6042. let _img = '';
  6043. getAllCSS(css).forEach(function (one) {_img += `<img src="${one.dataset.original}">`;})
  6044. getOne(curSite.pager.insertP[0]).innerHTML = _img;
  6045. }
  6046. // [动漫之家] 插入数据
  6047. function dmzj_insertE(pageElems, type) {
  6048. if (!pageElems) return
  6049. // 插入并运行 <script>
  6050. insScript('css;head > script[type]:not([src])', document.body, pageElems);
  6051.  
  6052. // 插入图片
  6053. let _img = '', _img_arr;
  6054. if (pages.indexOf('|') === -1) {
  6055. _img_arr = JSON.parse(pages.replace(/\r\n/g,'|')).page_url.split('|');
  6056. } else {
  6057. _img_arr = JSON.parse(pages).page_url.split('|');
  6058. }
  6059. for (let now of _img_arr) {
  6060. _img += `<img src="${img_prefix}${now}">`;
  6061. }
  6062. if (_img) {
  6063. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中
  6064. addHistory(pageElems);
  6065. if (replaceElems(pageElems)) pageNum.now = pageNum._now + 1
  6066. }
  6067. }
  6068. // [动漫之家-漫画] 插入数据
  6069. function dmzj_manhua_insertE(pageElems, type) {
  6070. if (!pageElems) return
  6071. // 插入并运行 <script>
  6072. insScript('css;head > script[type]:not([src])', document.body, pageElems);
  6073.  
  6074. // 插入图片
  6075. let _img = '';
  6076. for (let now of arr_pages) {
  6077. _img += `<img src="${img_prefix}${now}">`;
  6078. }
  6079. if (_img) {
  6080. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中
  6081. addHistory(pageElems);
  6082. if (replaceElems(pageElems)) pageNum.now = pageNum._now + 1
  6083. }
  6084. }
  6085.  
  6086.  
  6087. // [动漫戏说] 插入后函数(加载图片)
  6088. function acgn_aF() {
  6089. let old = getAllCSS('.pic[_src][id]'), _img = '';
  6090. if (old.length > 0) {
  6091. for (let now of old) {now.outerHTML = `<div class="pic" _src="${now.getAttribute('_src')}"><img src="${now.getAttribute('_src')}" class="img1"></div>`;}
  6092. }
  6093. }
  6094.  
  6095.  
  6096. // [漫画星球] 插入数据
  6097. function mhxqiu_insertE(pageElems, type) {
  6098. if (!pageElems) return
  6099. // 插入并运行 <script>
  6100. insScript('//script[contains(text(), "eval") and contains(text(), "newImgs")]', document.body, pageElems);
  6101.  
  6102. // 插入图片
  6103. let _img = '';
  6104. 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>`;}
  6105. if (_img) {
  6106. // 将 img 标签插入到网页中
  6107. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img);
  6108. addHistory(pageElems);
  6109. pageNum.now = pageNum._now + 1
  6110. replaceElems(pageElems)
  6111. }
  6112. }
  6113.  
  6114.  
  6115. // [风之动漫] 插入数据
  6116. function fffdm_insertE(pageElems, type) {
  6117. if (!pageElems) return
  6118. // 插入并运行 <script>
  6119. let scriptElems = getXpath('id("main")/script[contains(text(), "mhpicurl")][1]', pageElems, pageElems);
  6120. if (scriptElems) {
  6121. document.body.appendChild(document.createElement('script')).textContent = scriptElems.textContent.replace(/document\.write.+/, '');
  6122.  
  6123. // 插入图片
  6124. setTimeout(function() {
  6125. getOne(curSite.pager.insertP[0]).appendChild(document.createElement('img')).src = mhpicurl;
  6126. addHistory(pageElems);
  6127. pageNum.now = pageNum._now + 1
  6128. replaceElems(pageElems)
  6129. }, 100)
  6130. }
  6131. }
  6132.  
  6133.  
  6134. // [乐语漫画] 初始化(调整本话其余图片)
  6135. function leyuman_init() {
  6136. let _img = '';
  6137. for (let one of JSON.parse(z_img)) {
  6138. if (one.slice(0,4) === 'http') {
  6139. _img += `<img src="${one}">`;
  6140. } else {
  6141. _img += `<img src="https://img.shishi-life.com/${one}">`;
  6142. }
  6143. }
  6144. getOne(curSite.pager.insertP[0]).innerHTML = _img;
  6145.  
  6146. }
  6147. // [乐语漫画] 插入数据
  6148. function leyuman_insertE(pageElems, type) {
  6149. if (!pageElems) return
  6150. // 插入并运行 <script>
  6151. insScript('//body//script[not(@src)][contains(text(), "z_img=")]', document.body, pageElems);
  6152.  
  6153. // 插入图片
  6154. let _img = '';
  6155. for (let one of JSON.parse(z_img)) {
  6156. if (one.slice(0,4) === 'http') {
  6157. _img += `<img src="${one}">`;
  6158. } else {
  6159. _img += `<img src="https://img.shishi-life.com/${one}">`;
  6160. }
  6161. }
  6162. if (_img) {
  6163. // 将 img 标签插入到网页中
  6164. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img);
  6165. addHistory(pageElems);
  6166. pageNum.now = pageNum._now + 1
  6167. replaceElems(pageElems)
  6168. }
  6169. }
  6170.  
  6171.  
  6172. // [新新漫画] 初始化(调整本话其余图片)
  6173. function _77mh_init() {
  6174. let _img = '';
  6175. for (let one of arr) {_img += `<img src="${img_qianz}${one}">`;}
  6176. getOne(curSite.pager.insertP[0]).innerHTML = _img;
  6177. }
  6178. // [新新漫画] 获取下一页地址
  6179. function _77mh_nextL() {
  6180. let next = nextLink_b
  6181. if (next && next != curSite.pageUrl) {
  6182. curSite.pageUrl = next;
  6183. getPageElems_(curSite.pageUrl);
  6184. }
  6185. }
  6186. // [新新漫画] 插入数据
  6187. function _77mh_insertE(pageElems, type) {
  6188. if (!pageElems) return
  6189. // 插入并运行 <script>
  6190. insScript('//script[not(@src)][contains(text(), "eval(")]', document.body, pageElems);
  6191.  
  6192. // 插入图片
  6193. let _img = '';
  6194. for (let one of msg.split('|')) {_img += `<img src="${img_qianz}${one}.webp">`;}
  6195. if (_img) {
  6196. // 将 img 标签插入到网页中
  6197. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img);
  6198. addHistory(pageElems);
  6199. pageNum.now = pageNum._now + 1
  6200. }
  6201. }
  6202.  
  6203.  
  6204. // [古风漫画网] 获取下一页地址
  6205. function gufengmh_nextL() {
  6206. let pageElems = getOne(curSite.pager.pageE); // 寻找数据所在元素
  6207. if (pageElems) {
  6208. let comicUrl, nextId;
  6209. var url = '';
  6210. pageElems.textContent.split(';').forEach(function (one){ // 分号 ; 分割为数组并遍历
  6211. //console.log(one)
  6212. if (one.indexOf('comicUrl') > -1) { // 下一页 URL 前半部分
  6213. comicUrl = one.split('"')[1];
  6214. } else if (one.indexOf('nextChapterData') > -1) { // 下一页 URL 的后半部分 ID
  6215. nextId = one.split('"id":')[1].split(',')[0];
  6216. }
  6217. })
  6218. if (comicUrl && nextId && nextId != 'null') { // 组合到一起就是下一页 URL
  6219. url = comicUrl + nextId + '.html'
  6220. if (url === curSite.pageUrl) return
  6221. curSite.pageUrl = url
  6222. getPageElems_(curSite.pageUrl); // 访问下一页 URL 获取
  6223. }
  6224. }
  6225. }
  6226. // [古风漫画网] 插入数据
  6227. function gufengmh_insertE(pageElems, type) {
  6228. if (pageElems) {
  6229. let url = curSite.pageUrl;
  6230. pageElems = getOne(curSite.pager.pageE, pageElems, pageElems);
  6231. let chapterImages, chapterPath;
  6232. getOne(curSite.pager.pageE).innerText = pageElems.textContent; // 将当前网页内的数据所在元素内容改为刚刚获取的下一页数据内容,以便循环获取下一页 URL
  6233. pageElems.textContent.split(';').forEach(function (one){ // 分号 ; 分割为数组并遍历
  6234. //console.log(one)
  6235. if (one.indexOf('chapterImages') > -1) { // 图片文件名数组
  6236. chapterImages = one.replace(/^.+\[/, '').replace(']', '').replaceAll('"', '').split(',')
  6237. } else if (one.indexOf('chapterPath') > -1) { // 图片文件路径
  6238. chapterPath = one.split('"')[1];
  6239. } else if (one.indexOf('pageTitle') > -1) { // 网页标题
  6240. addHistory(pageElems, one.split('"')[1]);
  6241. }
  6242. })
  6243. if (chapterImages && chapterPath) {
  6244. let _img = '';
  6245. chapterImages.forEach(function (one2){_img += '<img src="https://res.xiaoqinre.com/' + chapterPath + one2 + '" data-index="0" style="display: inline-block;">';})
  6246. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中
  6247. pageNum.now = pageNum._now + 1
  6248. }
  6249. }
  6250. }
  6251.  
  6252.  
  6253. // [Mangabz 漫画] 初始化(调整本话图片)
  6254. function mangabz_init() {
  6255. let showimage = getCSS('#showimage'),
  6256. cp_img = getCSS('#cp_img'),
  6257. cp_image = getCSS('#cp_image');
  6258. if (showimage) {showimage.removeAttribute('oncontextmenu');}
  6259. if (cp_img) {cp_img.removeAttribute('oncontextmenu');}
  6260. if (cp_image) {
  6261. cp_image.removeAttribute('oncontextmenu');
  6262. cp_image.removeAttribute('id');
  6263. cp_image.removeAttribute('style');
  6264. }
  6265. }
  6266. // [Mangabz 漫画] 获取下一页地址
  6267. function mangabz_nextL() {
  6268. var url = '';
  6269. if (MANGABZ_PAGE === MANGABZ_IMAGE_COUNT) { // 下一话
  6270. if (getNextE('//a[./img[contains(@src, "icon_xiayizhang")]]')) getPageElems_(curSite.pageUrl); // 访问下一话 URL 获取
  6271. } else { // 下一页
  6272. if (!mkey) var mkey = '';
  6273. 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}`
  6274. if (url === curSite.pageUrl) return
  6275. curSite.pageUrl = url
  6276. //console.log(curSite.pageUrl)
  6277. getPageElems_(curSite.pageUrl, 'text', 'GET', '', 'Next'); // 访问下一页 URL 获取
  6278. }
  6279. }
  6280. // [Mangabz 漫画] 插入数据
  6281. function mangabz_insertE(pageElems, type) {
  6282. if (pageElems) {
  6283. if (type === 'Next') { // 下一页
  6284. let imgArr = eval(pageElems),
  6285. _img = '';
  6286. for (let now of imgArr) {_img += `<img src="${now}">`;}
  6287. if (_img) {
  6288. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中
  6289. MANGABZ_PAGE += imgArr.length;
  6290. addHistory(pageElems, document.title, location.origin + MANGABZ_CURL.substring(0, MANGABZ_CURL.length - 1) + '-p' + MANGABZ_PAGE + '/');
  6291. }
  6292. } else { // 下一话
  6293. // 插入 <script> 标签
  6294. insScript('css;html:not([dir]) > head > script:not([src])', document.body, pageElems);
  6295. addHistory(pageElems);
  6296. pageNum.now = pageNum._now + 1
  6297. replaceElems(pageElems)
  6298. MANGABZ_PAGE = 0;
  6299. mangabz_nextL();
  6300. }
  6301. }
  6302. }
  6303.  
  6304.  
  6305. // [Xmanhua 漫画] 获取下一页地址
  6306. function xmanhua_nextL() {
  6307. var url = '';
  6308. if (XMANHUA_PAGE === XMANHUA_IMAGE_COUNT) { // 下一话
  6309. if (getNextE('//a[./img[contains(@src, "reader-bottom-right-2.png")]]')) getPageElems_(curSite.pageUrl); // 访问下一话 URL 获取
  6310. } else { // 下一页
  6311. if (!mkey) var mkey = '';
  6312. 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}`
  6313. if (url === curSite.pageUrl) return
  6314. curSite.pageUrl = url
  6315. //console.log(curSite.pageUrl)
  6316. getPageElems_(curSite.pageUrl, 'text', 'GET', '', 'Next'); // 访问下一页 URL 获取
  6317. }
  6318. }
  6319. // [Xmanhua 漫画] 插入数据
  6320. function xmanhua_insertE(pageElems, type) {
  6321. if (pageElems) {
  6322. if (type === 'Next') { // 下一页
  6323. let imgArr = eval(pageElems),
  6324. _img = '';
  6325. for (let now of imgArr) {_img += `<img src="${now}">`;}
  6326. if (_img) {
  6327. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中
  6328. XMANHUA_PAGE += imgArr.length;
  6329. addHistory(pageElems, document.title, location.origin + XMANHUA_CURL.substring(0, XMANHUA_CURL.length - 1) + '-p' + XMANHUA_PAGE + '/');
  6330. }
  6331. } else { // 下一话
  6332. // 插入 <script> 标签
  6333. insScript('css;html:not([dir]) > head > script:not([src])', document.body, pageElems);
  6334. addHistory(pageElems);
  6335. pageNum.now = pageNum._now + 1
  6336. replaceElems(pageElems)
  6337. XMANHUA_PAGE = 0;
  6338. xmanhua_nextL();
  6339. }
  6340. }
  6341. }
  6342.  
  6343.  
  6344. // [COCOMANGA 漫画] 初始化(调整本话图片)
  6345. function cocomanga_init() {
  6346. let last = getCSS('.mh_comicpic:last-of-type');
  6347. if (last && last.getAttribute('p')) {
  6348. getOne(curSite.pager.insertP[0]).innerHTML = ''; // 删除旧图片元素
  6349. cocomanga_img(parseInt(last.getAttribute('p'))) // 插入新图片元素
  6350. }
  6351. }
  6352. // [COCOMANGA 漫画] 生成图片元素并插入网页
  6353. function cocomanga_img(totalImageCount) {
  6354. if (totalImageCount < 1) return
  6355. let _img = '';
  6356. for (let i=1; i<=totalImageCount; i++) {_img += `<div class="mh_comicpic" p="${i}"><img src="${__cr.getPicUrl(i)}"></div>`;}
  6357. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中
  6358. }
  6359. // [COCOMANGA 漫画] 插入数据
  6360. function cocomanga_insertE(pageElems, type) {
  6361. if (pageElems) {
  6362. // 插入 <script> 标签
  6363. insScript('css;head > script:not([src]), script[src*="custom.js"], script[src*="dynamicjs.js"]', document.body, pageElems);
  6364.  
  6365. // 插入新图片元素
  6366. setTimeout(function() {
  6367. let totalImageCount = __cdecrypt('fw122587mkertyui', CryptoJS.enc.Base64.parse(mh_info.enc_code1).toString(CryptoJS.enc.Utf8));
  6368. if (!totalImageCount) totalImageCount = __cdecrypt('fw12558899ertyui', CryptoJS.enc.Base64.parse(mh_info.enc_code1).toString(CryptoJS.enc.Utf8));
  6369. cocomanga_img(parseInt(totalImageCount));
  6370. }, 100)
  6371. addHistory(pageElems);
  6372. pageNum.now = pageNum._now + 1
  6373. replaceElems(pageElems)
  6374. }
  6375. }
  6376.  
  6377.  
  6378. // [国家自然科学基金] 获取下一页地址
  6379. function nsfc_nextL() {
  6380. let id = decodeURIComponent(document.location.href.split('/')[document.location.href.split('/').length - 1]), data
  6381. if (!document.nowPageNum) document.nowPageNum = 2
  6382. data = `id=${id}&index=${document.nowPageNum}`
  6383. if (data === curSite.pageUrl) return
  6384. curSite.pageUrl = data
  6385. getPageElems_(location.origin + '/baseQuery/data/completeProjectReport', 'json', 'POST', data); // 访问下一页 URL 获取
  6386. }
  6387. // [国家自然科学基金] 插入数据
  6388. function nsfc_insertE(pageElems, type) {
  6389. if (!pageElems || pageElems.code != 200) {curSite.SiteTypeID = 0; return}
  6390. if (!pageElems.data.hasnext) {curSite.SiteTypeID = 0} else {document.nowPageNum++}
  6391. pageNum.now = pageNum._now + 1
  6392. 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}">`);
  6393. }
  6394.  
  6395.  
  6396.  
  6397. // [酷科研] 获取下一页地址
  6398. function coolkeyan_nextL() {
  6399. if (!getCSS('.q-img__image')) return
  6400. let id = getCSS('.q-breadcrumbs--last > span.q-breadcrumbs__el'), data
  6401. if (id && id.textContent) {id=parseInt(id.textContent)} else {return}
  6402. if (!document.nowPageNum) document.nowPageNum = 2
  6403. data = `ratify_no=${id}&index=${document.nowPageNum}`
  6404. if (data === curSite.pageUrl) return
  6405. curSite.pageUrl = data
  6406. getPageElems_(location.origin + '/api/funds/nsfc/creport?' + data, 'json', 'GET'); // 访问下一页 URL 获取
  6407. }
  6408. // [酷科研] 插入数据
  6409. function coolkeyan_insertE(pageElems, type) {
  6410. if (!pageElems || pageElems == {}) {curSite.SiteTypeID = 0; return}
  6411. if (!pageElems.url) {curSite.SiteTypeID = 0; return} else {document.nowPageNum++}
  6412. pageNum.now = pageNum._now + 1
  6413. getCSS('.q-img>div[style*="padding-bottom"]').style.paddingBottom = `${(document.nowPageNum * 1000) - 1000}px`
  6414. 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>`);
  6415. }
  6416.  
  6417.  
  6418. // --------------------------------------------------------
  6419.  
  6420.  
  6421. // 自动无缝翻页
  6422. function pageLoading() {
  6423. if (curSite.SiteTypeID == 0) return
  6424. windowScroll(function (direction, e) {
  6425. // 下滑 且 未暂停翻页 且 SiteTypeID > 0 时,才准备翻页
  6426. if (direction != 'down' || !pausePage || curSite.SiteTypeID == 0) return
  6427. // 翻页模式 5 且为框架内时,要判断顶层是否通过页码暂停翻页了
  6428. if (curSite.pager.type == 5 && self != top && window.top.document.xiu_pausePage == false) return
  6429.  
  6430. let scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop,
  6431. scrollHeight = window.innerHeight || document.documentElement.clientHeight,
  6432. scrollD = curSite.pager.scrollD;
  6433.  
  6434. // <<<<< 翻页类型 3(依靠 [基准元素] 与 [浏览器可视区域底部] 之间的距离缩小来触发翻页)>>>>>
  6435. if (curSite.pager.type === 3) {
  6436. let scrollE = getOne(curSite.pager.scrollE);
  6437. //console.log(scrollE.offsetTop, scrollE.offsetTop - (scrollTop + scrollHeight), scrollD, scrollTop + scrollHeight, curSite.SiteTypeID)
  6438. if (scrollE.offsetTop - (scrollTop + scrollHeight) <= scrollD) {intervalPause(); checkURL(getPageElems);}
  6439.  
  6440. } else {
  6441. if (document.documentElement.scrollHeight <= scrollHeight + scrollTop + scrollD) {
  6442. // <<<<< 翻页类型 1(由脚本实现自动无缝翻页)>>>>>
  6443. if (curSite.pager.type === 1) {
  6444. intervalPause(); checkURL(getPageElems);
  6445.  
  6446. // <<<<< 翻页类型 2(网站自带了自动无缝翻页功能,只需要点击下一页按钮即可)>>>>>
  6447. } else if (curSite.pager.type === 2) {
  6448. let autopbn = getOne(curSite.pager.nextL);
  6449. if (!autopbn) return
  6450. if (curSite.pager.isHidden && isHidden(autopbn)) return // 如果 isHidden = true,那么需要判断元素是否隐藏
  6451. if (curSite.pager.nextText) {
  6452. // 按钮文本,当按钮文本 = 该文本时,才会点击按钮加载下一页
  6453. if (autopbn.innerText === curSite.pager.nextText) {autopbn.click(); pageNum.now = pageNum._now + 1;}
  6454. } else if (curSite.pager.nextTextOf) {
  6455. // 按钮文本的一部分,当按钮文本包含该文本时,才会点击按钮加载下一页
  6456. if (autopbn.innerText.indexOf(curSite.pager.nextTextOf) > -1) {autopbn.click(); pageNum.now = pageNum._now + 1;}
  6457. } else if (curSite.pager.nextHTML) {
  6458. // 按钮内元素,当按钮内元素 = 该元素内容时,才会点击按钮加载下一页
  6459. if (autopbn.innerHTML === curSite.pager.nextHTML) {autopbn.click(); pageNum.now = pageNum._now + 1;}
  6460. } else {
  6461. // 对于没有按钮文字变化的按钮,可以指定间隔时间(默认 300ms)
  6462. if (!curSite.pager.interval) curSite.pager.interval = 300;
  6463. intervalPause();
  6464. // 如果没有指定按钮文字就直接点击
  6465. autopbn.click(); pageNum.now = pageNum._now + 1;
  6466. }
  6467.  
  6468. // <<<<< 翻页类型 4(部分简单的动态加载类网站)>>>>>
  6469. } else if (curSite.pager.type === 4) {
  6470. // 为百度贴吧的发帖考虑,预留底部一小部分...
  6471. if (!(curSite.SiteTypeID === SiteType.BAIDU_TIEBA && document.documentElement.scrollHeight <= scrollHeight + scrollTop + 200)) {
  6472. intervalPause(); if (typeof curSite.pager.nextL == 'function') {curSite.pager.nextL();} else if (getNextE(curSite.pager.nextL)) {getPageElems_(curSite.pageUrl);}
  6473. }
  6474.  
  6475. // <<<<< 翻页类型 5(插入 iframe 方式来加载下一页)>>>>>
  6476. } else if (curSite.pager.type === 5) {checkURL(insIframe);
  6477.  
  6478. // <<<<< 翻页类型 6(通过 iframe 获取下一页动态加载内容)>>>>>
  6479. } else if (curSite.pager.type === 6) {checkURL(insIframe_);}
  6480. }
  6481. }
  6482. });
  6483.  
  6484. function intervalPause() {
  6485. if (curSite.pager.interval) {
  6486. pausePage = false
  6487. setTimeout(function(){pausePage = true;}, curSite.pager.interval)
  6488. }
  6489. }
  6490. }
  6491. // 判断是支持
  6492. function doesItSupport() {
  6493. setDBSite(); // 配置 DBSite 变量对象
  6494.  
  6495. // 遍历判断是否是某个已支持的网站,顺便直接赋值
  6496. let support = false;
  6497. for (let now in DBSite) { // 遍历对象
  6498. if (!DBSite[now].host) continue; // 如果不存在则继续下一个循环
  6499. if (Array.isArray(DBSite[now].host)) { // 如果是数组
  6500. for (let i of DBSite[now].host) { // 遍历数组
  6501. if (i === location.hostname) {
  6502. if (DBSite[now].functionS) {
  6503. DBSite[now].functionS();
  6504. } else {
  6505. curSite = DBSite[now];
  6506. }
  6507. support = true; break; // 如果找到了就退出循环
  6508. }
  6509. }
  6510. } else if (DBSite[now].host instanceof RegExp) {
  6511. if (DBSite[now].host.test(location.hostname)) {
  6512. if (self != top) {if (!DBSite[now].iframe) break;} // 如果当前位于 iframe 框架下,就需要判断是否需要执行
  6513. if (DBSite[now].functionS) {
  6514. DBSite[now].functionS();
  6515. } else {
  6516. curSite = DBSite[now];
  6517. }
  6518. support = true; break; // 如果找到了就退出循环
  6519. }
  6520. } else if (DBSite[now].host === location.hostname) {
  6521. if (self != top) {if (!DBSite[now].iframe) break;} // 如果当前位于 iframe 框架下,就需要判断是否需要执行
  6522. if (DBSite[now].functionS) {
  6523. DBSite[now].functionS();
  6524. } else {
  6525. curSite = DBSite[now];
  6526. }
  6527. support = true; break; // 如果找到了就退出循环
  6528. }
  6529. }
  6530.  
  6531. if (support) {
  6532. console.info('[自动无缝翻页] - 独立规则 网站'); return 1;
  6533. } 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)) {
  6534. console.info('[自动无缝翻页] - <Discuz!> 论坛'); return 2;
  6535. } else if (getCSS('#flarum-loading')) {
  6536. console.info('[自动无缝翻页] - <Flarum> 论坛'); return 3;
  6537. } else if (getCSS('body#phpbb')) {
  6538. console.info('[自动无缝翻页] - <phpBB> 论坛'); return 4;
  6539. } else if (getXpath('//footer//a[contains(string(), "Xiuno")] | //link[contains(@href, "xiuno")] | //script[contains(@src, "xiuno")]')) {
  6540. console.info('[自动无缝翻页] - <Xiuno> 论坛'); return 5;
  6541. } else if (typeof XF != 'undefined') {
  6542. console.info('[自动无缝翻页] - <XenForo> 论坛'); return 6;
  6543. } else if (getCSS('link[href*="themes/dux" i], script[src*="themes/dux" i]')) {
  6544. console.info('[自动无缝翻页] - 使用 WordPress <DUX> 主题的网站'); return 100;
  6545. } else if (getCSS('link[href*="themes/xiu" i], script[src*="themes/xiu" i]')) {
  6546. console.info('[自动无缝翻页] - 使用 WordPress <XIU> 主题的网站'); return 101;
  6547. } else if (getCSS('link[href*="themes/d8" i], script[src*="themes/d8" i]')) {
  6548. console.info('[自动无缝翻页] - 使用 WordPress <D8> 主题的网站'); return 102;
  6549. } else if (getCSS('link[href*="themes/begin" i], script[src*="themes/begin" i], img[src*="themes/begin" i]')) {
  6550. console.info('[自动无缝翻页] - 使用 WordPress <Begin> 主题的网站'); return 103;
  6551. } 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(), "下一页")]')) {
  6552. console.info('[自动无缝翻页] - <笔趣阁> 模板的小说网站'); return 200;
  6553. } else if (self != top) {
  6554. return -1;
  6555. }
  6556. return 0;
  6557. }
  6558.  
  6559.  
  6560. // 翻页类型 1/3
  6561. function getPageElems(url) {
  6562. GM_xmlhttpRequest({
  6563. url: url,
  6564. method: 'GET',
  6565. overrideMimeType: 'text/html; charset=' + document.charset,
  6566. headers: {
  6567. 'Referer': location.href
  6568. },
  6569. timeout: 10000,
  6570. onload: function (response) {
  6571. try {
  6572. //console.log('最终 URL:' + response.finalUrl, '返回内容:' + response.responseText)
  6573. processElems(createDocumentByString(response.responseText));
  6574. } catch (e) {
  6575. console.log(e);
  6576. }
  6577. }
  6578. });
  6579. }
  6580. // 翻页类型 4
  6581. function getPageElems_(url, type = '', method = 'GET', data = '', type2) {
  6582. let mimeType;
  6583. switch (type) {
  6584. case 'json':
  6585. mimeType = 'application/json; charset=' + document.charset; break;
  6586. case 'text':
  6587. mimeType = 'text/plain; charset=' + document.charset; break;
  6588. default:
  6589. mimeType = 'text/html; charset=' + document.charset;
  6590. }
  6591.  
  6592. GM_xmlhttpRequest({
  6593. url: url,
  6594. method: method,
  6595. data: data,
  6596. responseType: type,
  6597. overrideMimeType: mimeType,
  6598. headers: {
  6599. 'Referer': location.href,
  6600. 'Content-Type': (method === 'POST') ? 'application/x-www-form-urlencoded':''
  6601. },
  6602. timeout: 10000,
  6603. onload: function (response) {
  6604. try {
  6605. //console.log('最终 URL:' + response.finalUrl, '返回内容:' + response.responseText)
  6606. switch (type) {
  6607. case 'json':
  6608. curSite.pager.insertE(response.response, type2);
  6609. break;
  6610. case 'text':
  6611. curSite.pager.insertE(response.responseText, type2)
  6612. break;
  6613. default:
  6614. curSite.pager.insertE(createDocumentByString(response.responseText), type2)
  6615. }
  6616. } catch (e) {
  6617. console.log(e);
  6618. }
  6619. }
  6620. });
  6621. }
  6622. // 翻页类型 5(插入 iframe 方式加载下一页)
  6623. function insIframe(src) {
  6624. // 停用当前页面翻页
  6625. if (curSite.SiteTypeID == 0) return
  6626. curSite.SiteTypeID = 0;
  6627.  
  6628. var beforeScrollTop = document.documentElement.scrollTop || document.body.scrollTop
  6629. // 当滚动条到底部时(即完全显示 iframe 框架),隐藏当前页面的滚动条
  6630. window.addEventListener('scroll', function () {
  6631. let scrollTop = document.documentElement.scrollTop || document.body.scrollTop,
  6632. clientHeight = document.documentElement.clientHeight || document.body.clientHeight,
  6633. scrollHeight = document.documentElement.scrollHeight || document.body.scrollHeight,
  6634. afterScrollTop = document.documentElement.scrollTop || document.body.scrollTop,
  6635. delta = afterScrollTop - beforeScrollTop;
  6636. if (delta == 0) return false;
  6637. beforeScrollTop = afterScrollTop;
  6638.  
  6639. //console.log(delta, scrollHeight - (scrollTop + clientHeight + 10), '1111')
  6640. if (delta > 0 && scrollTop + clientHeight + 10 >= scrollHeight && !getCSS('#xiu-scroll')) {
  6641. let newStyle = document.createElement('style'); newStyle.id = 'xiu-scroll';
  6642. newStyle.textContent = 'html::-webkit-scrollbar, body::-webkit-scrollbar {width: 0 !important;height: 0 !important;} html, body {scrollbar-width: none !important;}';
  6643. if (curSite.pager.insStyle) newStyle.textContent += curSite.pager.insStyle;
  6644. document.documentElement.appendChild(newStyle);
  6645. } else if (delta < 0 && getCSS('#xiu-scroll')) {
  6646. getCSS('#xiu-scroll').remove();
  6647. }
  6648. }, false);
  6649.  
  6650. // 创建 iframe
  6651. let iframe = document.createElement('iframe');
  6652. iframe.style = 'position: absolute; width: 100%; height: 100%; border: none;';
  6653. iframe.id = 'xiu_iframe';
  6654. iframe.src = src;
  6655.  
  6656. // 加载完成后才继续
  6657. iframe.onload = function() {
  6658. // 添加历史记录
  6659. if (curSite.history) addHistory(iframe.contentWindow.document, iframe.contentWindow.document.title);
  6660. // 当前页码 + 1
  6661. if (!curSite.hiddenPN) {
  6662. let autopageNumber = getCSS('#Autopage_number', window.top.document)
  6663. if (autopageNumber) {autopageNumber.textContent = parseInt(autopageNumber.textContent) + 1;}
  6664. }
  6665. }
  6666.  
  6667. // 插入 iframe
  6668. document.documentElement.appendChild(iframe);
  6669. }
  6670. // 翻页类型 6(通过 iframe 获取下一页动态加载内容)
  6671. function insIframe_(src) {
  6672. // 暂停翻页
  6673. if (!pausePage) return
  6674. pausePage = false
  6675. console.log(src)
  6676. // 如果不存在,则创建一个 iframe
  6677. let iframe = document.getElementById('xiu_iframe');
  6678. if (!iframe) {
  6679. iframe = document.createElement('iframe');
  6680. iframe.style = 'position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; border: none; z-index: -999; /*visibility: hidden;*/';
  6681. iframe.id = 'xiu_iframe';
  6682. iframe.src = src;
  6683. }
  6684.  
  6685. // 加载完成后才继续
  6686. iframe.onload = function() {
  6687. //iframe.contentWindow.scrollTo(0, 999999); // 滚动到底部,以触发网页的滚动条相关加载事件
  6688. //iframe.contentWindow.scrollTo({top: 9999999, behavior: 'smooth'});
  6689. if (!curSite.pager.loadTime) curSite.pager.loadTime = 100; // 默认 100ms
  6690. //console.log(curSite.pager.loadTime, curSite.pager.loadTime/30)
  6691. //console.time('sort');
  6692. let time1 = 0 ,time2 = setInterval(function(){
  6693. let scrollHeight = (iframe.contentWindow.document.documentElement.scrollHeight || iframe.contentWindow.document.body.scrollHeight)/10
  6694. iframe.contentWindow.scrollTo(0, 999999);
  6695. iframe.contentWindow.scrollTo(0, scrollHeight*time1);
  6696. //console.log(time1, iframe.contentWindow.document.documentElement.scrollHeight || iframe.contentWindow.document.body.scrollHeight)
  6697. if (++time1 == 10) {
  6698. //console.timeEnd('sort');
  6699. clearInterval(time2);
  6700. processElems(iframe.contentWindow.document); // 插入/替换元素等
  6701. //console.log(iframe.contentWindow.document.documentElement.scrollHeight || iframe.contentWindow.document.body.scrollHeight)
  6702. pausePage = true; // 恢复翻页
  6703. }
  6704. }, curSite.pager.loadTime/10)
  6705. }
  6706.  
  6707. // 插入 iframe(如果已存在则直接改 src)
  6708. if (document.getElementById('xiu_iframe')) {
  6709. iframe.src = src;
  6710. } else {
  6711. document.documentElement.appendChild(iframe);
  6712. }
  6713. }
  6714.  
  6715.  
  6716. // XHR 后处理结果,插入、替换元素等(适用于翻页类型 1/3/6)
  6717. function processElems(response) {
  6718. if (!curSite.pager.insertP) {curSite.pager.insertP = [curSite.pager.pageE, 5]}
  6719. let pageElems = getAll(curSite.pager.pageE, response, response), toElement;
  6720. if (curSite.pager.insertP[1] === 5) { // 插入 pageE 列表最后一个元素的后面
  6721. toElement = getAll(curSite.pager.insertP[0]).pop();
  6722. } else {
  6723. toElement = getOne(curSite.pager.insertP[0]);
  6724. }
  6725. //console.log(curSite.pager.pageE, pageElems, curSite.pager.insertP, toElement)
  6726.  
  6727. if (pageElems.length > 0 && toElement) {
  6728. // 如果有插入前函数就执行函数
  6729. if (curSite.function && curSite.function.bF) {
  6730. if (curSite.function.pF) { // 如果指定了参数
  6731. pageElems = curSite.function.bF(pageElems, curSite.function.pF);
  6732. } else {
  6733. pageElems = curSite.function.bF(pageElems);
  6734. }
  6735. }
  6736.  
  6737. // 插入位置
  6738. let addTo = getAddTo(curSite.pager.insertP[1]);
  6739.  
  6740. // 插入新页面元素
  6741. if (curSite.pager.insertP[1] === 6) { // 插入到目标内部末尾(针对文本,比如小说网页)
  6742. let afterend = '';
  6743. pageElems.forEach(function (one) {afterend += one.innerHTML;});
  6744. toElement.insertAdjacentHTML(addTo, afterend);
  6745. } else {
  6746. if (curSite.pager.insertP[1] === 2 || curSite.pager.insertP[1] === 4 || curSite.pager.insertP[1] === 5) pageElems.reverse(); // 插入到 [元素内头部]、[目标本身后面] 时,需要反转顺序
  6747. pageElems.forEach(function (one) {toElement.insertAdjacentElement(addTo, one);});
  6748. }
  6749.  
  6750. // 当前页码 + 1
  6751. pageNum.now = pageNum._now + 1
  6752.  
  6753. // 添加历史记录
  6754. if (curSite.history) addHistory(response);
  6755.  
  6756. // 替换待替换元素
  6757. if (curSite.pager.replaceE) replaceElems(response);
  6758.  
  6759. // 插入 <script> 标签
  6760. if (curSite.pager.scriptT || curSite.pager.scriptT == 0) {
  6761. switch (curSite.pager.scriptT) {
  6762. case 0: // 下一页的所有 <script> 标签
  6763. insScript('css;script', toElement, response); break;
  6764. case 1: // 下一页的所有 <script> 标签(不包括 src 链接)
  6765. insScript('css;script:not([src])', toElement, response); break;
  6766. case 2: // 下一页主体元素 (pageE) 的同级 <script> 标签
  6767. insScript(null, toElement, pageElems); break;
  6768. case 3: // 下一页主体元素 (pageE) 的子元素 <script> 标签
  6769. insScript('css;script:not([src])', toElement, pageElems); break;
  6770. }
  6771. }
  6772.  
  6773. // 如果有插入后函数就执行函数
  6774. if (curSite.function && curSite.function.aF) {
  6775. if (curSite.function.pF) { // 如果指定了参数
  6776. curSite.function.aF(curSite.function.pF);
  6777. } else {
  6778. curSite.function.aF();
  6779. }
  6780. }
  6781. } else { // 获取主体元素失败后,尝试重新获取
  6782. console.log(curSite.pager.pageE, pageElems, curSite.pager.insertP, toElement)
  6783. if (curSite.retry) {
  6784. console.warn('[自动无缝翻页] 获取主体元素失败,尝试重新获取...')
  6785. setTimeout(function(){curSite.pageUrl = '';}, curSite.retry)
  6786. } else { // 尝试替换元素看能不能继续翻页下去
  6787. if (curSite.pager.replaceE) {
  6788. if (replaceElems(response)) { // 如果替换成功
  6789. console.log('[自动无缝翻页] 获取主体元素失败,尝试替换元素成功!')
  6790. pageNum.now = pageNum._now + 1; // 当前页码 + 1
  6791. if (curSite.history) addHistory(response); // 添加历史记录
  6792. } else {console.error('[自动无缝翻页] 获取主体元素失败,尝试替换元素失败...')}
  6793. }
  6794. }
  6795. }
  6796. }
  6797. // 通用型插入前函数(加载图片)
  6798. function src_bF(pageElems, css) {
  6799. pageElems.forEach(function (one) {
  6800. if (css[0] == 0) { // src 图片
  6801. if (one.tagName == 'IMG' && one.getAttribute(css[2])) one.src = one.getAttribute(css[2]);
  6802. one.querySelectorAll(css[1]).forEach(function (now) {
  6803. now.src = now.getAttribute(css[2]);
  6804. });
  6805. } else if (css[0] == 1) { // 背景图片
  6806. if (one.tagName == 'IMG' && one.getAttribute(css[2])) one.style.backgroundImage = 'url("' + one.getAttribute(css[2]) + '")';
  6807. one.querySelectorAll(css[1]).forEach(function (now) {
  6808. now.style.backgroundImage = 'url("' + now.getAttribute(css[2]) + '")';
  6809. });
  6810. }
  6811. });
  6812. return pageElems
  6813. }
  6814. // 通用型获取下一页地址(URL 替换 page= 参数)
  6815. function getNextP(css, pf, reg) {
  6816. let nextNum = getOne(css);
  6817. var url = '';
  6818. if (nextNum && nextNum.textContent) {
  6819. nextNum = nextNum.textContent.replaceAll(' ','');
  6820. if (location.search) {
  6821. if (indexOF(pf, 's')) {
  6822. url = location.search.replace(reg, pf + nextNum);
  6823. } else {
  6824. url = location.search + '&' + pf + nextNum;
  6825. }
  6826. } else {
  6827. url = '?' + pf + nextNum;
  6828. }
  6829. url = location.origin + location.pathname + url;
  6830. }
  6831. return url
  6832. }
  6833. // 通用型获取下一页地址(直接从元素获取)
  6834. function getNextE(css) {
  6835. if (!css) css = curSite.pager.nextL;
  6836. let next = getOne(css)
  6837. if (next && next.nodeType === 1 && next.href && next.href.slice(0,4) === 'http' && next.href != curSite.pageUrl) {
  6838. if (curSite.pager.forceHTTPS && location.protocol === 'https:') {
  6839. curSite.pageUrl = next.href.replace(/^http:/,'https:');
  6840. } else {
  6841. curSite.pageUrl = next.href;
  6842. }
  6843. //console.log(curSite.pageUrl)
  6844. return true
  6845. }
  6846. return false
  6847. }
  6848. // 检查 URL
  6849. function checkURL(func) {
  6850. if (typeof curSite.pager.nextL == 'function') {
  6851. let tempUrl = curSite.pager.nextL();
  6852. if (!tempUrl || (tempUrl && tempUrl.slice(0,4) != 'http') || tempUrl === curSite.pageUrl ) return;
  6853. curSite.pageUrl = tempUrl;
  6854. func(curSite.pageUrl);
  6855. } else if (getNextE()) {
  6856. func(curSite.pageUrl);
  6857. }
  6858. //console.log(curSite.pageUrl);
  6859. }
  6860. // 替换元素
  6861. function replaceElems(pageElems, o = curSite.pager.replaceE, r = curSite.pager.replaceE) {
  6862. let oriE = getAll(o),
  6863. repE = getAll(r, pageElems, pageElems);
  6864. //console.log(oriE, repE)
  6865. if (oriE.length != 0 && repE.length != 0 && oriE.length === repE.length) {
  6866. for (let i = 0; i < oriE.length; i++) {
  6867. oriE[i].outerHTML = repE[i].outerHTML;
  6868. }
  6869. return true
  6870. }
  6871. return false
  6872. }
  6873. // 添加历史记录
  6874. function addHistory(pageElems, title, url) {
  6875. if (!curSite.pageUrl) return
  6876. title = title || pageElems.querySelector('title').textContent || window.top.document.title;
  6877. url = url || curSite.pageUrl;
  6878. window.top.document.title = title;
  6879. window.top.document.xiu_nowUrl = curSite.pageUrl;
  6880. window.top.history.pushState('xiu_history', title, url);
  6881. }
  6882. // 插入 <Script>
  6883. function insScript(selector, toElement = document.body, contextNode = document) {
  6884. let scriptElems = contextNode;
  6885. if (selector) {
  6886. if (contextNode instanceof Array) {
  6887. scriptElems = []; contextNode.forEach(function (one) {scriptElems = scriptElems.concat(getAll(selector, one, one));})
  6888. } else {
  6889. scriptElems = getAll(selector, contextNode, contextNode);
  6890. }
  6891. }
  6892. scriptElems.forEach(function (one) {
  6893. if (one.tagName === 'SCRIPT') {
  6894. if (one.src) {
  6895. toElement.appendChild(document.createElement('script')).src = one.src;
  6896. } else {
  6897. toElement.appendChild(document.createElement('script')).textContent = one.textContent;
  6898. }
  6899. }
  6900. });
  6901. }
  6902. // 插入 <Style>
  6903. function insStyle(style) {
  6904. document.documentElement.appendChild(document.createElement('style')).textContent = style;
  6905. }
  6906.  
  6907.  
  6908. // 获取元素(CSS/Xpath)来自:https://github.com/machsix/Super-preloader
  6909. function getCSS(css, contextNode = document) {
  6910. return contextNode.querySelector(css);
  6911. }
  6912. function getAllCSS(css, contextNode = document) {
  6913. return [].slice.call(contextNode.querySelectorAll(css));
  6914. }
  6915. function getXpath(xpath, contextNode, doc = document) {
  6916. contextNode = contextNode || doc;
  6917. try {
  6918. const result = doc.evaluate(xpath, contextNode, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
  6919. // 应该总是返回一个元素节点
  6920. return result.singleNodeValue && result.singleNodeValue.nodeType === 1 && result.singleNodeValue;
  6921. } catch (err) {
  6922. throw new Error(`无效 Xpath: ${xpath}`);
  6923. }
  6924. }
  6925. function getAllXpath(xpath, contextNode, doc = document) {
  6926. contextNode = contextNode || doc;
  6927. const result = [];
  6928. try {
  6929. const query = doc.evaluate(xpath, contextNode, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
  6930. for (let i = 0; i < query.snapshotLength; i++) {
  6931. const node = query.snapshotItem(i);
  6932. // 如果是 Element 节点
  6933. if (node.nodeType === 1) result.push(node);
  6934. }
  6935. } catch (err) {
  6936. throw new Error(`无效 Xpath: ${xpath}`);
  6937. }
  6938. return result;
  6939. }
  6940. function getOne(selector, contextNode = undefined, doc = document) {
  6941. if (!selector) return;
  6942. contextNode = contextNode || doc;
  6943. if (selector.search(/^css;/i) === 0) {
  6944. return getCSS(selector.slice(4), contextNode);
  6945. } else {
  6946. return getXpath(selector, contextNode, doc);
  6947. }
  6948. }
  6949. function getAll(selector, contextNode = undefined, doc = document) {
  6950. if (!selector) return [];
  6951. contextNode = contextNode || doc;
  6952. if (selector.search(/^css;/i) === 0) {
  6953. return getAllCSS(selector.slice(4), contextNode);
  6954. } else {
  6955. return getAllXpath(selector, contextNode, doc);
  6956. }
  6957. }
  6958. function createDocumentByString(e) {
  6959. if (e) {
  6960. if ('HTML' !== document.documentElement.nodeName) return (new DOMParser).parseFromString(e, 'application/xhtml+xml');
  6961. var t;
  6962. try { t = (new DOMParser).parseFromString(e, 'text/html');} catch (e) {}
  6963. if (t) return t;
  6964. if (document.implementation.createHTMLDocument) {
  6965. t = document.implementation.createHTMLDocument('ADocument');
  6966. } else {
  6967. 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) {}
  6968. }
  6969. if (t) {
  6970. var r = document.createRange(),
  6971. n = r.createContextualFragment(e);
  6972. r.selectNodeContents(document.body);
  6973. t.body.appendChild(n);
  6974. 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);
  6975. return t;
  6976. }
  6977. } else console.error('没有找到要转成 DOM 的字符串');
  6978. }
  6979.  
  6980.  
  6981. // 强制新标签页打开链接(翻页模式 5/6)
  6982. function forceTarget() {
  6983. document.body.addEventListener('click', function(e) {
  6984. if (e.target.tagName === 'A') {
  6985. forceTarget_(e.target, e);
  6986. } else {
  6987. let path = e.path || e.composedPath();
  6988. for (let i = 1; i < path.length - 3; i++) {
  6989. //console.log(path[i])
  6990. if (path[i].tagName === 'A') {
  6991. forceTarget_(path[i], e);
  6992. break;
  6993. }
  6994. }
  6995. }
  6996. });
  6997.  
  6998. function forceTarget_(target, e){
  6999. if (target.href && target.target != '_blank' && !(target.getAttribute('onclick')) && target.href.slice(0,4) == 'http' && target.getAttribute('href').slice(0,1) != '#') {
  7000. e.preventDefault(); // 阻止默认打开链接事件
  7001. //console.log(target.href);
  7002. //window.top.location.href = target.href;
  7003. window.GM_openInTab(target.href, {active: true,insert: true,setParent: true});
  7004. }
  7005. }
  7006. //document.head.appendChild(document.createElement('base')).target = '_top';
  7007. }
  7008. // 判断元素是否隐藏(隐藏返回 true)
  7009. function isHidden(el){
  7010. return (el.offsetParent === null);
  7011. }
  7012. // 判断 URL 是否存在指定文本
  7013. function indexOF(e, l = 'p', low = false){
  7014. switch (l) {
  7015. case 'h':
  7016. l = location.href; break;
  7017. case 'p':
  7018. l = location.pathname; break;
  7019. case 's':
  7020. l = location.search; break;
  7021. }
  7022. //console.log(l,e,l.indexOf(e))
  7023. if (low) {e = e.toLowerCase(); l = l.toLowerCase();} // 全部转为小写
  7024. if (e instanceof RegExp) {
  7025. if (e.test(l)) return true
  7026. } else {
  7027. if (l.indexOf(e) > -1) return true
  7028. }
  7029. return false
  7030. }
  7031. // 启用/禁用 (当前网站)
  7032. function menu_disable(type) {
  7033. switch(type) {
  7034. case 'check':
  7035. return check(); break;
  7036. case 'add':
  7037. add(); break;
  7038. case 'del':
  7039. del(); break;
  7040. }
  7041.  
  7042. function check() { // 存在返回真,不存在返回假
  7043. if (GM_getValue('menu_disable').indexOf(location.hostname) == -1) return false // 不存在返回假
  7044. return true
  7045. }
  7046.  
  7047. function add() {
  7048. if (check()) return
  7049. let list = GM_getValue('menu_disable'); // 读取网站列表
  7050. list.push(location.hostname); // 追加网站域名
  7051. GM_setValue('menu_disable', list); // 写入配置
  7052. location.reload(); // 刷新网页
  7053. }
  7054.  
  7055. function del() {
  7056. if (!check()) return
  7057. let list = GM_getValue('menu_disable'), // 读取网站列表
  7058. index = list.indexOf(location.hostname);
  7059. list.splice(index, 1); // 删除网站域名
  7060. GM_setValue('menu_disable', list); // 写入配置
  7061. location.reload(); // 刷新网页
  7062. }
  7063. }
  7064. // 左键双击网页空白处暂停翻页
  7065. function pausePageEvent() {
  7066. if (!GM_getValue('menu_pause_page')) return
  7067. if (curSite.SiteTypeID === 0) return
  7068. if (curSite.pager && curSite.pager.type == 5) window.top.document.xiu_pausePage = pausePage
  7069. document.body.addEventListener('dblclick', function () {
  7070. if (pausePage) {GM_notification({text: `❌ 已暂停本页 [自动无缝翻页]\n (再次双击可恢复)`, timeout: 2000});} else {GM_notification({text: `✅ 已恢复本页 [自动无缝翻页]\n (再次双击可暂停)`, timeout: 2000});}
  7071. pausePage = !pausePage;
  7072. if (curSite.pager && curSite.pager.type == 5) window.top.document.xiu_pausePage = pausePage
  7073. });
  7074. }
  7075. // 显示页码
  7076. function pageNumber(type) {
  7077. 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}
  7078. let status = getCSS('#Autopage_number');
  7079. switch (type) {
  7080. case 'add':
  7081. add(); break;
  7082. case 'del':
  7083. del(); break;
  7084. case 'set':
  7085. set(); break;
  7086. }
  7087.  
  7088. function add(){
  7089. if (status) {
  7090. if (status.style.display === 'none') {status.style.display = 'flex';}
  7091. return
  7092. }
  7093. // 插入网页
  7094. 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>
  7095. <div id="Autopage_number" title="1. 此处数字为 [当前页码] (可在脚本菜单中关闭)&#10;&#10;2. 鼠标左键点击此处 [临时暂停本页自动无缝翻页](再次点击可恢复)">${pageNum._now}</div>`
  7096. document.documentElement.insertAdjacentHTML('beforeend', _html);
  7097. if (curSite.pager && curSite.pager.type == 5) window.top.document.xiu_pausePage = pausePage
  7098. // 点击事件(临时暂停翻页)
  7099. getCSS('#Autopage_number').onclick = function () {
  7100. if (pausePage) {this.style = 'color: #FF5722 !important; font-style: italic !important;';} else {this.style = '';}
  7101. pausePage = !pausePage;
  7102. if (curSite.pager && curSite.pager.type == 5) window.top.document.xiu_pausePage = pausePage
  7103. };
  7104. status = getCSS('#Autopage_number');
  7105. set();
  7106. }
  7107. // 监听储存当前页码的对象值的变化
  7108. function set(){
  7109. Object.defineProperty(pageNum, 'now', {
  7110. set: function(value) {
  7111. this._now = value;
  7112. if (status) status.textContent = value;
  7113. }
  7114. });
  7115. }
  7116. function del(){
  7117. if (!status) return
  7118. status.style.display = 'none';
  7119. }
  7120. }
  7121. // 菜单开关
  7122. function menu_switch(menu_status, Name, Tips) {
  7123. if (menu_status === true){
  7124. GM_setValue(Name, false);
  7125. } else {
  7126. GM_setValue(Name, true);
  7127. }
  7128. if (Name === 'menu_page_number') {
  7129. if (menu_status === true){pageNumber('del');} else {pageNumber('add');}
  7130. registerMenuCommand(); // 重新注册脚本菜单
  7131. } else {
  7132. location.reload();}
  7133. };
  7134. // 生成 SiteTypeID
  7135. function setSiteTypeID() {
  7136. let num = 0
  7137. for (let val in DBSite) {
  7138. DBSite[val].SiteTypeID = num = num + 1;
  7139. }
  7140. }
  7141. // 获取 Cookie
  7142. function getCookie(name) {
  7143. if (!name) return ''
  7144. let arr = document.cookie.split(';');
  7145. name += '='
  7146. for (let i=0; i<arr.length; i++) {
  7147. let now = arr[i].trim();
  7148. if (now.indexOf(name) == 0) return now.substring(name.length, now.length);
  7149. }
  7150. return '';
  7151. }
  7152. // 插入位置
  7153. function getAddTo(num) {
  7154. switch (num) {
  7155. case 1:
  7156. return 'beforebegin'; break;
  7157. case 2:
  7158. return 'afterbegin'; break;
  7159. case 3:
  7160. case 6:
  7161. return 'beforeend'; break;
  7162. case 4:
  7163. case 5:
  7164. return 'afterend'; break;
  7165. }
  7166. }
  7167. // 滚动条事件
  7168. function windowScroll(fn1) {
  7169. var beforeScrollTop = document.documentElement.scrollTop || document.body.scrollTop,
  7170. fn = fn1 || function () {};
  7171. setTimeout(function () { // 延时 1 秒执行,避免刚载入到页面就触发翻页事件
  7172. window.addEventListener('scroll', function (e) {
  7173. var afterScrollTop = document.documentElement.scrollTop || document.body.scrollTop,
  7174. delta = afterScrollTop - beforeScrollTop;
  7175. if (delta == 0) return false;
  7176. fn(delta > 0 ? 'down' : 'up', e);
  7177. beforeScrollTop = afterScrollTop;
  7178. }, false);
  7179. }, 1000)
  7180. }
  7181. // 自定义 locationChange 事件(用来监听 URL 变化)
  7182. function addLocationchange() {
  7183. history.pushState = ( f => function pushState(){
  7184. var ret = f.apply(this, arguments);
  7185. window.dispatchEvent(new Event('pushstate'));
  7186. window.dispatchEvent(new Event('locationChange'));
  7187. return ret;
  7188. })(history.pushState);
  7189.  
  7190. history.replaceState = ( f => function replaceState(){
  7191. var ret = f.apply(this, arguments);
  7192. window.dispatchEvent(new Event('replacestate'));
  7193. window.dispatchEvent(new Event('locationChange'));
  7194. return ret;
  7195. })(history.replaceState);
  7196.  
  7197. window.addEventListener('popstate',()=>{
  7198. window.dispatchEvent(new Event('locationChange'))
  7199. });
  7200. }
  7201. })();