自动无缝翻页

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

目前為 2021-11-10 提交的版本,檢視 最新版本

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

QingJ © 2025

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