自动无缝翻页

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

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