自动无缝翻页

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

当前为 2022-01-10 提交的版本,查看 最新版本

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