自动无缝翻页

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

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址