自动无缝翻页

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

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

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