自动无缝翻页

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

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