自动无缝翻页

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

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

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