自动无缝翻页

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

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

QingJ © 2025

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