自动无缝翻页

无缝拼接下一页内容(瀑布流),目前支持:[所有「Discuz!、Flarum、phpBB、Xiuno、XenForo、DUX/XIU/D8/Begin(WP主题)」网站]、百度、谷歌、必应、搜狗、头条搜索、360 搜索、微信搜索、贴吧、豆瓣、知乎、微博、NGA、V2EX、B 站(Bilibili)、Pixiv、蓝奏云、煎蛋网、糗事百科、龙的天空、起点小说、IT之家、千图网、Pixabay、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、片库、茶杯狐、NO视频、低端影视、奈菲影视、音范丝、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、极简插件、小众软件、动漫狂、漫画猫、漫画 DB、动漫之家、拷贝漫画、包子漫画、古风漫画网、Mangabz、PubMed、GreasyFork、Github、StackOverflow(以上仅一小部分,更多的写不下了...

当前为 2021-11-30 提交的版本,查看 最新版本

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

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址