自动无缝翻页

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

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

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