自动无缝翻页

无缝拼接下一页内容(瀑布流),目前支持:[所有使用「Discuz!、Flarum、DUX(WordPress)」的网站]、百度、谷歌、必应、搜狗、头条搜索、360 搜索、微信搜索、贴吧、豆瓣、微博、NGA、V2EX、煎蛋网、糗事百科、龙的天空、起点小说、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-08 提交的版本,查看 最新版本

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