自动无缝翻页

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

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

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

QingJ © 2025

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