自动无缝翻页

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

QingJ © 2025

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