自动无缝翻页

无缝拼接下一页内容(瀑布流),目前支持:[所有「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-25 提交的版本,查看 最新版本

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