自动无缝翻页

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

当前为 2021-12-06 提交的版本,查看 最新版本

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