自动无缝翻页

无缝拼接下一页内容(瀑布流),目前支持:[所有「Discuz!、Flarum、phpBB、Xiuno、XenForo、DUX/XIU/D8/Begin(WP主题)」网站]、百度、谷歌、必应、搜狗、头条搜索、360 搜索、微信搜索、贴吧、豆瓣、微博、NGA、V2EX、B 站(Bilibili)、蓝奏云、煎蛋网、糗事百科、龙的天空、起点小说、IT之家、千图网、Pixabay、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、片库、茶杯狐、NO视频、低端影视、奈菲影视、音范丝、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、极简插件、小众软件、动漫狂、漫画猫、漫画 DB、动漫之家、拷贝漫画、包子漫画、古风漫画网、Mangabz、PubMed、GreasyFork、Github、StackOverflow(以上仅一小部分,更多的写不下了...

当前为 2021-11-17 提交的版本,查看 最新版本

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