自动无缝翻页

无缝拼接下一页内容(瀑布流,追求小而精),目前支持:[所有「Discuz!、Flarum、phpBB、Xiuno、XenForo、NexusPHP、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-02-18 提交的版本,查看 最新版本

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