自动无缝翻页

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