自动无缝翻页

无缝拼接下一页内容(瀑布流),目前支持:[所有「Discuz!、Flarum、phpBB、Xiuno、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、HiComic、动漫之家、古风漫画网、PubMed、wikiHow、GreasyFork、Github、StackOverflow(以上仅一小部分,更多的写不下了...

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

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