自动无缝翻页

无缝拼接下一页内容(瀑布流),目前支持:[所有「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(以上仅一小部分,更多的写不下了...

当前为 2022-01-02 提交的版本,查看 最新版本

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