自动无缝翻页

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

当前为 2021-11-09 提交的版本,查看 最新版本

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