自动无缝翻页

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

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