自动无缝翻页

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

当前为 2021-10-22 提交的版本,查看 最新版本

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

QingJ © 2025

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