自动无缝翻页

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

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

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