自动无缝翻页

无缝拼接下一页内容(瀑布流,追求小而美),目前支持:【所有「Discuz!、Flarum、phpBB、Xiuno、XenForo、NexusPHP」论坛】【百度、谷歌、必应、搜狗、微信、360、Yahoo、Yandex 等搜索引擎】、贴吧、豆瓣、知乎、微博、NGA、V2EX、B 站(Bilibili)、煎蛋网、糗事百科、龙的天空、起点中文、IT之家、千图网、Pixabay、Pixiv、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、小众软件、【动漫狂、漫画猫、漫画屋、漫画 DB、动漫之家、拷贝漫画、包子漫画、Mangabz、Xmanhua 等漫画网站】、PubMed、Z-Library、GreasyFork、Github、StackOverflow(以上仅一小部分,更多的写不下了...

当前为 2022-02-24 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name 自动无缝翻页
  3. // @name:zh-CN 自动无缝翻页
  4. // @name:zh-TW 自動無縫翻頁
  5. // @name:en AutoPager
  6. // @version 4.9.4
  7. // @author X.I.U
  8. // @description 无缝拼接下一页内容(瀑布流,追求小而美),目前支持:【所有「Discuz!、Flarum、phpBB、Xiuno、XenForo、NexusPHP」论坛】【百度、谷歌、必应、搜狗、微信、360、Yahoo、Yandex 等搜索引擎】、贴吧、豆瓣、知乎、微博、NGA、V2EX、B 站(Bilibili)、煎蛋网、糗事百科、龙的天空、起点中文、IT之家、千图网、Pixabay、Pixiv、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、小众软件、【动漫狂、漫画猫、漫画屋、漫画 DB、动漫之家、拷贝漫画、包子漫画、Mangabz、Xmanhua 等漫画网站】、PubMed、Z-Library、GreasyFork、Github、StackOverflow(以上仅一小部分,更多的写不下了...
  9. // @description:zh-TW 無縫拼接下一頁內容(瀑布流,追求小而美),支持各種論壇、搜索引擎、漫畫網站~
  10. // @description:en Seamlessly stitch next page content (waterfall)~
  11. // @match *://*/*
  12. // @connect www.ykmh.com
  13. // @connect www.xuexiniu.com
  14. // @connect bbs.xuexiniu.com
  15. // @connect www.tujigu.net
  16. // @connect weili.ooopic.com
  17. // @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
  18. // @grant GM_xmlhttpRequest
  19. // @grant GM_registerMenuCommand
  20. // @grant GM_unregisterMenuCommand
  21. // @grant GM_openInTab
  22. // @grant GM_getValue
  23. // @grant GM_setValue
  24. // @grant GM_notification
  25. // @grant window.onurlchange
  26. // @grant unsafeWindow
  27. // @license GPL-3.0 License
  28. // @run-at document-end
  29. // @namespace https://github.com/XIU2/UserScript
  30. // @supportURL https://github.com/XIU2/UserScript
  31. // @homepageURL https://github.com/XIU2/UserScript
  32. // ==/UserScript==
  33.  
  34. (function() {
  35. 'use strict';
  36. var menuAll = [
  37. ['menu_disable', '✅ 已启用 (点击对当前网站禁用)', '❌ 已禁用 (点击对当前网站启用)', []],
  38. ['menu_thread', '帖子内自动翻页 (社区类网站)', '帖子内自动翻页 (社区类网站)', true],
  39. ['menu_page_number', '显示当前页码及点击暂停翻页', '显示当前页码及点击暂停翻页', true],
  40. ['menu_pause_page', '左键双击网页空白处暂停翻页', '左键双击网页空白处暂停翻页', false],
  41. ['menu_customRules', '自定义翻页规则', '自定义翻页规则', {}]
  42. ], menuId = [], webType = 0, curSite = {SiteTypeID: 0}, DBSite, SiteType, pausePage = true, pageNum = {now: 1, _now: 1}, locationC = false, nowLocation = '', lp = location.pathname;
  43. window.autoPage = {src_bF: src_bF, xs_bF: xs_bF}
  44.  
  45. for (let i=0;i<menuAll.length;i++){ // 如果读取到的值为 null 就写入默认值
  46. if (GM_getValue(menuAll[i][0]) == null){GM_setValue(menuAll[i][0], menuAll[i][3])};
  47. }
  48. registerMenuCommand();
  49. if (menuId.length < 2) {return}
  50. // 注册脚本菜单
  51. function registerMenuCommand() {
  52. if (menuId.length != []){
  53. for (let i=0;i<menuId.length;i++){
  54. GM_unregisterMenuCommand(menuId[i]);
  55. }
  56. }
  57. for (let i=0;i<menuAll.length;i++) { // 循环注册脚本菜单
  58. menuAll[i][3] = GM_getValue(menuAll[i][0]);
  59.  
  60. if (menuAll[i][0] === 'menu_disable') { // 启用/禁用
  61.  
  62. if (menu_disable('check')) { // 当前网站在禁用列表中
  63. menuId[i] = GM_registerMenuCommand(`${menuAll[i][2]}`, function(){menu_disable('del')});
  64. return
  65. } else { // 不在禁用列表中
  66. webType = doesItSupport(); // 判断网站类型(即是否支持),顺便直接赋值
  67. if (webType === 0) {
  68. GM_registerMenuCommand('❌ 当前网站暂不支持 [点击申请支持]', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});window.GM_openInTab('https://greasyfork.org/zh-CN/scripts/419215/feedback', {active: true,insert: true,setParent: true});});
  69. GM_registerMenuCommand('#️⃣ 自定义翻页规则', function(){customRules()});
  70. console.info('[自动无缝翻页] - 不支持当前网站 [ ' + location.href + ' ],欢迎申请支持: https://github.com/XIU2/UserScript / https://greasyfork.org/zh-CN/scripts/96880/feedback');
  71. return
  72. } else if (webType === -1) {
  73. return
  74. }
  75. menuId[i] = GM_registerMenuCommand(`${menuAll[i][1]}`, function(){menu_disable('add')});
  76. }
  77.  
  78. } else if (menuAll[i][0] === 'menu_customRules') {
  79. menuId[i] = GM_registerMenuCommand(`#️⃣ ${menuAll[i][1]}`, function(){customRules()});
  80.  
  81. } else {
  82. menuId[i] = GM_registerMenuCommand(`${menuAll[i][3]?'✅':'❌'} ${menuAll[i][1]}`, function(){menu_switch(menuAll[i][3], menuAll[i][0], menuAll[i][2])});
  83. }
  84. }
  85. menuId[menuId.length] = GM_registerMenuCommand('💬 反馈 & 欢迎申请支持', function () {window.GM_openInTab('https://github.com/XIU2/UserScript#xiu2userscript', {active: true,insert: true,setParent: true});window.GM_openInTab('https://greasyfork.org/zh-CN/scripts/419215/feedback', {active: true,insert: true,setParent: true});});
  86. }
  87.  
  88. // 判断网站类型
  89. webTypeIf();
  90. //console.log(curSite)
  91. // 显示页码
  92. if (GM_getValue('menu_page_number')) {pageNumber('add');} else {pageNumber('set');}
  93. // 左键双击网页空白处暂停翻页
  94. pausePageEvent();
  95. // 强制新标签页打开链接(翻页模式 5/6)
  96. if (curSite.forceTarget) forceTarget();
  97.  
  98. // 对于使用 pjax 技术的网站,需要监听 URL 变化来重新判断翻页规则
  99. if (locationC) {
  100. nowLocation = location.href
  101. if (window.onurlchange === undefined) {addUrlChangeEvent();} // Tampermonkey v4.11 版本添加的 onurlchange 事件 grant,可以监控 pjax 等网页的 URL 变化
  102. if (webType === 1) {
  103. window.addEventListener('urlchange', function(){
  104. lp = location.pathname;
  105. //console.log(nowLocation, location.href)
  106. if (curSite.history !== false && window.top.document.xiu_nowUrl === location.href) {nowLocation = location.href; return}
  107. if (nowLocation == location.href) return
  108. if (curSite.pager && curSite.pager.type == 5) {
  109. if (self != top) {window.top.location.href = location.href;} else {if (getCSS('iframe#xiu_iframe')) {getCSS('iframe#xiu_iframe').remove();}}
  110. pausePage = true;
  111. } // 对于翻页模式 5,如果是 iframe 框架内 URL 变动,则升级为顶级页面,如果是顶级页面的 URL 变动,则清理 iframe 框架
  112. nowLocation = location.href; curSite = {SiteTypeID: 0}; pageNum.now = 1; // 重置规则+页码
  113. registerMenuCommand(); // 重新判断规则
  114. //console.log(curSite);
  115. if (curSite.style) {insStyle(curSite.style)} // 插入 Style CSS 样式
  116. curSite.pageUrl = ''; // 下一页URL
  117. pageLoading(); // 自动无缝翻页
  118.  
  119. if (GM_getValue('menu_page_number')) {pageNumber('add');} else {pageNumber('set');} // 显示页码
  120. pausePageEvent(); // 左键双击网页空白处暂停翻页
  121. })
  122. } else if (webType === 2) {
  123. window.addEventListener('urlchange', function(){
  124. lp = location.pathname;
  125. //console.log(nowLocation, location.href)
  126. if (nowLocation == location.href) return
  127. setTimeout(function(){
  128. nowLocation = location.href; curSite = {SiteTypeID: 0}; pageNum.now = 1; // 重置规则+页码
  129. discuz_(); // 重新判断规则
  130. if (curSite.style) {insStyle(curSite.style)} // 插入 Style CSS 样式
  131. pageLoading(); // 自动无缝翻页
  132.  
  133. if (GM_getValue('menu_page_number')) {pageNumber('add');} else {pageNumber('set');} // 显示页码
  134. pausePageEvent(); // 左键双击网页空白处暂停翻页
  135. }, 500)
  136. })
  137. } else if (webType === 3) {
  138. window.addEventListener('urlchange', function(){
  139. lp = location.pathname;
  140. if (nowLocation == location.href) return
  141. nowLocation = location.href; curSite = {SiteTypeID: 0}; pageNum.now = 1; // 重置规则+页码
  142. DBSite.flarum.functionS(); // 重新判断规则
  143. if (curSite.style) {insStyle(curSite.style)} // 插入 Style CSS 样式
  144. pageLoading(); // 自动无缝翻页
  145.  
  146. if (GM_getValue('menu_page_number')) {pageNumber('add');} else {pageNumber('set');} // 显示页码
  147. pausePageEvent(); // 左键双击网页空白处暂停翻页
  148. })
  149. }
  150. }
  151. // 插入 Style CSS 样式
  152. if (curSite.style) insStyle(curSite.style)
  153.  
  154. // 对翻页模式 5 的子 iframe 添加一个跟随滚动的事件
  155. if (curSite.pager && curSite.pager.type === 5 && self != top) {
  156. var beforeScrollTop = document.documentElement.scrollTop || document.body.scrollTop
  157. window.addEventListener('scroll', function (e) {
  158. let scrollTop = window.parent.document.documentElement.scrollTop || window.parent.document.body.scrollTop,
  159. clientHeight = window.parent.document.documentElement.clientHeight || window.parent.document.body.clientHeight,
  160. scrollHeight = window.parent.document.documentElement.scrollHeight || window.parent.document.body.scrollHeight,
  161. afterScrollTop = document.documentElement.scrollTop || document.body.scrollTop,
  162. delta = afterScrollTop - beforeScrollTop;
  163. if (delta == 0) return false;
  164. beforeScrollTop = afterScrollTop;
  165. //console.log(delta, scrollHeight - (scrollTop + clientHeight), '2222')
  166. if (delta > 0 && scrollTop + clientHeight < scrollHeight) {
  167. window.parent.scrollBy(0, delta*2);
  168. }
  169. }, false);
  170. }
  171.  
  172. // 下一页URL
  173. curSite.pageUrl = '';
  174. // 自动无缝翻页
  175. pageLoading();
  176.  
  177.  
  178. // --------------------------------------------------------
  179.  
  180.  
  181. // [Discuz! 论坛] 判断各版块帖子列表类型
  182. function discuzForum(m) {
  183. if (m == 'm') { // 手机版页面
  184. if (getCSS('a.loadmore')) {
  185. curSite = DBSite.discuz_m_forum;
  186. } else if (getCSS('.threadlist')) {
  187. curSite = DBSite.discuz_m; curSite.pager.pageE = 'css;.threadlist > ul > li';
  188. } else if (getCSS('[id^="normalthread_"]')) {
  189. curSite = DBSite.discuz_m; curSite.pager.pageE = 'css;[id^="normalthread_"]:not(.ZDlist)';
  190. }
  191. if (curSite.SiteTypeID !== 0 && location.hostname === 'keylol.com') {curSite.history = false; locationC = true;}
  192. } else {
  193. if (getCSS('#autopbn')) { // 判断是否有 [下一页] 按钮
  194. curSite = DBSite.discuz_forum;
  195. } else if (getCSS('#waterfall')) { // 判断是否为图片模式
  196. if (!getCSS('#pgbtn, .pgbtn')) { // 如果各版块帖子列表已存在这个元素,说明自带了无缝翻页
  197. curSite = DBSite.discuz_waterfall; waterfallStyle(); // 图片模式列表样式预处理
  198. }
  199. } else {
  200. curSite = DBSite.discuz_guide;
  201. }
  202. }
  203. }
  204. // [Discuz! 论坛] 判断手机版帖子内
  205. function discuzThreadM() {
  206. if (getCSS('[id^="pid"]')) {
  207. curSite = DBSite.discuz_m; curSite.pager.pageE = 'css;[id^="pid"], [id^="pid"]+div:not([id="post_new"])'
  208. } else if (getCSS('[id^="post_"]')) {
  209. curSite = DBSite.discuz_m; curSite.pager.pageE = 'css;[id^="post_"]';
  210. }
  211. if (curSite.SiteTypeID !== 0 && location.hostname === 'keylol.com') {curSite.history = false; locationC = true;}
  212. }
  213. function discuz_() {
  214. if (getCSS('body[id="nv_forum"][class^="pg_"][onkeydown*="27"]')) {
  215. switch (getCSS('body[id="nv_forum"][class^="pg_"][onkeydown*="27"]').className) {
  216. case 'pg_forumdisplay': // < 各版块帖子列表 >
  217. discuzForum(); break;
  218. case 'pg_viewthread': // < 帖子内 >
  219. if (GM_getValue('menu_thread')) curSite = DBSite.discuz_thread; break;
  220. case 'pg_guide': // < 导读帖子列表等 >
  221. curSite = DBSite.discuz_guide; break;
  222. case 'pg_collection': // < 淘贴列表 >
  223. curSite = DBSite.discuz_collection; break;
  224. }
  225. }
  226. // 如果上面没有匹配的则继续 < 搜索结果 >
  227. if (curSite.SiteTypeID === 0) {
  228. if (indexOF('search') || getCSS('body[id="nv_search"][onkeydown*="27"]')) {
  229. if (indexOF('mobile=2', 's')) { // 手机版页面
  230. curSite = DBSite.discuz_m; curSite.pager.pageE = 'css;.threadlist > ul > li'; locationC = true;
  231. } else {
  232. curSite = DBSite.discuz_search;
  233. }
  234. }
  235. }
  236. // 如果上面没有匹配的则继续
  237. if (curSite.SiteTypeID === 0) {
  238. if (indexOF('.html')) { // 判断是不是静态网页(.html 结尾)
  239. if (indexOF('/forum-')) { // < 各版块帖子列表 >
  240. if (getXpath('//head/meta[@name="applicable-device" and @content="mobile"] | //head/title[contains(text(), "手机版")] | //head/link[contains(@href, "/mobile/")] | //head/script[contains(@src, "/mobile/")]')) { // 手机版页面
  241. discuzForum('m');
  242. } else {
  243. discuzForum();
  244. }
  245. } else if (indexOF('/thread-')) { // < 帖子内 >
  246. if (getXpath('//head/meta[@name="applicable-device" and @content="mobile"] | //head/title[contains(text(), "手机版")] | //head/link[contains(@href, "/mobile/")] | //head/script[contains(@src, "/mobile/")]')) { // 手机版页面
  247. if (GM_getValue('menu_thread')) discuzThreadM();
  248. } else {
  249. if (GM_getValue('menu_thread')) curSite = DBSite.discuz_thread;
  250. }
  251. }
  252. }
  253. }
  254. // 如果上面没有匹配的则继续
  255. if (curSite.SiteTypeID === 0) {
  256. if (indexOF('mod=forumdisplay', 's') || indexOF('forumdisplay.php')) { // < 各版块帖子列表 >
  257. if (indexOF('mobile=2', 's') || indexOF('mobile=yes', 's') || getXpath('//head/meta[@name="applicable-device" and @content="mobile"] | //head/title[contains(text(), "手机版")] | //head/link[contains(@href, "/mobile/")] | //head/script[contains(@src, "/mobile/")]')) { // 手机版页面
  258. discuzForum('m');
  259. } else {
  260. discuzForum();
  261. }
  262. } else if (indexOF('mod=viewthread', 's') || indexOF('viewthread.php')) { // < 帖子内 >
  263. if (indexOF('mobile=2', 's') || getXpath('//head/meta[@name="applicable-device" and @content="mobile"] | //head/title[contains(text(), "手机版")] | //head/link[contains(@href, "/mobile/")] | //head/script[contains(@src, "/mobile/")]')) { // 手机版页面
  264. if (GM_getValue('menu_thread')) discuzThreadM();
  265. } else {
  266. if (GM_getValue('menu_thread')) curSite = DBSite.discuz_thread;
  267. }
  268. } else if (indexOF('mod=guide', 's')) { // < 导读帖子列表 >
  269. curSite = DBSite.discuz_guide;
  270. } else if(indexOF('mod=space', 's') && indexOF('do=thread', 's')) { // 别人的主题/回复
  271. curSite = DBSite.discuz_youspace;
  272. } else if (indexOF('mod=collection', 's')) { // < 淘贴列表 >
  273. curSite = DBSite.discuz_collection;
  274. } else if (getCSS('#threadlist')) { // < 部分论坛的各板块 URL 是自定义的 >
  275. discuzForum();
  276. } else if (getCSS('#postlist')) { // < 部分论坛的帖子内 URL 是自定义的 >
  277. if (GM_getValue('menu_thread')) curSite = DBSite.discuz_thread;
  278. } else { // 手机版判断
  279. discuzForum('m');
  280. if (curSite.SiteTypeID === 0) discuzThreadM();
  281. }
  282. }
  283. }
  284. // [Discuz! 论坛] 图片模式列表样式预处理
  285. function waterfallStyle() {
  286. let width = getCSS('#waterfall > li:first-child').style.width;
  287. if (width) 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;}`);
  288. }
  289.  
  290.  
  291. // [谷歌搜索] 的插入前函数(加载视频图片)
  292. function google_bF(pageElems) {
  293. if (!indexOF('tbm=nws', 's')){
  294. pageElems.forEach(function (one) {
  295. getAllCSS('a[aria-label][href*="https://www.youtube.com/watch?v="]').forEach(function (one1) {
  296. let img = getCSS('img', one1)
  297. if (img) img.src = `https://i.ytimg.com/vi/${one1.href.split('?v=')[1]}/mqdefault.jpg`
  298. })
  299. });
  300. }
  301. return pageElems
  302. }
  303.  
  304.  
  305. // [必应搜索] 的插入前函数(加载网站图标)
  306. function bing_bF(pageElems) {
  307. if (!getCSS('.b_title > a.sh_favicon')) {
  308. insStyle('.b_title > a.sh_favicon {display: none !important;}');
  309. delete curSite.function
  310. //console.log(curSite)
  311. return pageElems
  312. }
  313. pageElems.forEach(function (one) {
  314. getAllCSS('div.rms_iac[data-src]').forEach(function (one1) {
  315. one1.outerHTML = `<img src="${one1.dataset.src}" height="16" width="16" alt="全球 Web 图标" role="presentation" class="rms_img">`;
  316. })
  317. });
  318. return pageElems
  319. }
  320.  
  321.  
  322. // [百度贴吧](发帖按钮点击事件)
  323. function baidu_tieba_1() {
  324. let button = getCSS('.tbui_aside_fbar_button.tbui_fbar_post > a');
  325. if (button) {
  326. button.remove();
  327. getCSS('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>')
  328. button = getCSS('.tbui_aside_fbar_button.tbui_fbar_post > a');
  329. if (button) {
  330. button.onclick = function(){
  331. let button2 = getCSS('div.edui-btn.edui-btn-fullscreen.edui-btn-name-portrait');
  332. if (button2) {button2.click();} else {alert('提示:登录后才能发帖!');}
  333. return false;
  334. }
  335. }
  336. }
  337. }
  338. // [百度贴吧] 插入数据
  339. function baidu_tieba_insertE(pageElems, type) {
  340. if (!pageElems) return
  341. // 获取 <script> 内容
  342. const scriptElems = getXpath(`//script[contains(text(), 'Bigpipe.register("frs-list/pagelet/thread_list", ')]`, pageElems, pageElems);
  343. if (scriptElems) {
  344. // 从 <script> 中提取帖子列表字符串
  345. let scriptText = scriptElems.textContent.replace('Bigpipe.register("frs-list/pagelet/thread_list", ','');
  346. scriptText = scriptText.slice(0, scriptText.indexOf(').'));
  347. // 字符串转 Element 元素
  348. let temp_baidu_tieba = document.createElement('div'); temp_baidu_tieba.innerHTML = JSON.parse(scriptText).content;
  349. processElems(temp_baidu_tieba);
  350. }
  351. }
  352.  
  353.  
  354. // [V2EX] 的插入后函数(新标签页打开链接)
  355. function v2ex_aF(css) {
  356. let links = getAllCSS(css);if (!links) return
  357. links.forEach(function (_this) {_this.target = '_blank';});
  358. }
  359.  
  360.  
  361. // [NexusMods] 获取下一页地址
  362. function nexusmods_nextL() {
  363. if (getCSS('.nexus-ui-blocker')) return
  364. let modList;
  365. if (indexOF('/news')) {modList = RH_NewsTabContent;} else {modList = RH_ModList;}
  366. if (!modList) return
  367. let out_items = JSON.stringify(modList.out_items).replace(/{|}|"/g,''),
  368. nextNum = getXpath('//div[contains(@class, "pagenav")][1]//a[contains(@class, "page-selected")]/parent::li/following-sibling::li/a'),
  369. categories = modList.out_items.categories, categoriesUrl = '';
  370. var url = '';
  371. if (nextNum && nextNum.innerText) {
  372. nextNum = nextNum.innerText;
  373. if (out_items.indexOf('page:') > -1) {
  374. out_items = out_items.replace(/page:\d+/, `page:${nextNum}`)
  375. } else {
  376. out_items += `,page:${nextNum}`;
  377. }
  378. if (categories && categories != []) {
  379. for (let i = 0; i < categories.length; i++) {
  380. categoriesUrl += `,categories[]:${categories[i]}`
  381. }
  382. categoriesUrl = categoriesUrl.replace(/,/,'');
  383. if (out_items.indexOf('categories:') > -1) {
  384. out_items = out_items.replace(/categories:\[.*\]/, categoriesUrl)
  385. }
  386. }
  387. return `https://www.nexusmods.com${modList.uri}?RH_${modList.id}=${out_items}`
  388. }
  389. return ''
  390. }
  391. // [NexusMods] 的插入前函数(隐藏底部元素)
  392. function nexusmods_bF(pageElems) {
  393. pageElems.forEach(function (one) {
  394. let now = one.querySelector('.mod-tile-left');
  395. if (now) {
  396. let downloadCount = now.querySelector('.downloadcount > span.flex-label');
  397. if (downloadCount) {
  398. if (GlobalModStats[now.dataset.gameId] && GlobalModStats[now.dataset.gameId][now.dataset.modId]) {
  399. downloadCount.textContent = shortFormat(parseInt(GlobalModStats[now.dataset.gameId][now.dataset.modId].total));
  400. }
  401. }
  402. }
  403. });
  404. return pageElems
  405. }
  406.  
  407.  
  408. // [bilibili_search] 获取下一页地址
  409. function bilibili_search_nextL() {
  410. if (!location.search) return
  411. let pageActive = 1, pageLast = parseInt(getXpath('//ul[@class="pages"]/li[contains(@class, "page-item")][not(contains(@class, "next") or contains(@class, "prev"))][last()]').innerText);
  412. if (!pageLast) return
  413. if (indexOF(/page=\d+/, 's')) {
  414. pageActive = parseInt(/page=\d+/.exec(location.search)[0].replace('page=',''))
  415. }
  416. if (pageActive < pageLast) {
  417. if (indexOF(/page=\d+/, 's')) {
  418. return (location.origin + location.pathname + location.search.replace(/page=\d+/,`page=${pageActive+1}`))
  419. } else {
  420. return (location.origin + location.pathname + location.search + `&page=${pageActive+1}`)
  421. }
  422. }
  423. }
  424. // [bilibili_search] 插入前函数(加载图片)
  425. function bilibili_search_bF(pageElems) {
  426. pageElems.forEach(function (one) {
  427. let img = getCSS('.img > .lazy-img > img[src=""]', one)
  428. if (img) {
  429. img.setAttribute('data-srclz', 'lazy')
  430. }
  431. });
  432. return pageElems
  433. }
  434. // [bilibili_search] 插入后函数(加载图片)
  435. function bilibili_search_aF() {
  436. let result = __INITIAL_STATE__.flow[__INITIAL_STATE__.flow.fields[0]].result;
  437. if (result.length > 0) {
  438. let imgArr = getAllCSS('.img > .lazy-img > img[data-srclz]');
  439. if (imgArr.length > 0) {
  440. for (let i = 0; i < imgArr.length; i++) {
  441. imgArr[i].src = result[i].pic;
  442. imgArr[i].removeAttribute('data-srclz');
  443. }
  444. }
  445. }
  446. }
  447.  
  448.  
  449. // [漫画狂] 获取下一页地址
  450. function cartoonmad_nextL() {
  451. let url = getXpath('//a[@class="pages"][contains(text(),"下一頁")]');
  452. if (url) {
  453. if (url.getAttribute('href') === 'thend.asp') {
  454. url = getXpath('//a[@class="pages"][contains(string(),"下一話")]')
  455. if (url) return url.href;
  456. pausePage = false;
  457. GM_notification({text: `注意:该网站早期漫画(如海贼王、柯南)因为网站自身问题而无法翻至下一话(仅限于显示为 [第 X 卷]/[下一卷] 的)。\n因此需要手动去 [目录页] 进入下一卷!`, timeout: 10000});
  458. } else {
  459. return url.href;
  460. }
  461. }
  462. return '';
  463. }
  464.  
  465.  
  466. // [漫画猫] 初始化(显示本话所以图片)
  467. function manhuacat_init() {
  468. let _img = '';
  469. for (let now of img_data_arr) {_img += `<img src="${asset_domain}${img_pre}${now}">`;}
  470. getOne(curSite.pager.insertP[0]).innerHTML = _img;
  471.  
  472. }
  473. // [漫画猫] 获取下一页地址
  474. function manhuacat_nextL(pageElems, type) {
  475. if (type === 'url') {
  476. if(pageElems.code == '0000') {
  477. if (pageElems.url === curSite.pageUrl) return
  478. curSite.pageUrl = pageElems.url;
  479. getPageElems_(curSite.pageUrl); // 真正的下一页链接
  480. }
  481. } else {
  482. let vg_r_data = getCSS('.vg-r-data');
  483. if (vg_r_data) {
  484. getPageElems_(`${location.origin}/chapter_num?chapter_id=${vg_r_data.dataset.chapter_num}&ctype=1&type=${vg_r_data.dataset.chapterType};`, 'json', 'GET', '', 'url');
  485. }
  486. }
  487. }
  488. // [漫画猫] 插入数据
  489. function manhuacat_insertE(pageElems, type) {
  490. if (!pageElems) return
  491. if (type === 'url') { // 获取下一页链接
  492. manhuacat_nextL(pageElems, type); return
  493. }
  494. addHistory(pageElems);
  495. replaceElems(pageElems);
  496.  
  497. // 插入图片
  498. let _img = '', _img_arr = LZString.decompressFromBase64(getXpath('//body/script[not(@src)][contains(text(), "img_data")]').textContent.split('"')[1]).split(','), vg_r_data = getCSS('.vg-r-data');;
  499. for (let now of _img_arr) {_img += `<img src="${vg_r_data.dataset.chapterDomain}${img_pre}${now}">`;}
  500. if (_img) {
  501. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中
  502. pageNum.now = pageNum._now + 1
  503. }
  504. }
  505.  
  506.  
  507. // [漫画柜] 初始化(将本话其余图片插入网页中)
  508. function manhuagui_init() {
  509. // hook imgDate 代码
  510. SMH.imgData = function(n) {window['imgDate'] = n;return{preInit:function(){}}}
  511. // 重新执行本页的 imgDate 代码
  512. insScript(curSite.pager.pageE);
  513. let _img = '', imgPath = `${location.protocol}//i.hamreus.com${window['imgDate'].path}`;
  514. //console.log(imgPath, window['imgDate'])
  515. if (!(window['imgDate']) || !(imgPath)) return
  516. // 遍历图片文件名数组,组合为 img 标签
  517. for (let i = 0; i < window['imgDate'].files.length; i++) {_img += `<img src="${imgPath + window['imgDate'].files[i]}?e=${window['imgDate'].sl.e}&m=${window['imgDate'].sl.m}">`;}
  518. // 插入并覆盖原来的一个图片
  519. getOne(curSite.pager.insertP[0]).innerHTML = _img;
  520. pausePage = true;
  521. }
  522. // [漫画柜] 获取下一页地址
  523. function manhuagui_nextL() {
  524. if (window['imgDate'].nextId == 0) return
  525. var url = location.origin + location.pathname.replace(window['imgDate'].cid.toString(), window['imgDate'].nextId.toString())
  526. if (url === curSite.pageUrl) return
  527. curSite.pageUrl = url
  528. getPageElems_(curSite.pageUrl);
  529. }
  530. // [漫画柜] 插入数据
  531. function manhuagui_insertE(pageElems, type) {
  532. if (!pageElems) return
  533. // 重新执行本页的 imgDate 代码
  534. insScript(curSite.pager.pageE, document.body, pageElems);
  535. let _img = '', imgPath = `${location.protocol}//i.hamreus.com${window['imgDate'].path}`;
  536. //console.log(imgPath, window['imgDate'])
  537. if (!(window['imgDate']) || !(imgPath)) return
  538. // 遍历图片文件名数组,组合为 img 标签
  539. for (let i = 0; i < window['imgDate'].files.length; i++) {_img += `<img src="${imgPath + window['imgDate'].files[i]}?e=${window['imgDate'].sl.e}&m=${window['imgDate'].sl.m}">`;}
  540. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img);
  541. addHistory(pageElems);
  542. pageNum.now = pageNum._now + 1
  543. }
  544.  
  545.  
  546. // [36漫画] 初始化(将本话其余图片插入网页中)
  547. function _36manga_init() {
  548. let _img = '', imgPath = `${SinConf.resHost[0].domain[0]}${chapterPath}`;
  549. if (!(chapterImages) || !(imgPath)) return
  550. // 遍历图片文件名数组,组合为 img 标签
  551. for (let i = 0; i < chapterImages.length; i++) {_img += `<img src="${imgPath}${chapterImages[i]}">`;}
  552. // 插入并覆盖原来的一个图片
  553. getOne(curSite.pager.insertP[0]).innerHTML = _img;
  554. pausePage = true;
  555. }
  556. // [36漫画] 获取下一页地址
  557. function _36manga_nextL() {
  558. if (!nextChapterData.id) return
  559. var url = comicUrl + nextChapterData.id + '.html'
  560. if (url === curSite.pageUrl) return
  561. curSite.pageUrl = url
  562. getPageElems_(curSite.pageUrl);
  563. }
  564. // [36漫画] 插入数据
  565. function _36manga_insertE(pageElems, type) {
  566. if (!pageElems) return
  567. // 插入并执行数据代码
  568. insScript(curSite.pager.pageE, document.body, pageElems);
  569. let _img = '', imgPath = `${SinConf.resHost[0].domain[0]}${chapterPath}`;
  570. if (!(chapterImages) || !(imgPath)) return
  571. // 遍历图片文件名数组,组合为 img 标签
  572. for (let i = 0; i < chapterImages.length; i++) {_img += `<img src="${imgPath}${chapterImages[i]}">`;}
  573. // 插入并覆盖原来的一个图片
  574. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img);
  575. addHistory(pageElems);
  576. pageNum.now = pageNum._now + 1
  577. }
  578.  
  579.  
  580. // [爱漫画] 获取全部图片
  581. function imanhuaw_getIMG() {
  582. let _img = '', _imgUrl;
  583. for (let one of base64_decode(qTcms_S_m_murl_e).split("$qingtiandy$")) {
  584. _imgUrl = one;
  585. if (one.substring(0,1) == '/') {
  586. _imgUrl = qTcms_m_weburl + _imgUrl;
  587. } else {
  588. if (qTcms_Pic_m_if != '2') {
  589. one = one.replace(/\?/gi, 'a1a1');
  590. one = one.replace(/&/gi, 'b1b1');
  591. one = one.replace(/%/gi, 'c1c1');
  592. let m_httpurl = '';
  593. if (typeof(qTcms_S_m_mhttpurl) != 'undefined') m_httpurl = base64_decode(qTcms_S_m_mhttpurl);
  594. if (location.hostname == 'www.ccshwy.com') qTcms_m_indexurl = 'http://h.ccshwy.com/';
  595. _imgUrl = qTcms_m_indexurl + 'statics/pic/?p=' + escape(one) + '&picid=' + qTcms_S_m_id + '&m_httpurl=' + escape(m_httpurl);
  596. } else {
  597. _imgUrl = _imgUrl.replace('http:', '') ;
  598. _imgUrl = _imgUrl.replace('https:', '');
  599. }
  600. }
  601. _img += `<img src="${_imgUrl}">`;
  602. }
  603. return _img;
  604. }
  605. // [爱漫画] 初始化(调整本话其余图片)
  606. function imanhuaw_init() {
  607. getOne(curSite.pager.insertP[0]).outerHTML = imanhuaw_getIMG();
  608. document.oncontextmenu = function(){}
  609. }
  610. // [爱漫画] 获取下一页地址
  611. function imanhuaw_nextL() {
  612. let next = location.origin + qTcms_Pic_nextArr
  613. if (next && next != location.origin && next != curSite.pageUrl) {
  614. curSite.pageUrl = next;
  615. getPageElems_(curSite.pageUrl);
  616. }
  617. }
  618. // [爱漫画] 插入数据
  619. function imanhuaw_insertE(pageElems, type) {
  620. if (!pageElems) return
  621. // 插入并运行 <script>
  622. insScript('//head/script[not(@src)][contains(text(), "qTcms_S_m_murl_e")]', document.body, pageElems);
  623. // 将 img 标签插入到网页中
  624. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), imanhuaw_getIMG());
  625. addHistory(pageElems);
  626. pageNum.now = pageNum._now + 1
  627. }
  628.  
  629.  
  630. // [漫画 DB] 初始化(将本话其余图片插入网页中)
  631. function manhuadb_init() {
  632. let _img = '', data = getCSS('.vg-r-data'), imgDate;
  633. if (!data) return
  634. getAllCSS(curSite.pager.pageE.replace('css;', '')).forEach(function (one) {
  635. if (one.tagName === 'SCRIPT' && one.textContent.indexOf('var img_data =') > -1) {
  636. let json = JSON.parse(window.atob(one.textContent.split("'")[1]));
  637. if (json) {
  638. let _img = '';
  639. for (let i = 0; i < json.length; i++) {_img += `<img class="img-fluid show-pic" src="${data.dataset.host + data.dataset.img_pre + json[i].img}">`;}
  640. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中
  641. }
  642. }
  643. })
  644. }
  645. // [漫画 DB] 获取下一页地址
  646. function manhuadb_nextL() {
  647. let nextArr = getAllCSS('a.fixed-a-es'), next;
  648. var url = '';
  649. if (nextArr.length == 0) return
  650. for (let i = 0; i < nextArr.length; i++) {
  651. if (nextArr[i].className.indexOf('active') > -1) {
  652. if (nextArr[i+1]) url = nextArr[i+1].href;
  653. break;
  654. }
  655. }
  656. if (url === curSite.pageUrl) return
  657. curSite.pageUrl = url
  658. getPageElems_(curSite.pageUrl);
  659. }
  660. // [漫画 DB] 插入数据
  661. function manhuadb_insertE(pageElems, type) {
  662. if (!pageElems) return
  663. if (replaceElems(pageElems, curSite.pager.pageE, curSite.pager.pageE)) {
  664. addHistory(pageElems);
  665. pageNum.now = pageNum._now + 1
  666. manhuadb_init(); // 将刚刚替换的图片插入网页中
  667. }
  668. }
  669.  
  670.  
  671. // [HiComic(嗨漫画)] 初始化(将本话其余图片插入网页中)
  672. function hicomic_init() {
  673. let _img = '';
  674. getAllCSS('.chapter > section:not(:first-child) > section[val]').forEach(function (one) {
  675. let src = one.getAttribute('val');
  676. if (src.indexOf('!p_c_c_') === -1) src += '!p_c_c_h'
  677. _img += `<img src="${src}">`
  678. })
  679. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中
  680. window.document.title = window.document.title.replace(/(\(第.+\))? - HiComic/, `(${getCSS('.chapter_name').textContent}) - HiComic`); // 修改网页标题(加上 第 X 话)
  681. }
  682. // [HiComic(嗨漫画)] 获取下一页地址
  683. function hicomic_nextL() {
  684. let nextId;
  685. nextId = getCSS('.next_chapter:not(.end)')
  686. if (nextId && nextId.id && nextId.id != 'None') {
  687. curSite.pageUrl = location.href;
  688. getPageElems_(`https://www.hicomic.net/api/web/chapter/${nextId.id}/contents`, 'json');
  689. }
  690. }
  691. // [HiComic(嗨漫画)] 插入数据
  692. function hicomic_insertE(pageElems, type) {
  693. if (!pageElems || pageElems.code != 200) return
  694. if (pageElems.results.chapter.next) { // 写入下一页的 UUID
  695. getCSS('.next_chapter').id = pageElems.results.chapter.next;
  696. } else {
  697. getCSS('.next_chapter').id = 'None';
  698. getCSS('.next_chapter').classList.add('end');
  699. }
  700. curSite.pageUrl =`https://www.hicomic.net/chapters/${pageElems.results.chapter.uuid}/contents`
  701. getCSS('.chapter_name').textContent = pageElems.results.chapter.name; // 修改漫画标题
  702. addHistory(pageElems, window.document.title.replace(/(\(第.+\))? - HiComic/, `(${pageElems.results.chapter.name}) - HiComic`));
  703. let _img = '';
  704. for (let i = 0; i < pageElems.results.chapter.contents.length; i++) { // 遍历图片文件名数组,组合为 img 标签
  705. let src = pageElems.results.chapter.contents[i].url;
  706. if (src.indexOf('!p_c_c_') === -1) src += '!p_c_c_h';
  707. _img += `<img src="${src}">`
  708. }
  709. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中
  710. pageNum.now = pageNum._now + 1
  711. }
  712.  
  713.  
  714. // [动漫之家] 初始化(调整本话其余图片)
  715. function dmzj_init(css) {
  716. let _img = '';
  717. getAllCSS(css).forEach(function (one) {_img += `<img src="${one.dataset.original}">`;})
  718. getOne(curSite.pager.insertP[0]).innerHTML = _img;
  719. }
  720. // [动漫之家] 插入数据
  721. function dmzj_insertE(pageElems, type) {
  722. if (!pageElems) return
  723. // 插入并运行 <script>
  724. insScript('css;head > script[type]:not([src])', document.body, pageElems);
  725.  
  726. // 插入图片
  727. let _img = '', _img_arr;
  728. if (pages.indexOf('|') === -1) {
  729. _img_arr = JSON.parse(pages.replace(/\r\n/g,'|')).page_url.split('|');
  730. } else {
  731. _img_arr = JSON.parse(pages).page_url.split('|');
  732. }
  733. for (let now of _img_arr) {
  734. _img += `<img src="${img_prefix}${now}">`;
  735. }
  736. if (_img) {
  737. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中
  738. addHistory(pageElems);
  739. if (replaceElems(pageElems)) pageNum.now = pageNum._now + 1
  740. }
  741. }
  742. // [动漫之家-漫画] 插入数据
  743. function dmzj_manhua_insertE(pageElems, type) {
  744. if (!pageElems) return
  745. // 插入并运行 <script>
  746. insScript('css;head > script[type]:not([src])', document.body, pageElems);
  747.  
  748. // 插入图片
  749. let _img = '';
  750. for (let now of arr_pages) {
  751. _img += `<img src="${img_prefix}${now}">`;
  752. }
  753. if (_img) {
  754. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中
  755. addHistory(pageElems);
  756. if (replaceElems(pageElems)) pageNum.now = pageNum._now + 1
  757. }
  758. }
  759.  
  760.  
  761. // [优酷漫画] 初始化(调整本话其余图片)
  762. function ykmh_init(css) {
  763. let host = SinMH.getChapterImage(1).split('/')[0] + '//' + SinMH.getChapterImage(1).split('/')[2];
  764. if (!host) return
  765. let _img = '';
  766. for (let one of chapterImages) {_img += `<img src="${host}${one}">`;}
  767. getOne(curSite.pager.insertP[0]).innerHTML = _img;
  768. }
  769. // [优酷漫画] 获取下一页地址
  770. function ykmh_nextL() {
  771. let url = comicUrl + nextChapterData.id + '.html'
  772. if (url && url != '.html' && url != curSite.pageUrl) {
  773. curSite.pageUrl = url;
  774. getPageElems_(curSite.pageUrl);
  775. }
  776. }
  777. // [优酷漫画] 插入数据
  778. function ykmh_insertE(pageElems, type) {
  779. //console.log(pageElems)
  780. if (!pageElems) return
  781. // 插入并运行 <script>
  782. insScript('//script[contains(text(),"chapterImages")]', document.body, pageElems);
  783.  
  784. let host = SinMH.getChapterImage(1).split('/')[0] + '//' + SinMH.getChapterImage(1).split('/')[2];
  785. if (!host) host = document.querySelector(curSite.pager.insertP[0]).src.split('/')[0] + '//' + document.querySelector(curSite.pager.insertP[0]).src.split('/')[2]
  786. // 插入图片
  787. let _img = '';
  788. for (let one of chapterImages) {_img += `<img src="${host}${one}">`;}
  789. if (_img) {
  790. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中
  791. addHistory(pageElems);
  792. if (replaceElems(pageElems)) pageNum.now = pageNum._now + 1
  793. }
  794. }
  795.  
  796.  
  797. // [动漫戏说] 插入后函数(加载图片)
  798. function acgn_aF() {
  799. let old = getAllCSS('.pic[_src][id]'), _img = '';
  800. if (old.length > 0) {
  801. for (let now of old) {now.outerHTML = `<div class="pic" _src="${now.getAttribute('_src')}"><img src="${now.getAttribute('_src')}" class="img1"></div>`;}
  802. }
  803. }
  804.  
  805.  
  806. // [漫画星球] 插入数据
  807. function mhxqiu_insertE(pageElems, type) {
  808. if (!pageElems) return
  809. // 插入并运行 <script>
  810. insScript('//script[contains(text(), "eval") and contains(text(), "newImgs")]', document.body, pageElems);
  811.  
  812. // 插入图片
  813. let _img = '';
  814. for (let now of newImgs) {_img += `<li><div style="display: inline-block;zoom: 1;"><img src="${now}" class="loaded lazy" style="opacity: 1;box-shadow:none;"></div></li>`;}
  815. if (_img) {
  816. // 将 img 标签插入到网页中
  817. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img);
  818. addHistory(pageElems);
  819. pageNum.now = pageNum._now + 1
  820. replaceElems(pageElems)
  821. }
  822. }
  823.  
  824.  
  825. // [风之动漫] 插入数据
  826. function fffdm_insertE(pageElems, type) {
  827. if (!pageElems) return
  828. // 插入并运行 <script>
  829. let scriptElems = getXpath('id("main")/script[contains(text(), "mhpicurl")][1]', pageElems, pageElems);
  830. if (scriptElems) {
  831. document.body.appendChild(document.createElement('script')).textContent = scriptElems.textContent.replace(/document\.write.+/, '');
  832.  
  833. // 插入图片
  834. setTimeout(function() {
  835. getOne(curSite.pager.insertP[0]).appendChild(document.createElement('img')).src = mhpicurl;
  836. addHistory(pageElems);
  837. pageNum.now = pageNum._now + 1
  838. replaceElems(pageElems)
  839. }, 100)
  840. }
  841. }
  842.  
  843.  
  844. // [乐语漫画] 初始化(调整本话其余图片)
  845. function leyuman_init() {
  846. let _img = '';
  847. for (let one of JSON.parse(z_img)) {
  848. if (one.slice(0,4) === 'http') {
  849. _img += `<img src="${one}">`;
  850. } else {
  851. _img += `<img src="https://img.shishi-life.com/${one}">`;
  852. }
  853. }
  854. getOne(curSite.pager.insertP[0]).innerHTML = _img;
  855.  
  856. }
  857. // [乐语漫画] 插入数据
  858. function leyuman_insertE(pageElems, type) {
  859. if (!pageElems) return
  860. // 插入并运行 <script>
  861. insScript('//body//script[not(@src)][contains(text(), "z_img=")]', document.body, pageElems);
  862.  
  863. // 插入图片
  864. let _img = '';
  865. for (let one of JSON.parse(z_img)) {
  866. if (one.slice(0,4) === 'http') {
  867. _img += `<img src="${one}">`;
  868. } else {
  869. _img += `<img src="https://img.shishi-life.com/${one}">`;
  870. }
  871. }
  872. if (_img) {
  873. // 将 img 标签插入到网页中
  874. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img);
  875. addHistory(pageElems);
  876. pageNum.now = pageNum._now + 1
  877. replaceElems(pageElems)
  878. }
  879. }
  880.  
  881.  
  882. // [新新漫画] 初始化(调整本话其余图片)
  883. function _77mh_init() {
  884. let _img = '';
  885. for (let one of arr) {_img += `<img src="${img_qianz}${one}">`;}
  886. getOne(curSite.pager.insertP[0]).innerHTML = _img;
  887. }
  888. // [新新漫画] 获取下一页地址
  889. function _77mh_nextL() {
  890. let next = nextLink_b
  891. if (next && next != curSite.pageUrl) {
  892. curSite.pageUrl = next;
  893. getPageElems_(curSite.pageUrl);
  894. }
  895. }
  896. // [新新漫画] 插入数据
  897. function _77mh_insertE(pageElems, type) {
  898. if (!pageElems) return
  899. // 插入并运行 <script>
  900. insScript('//script[not(@src)][contains(text(), "eval(")]', document.body, pageElems);
  901.  
  902. // 插入图片
  903. let _img = '';
  904. for (let one of msg.split('|')) {_img += `<img src="${img_qianz}${one}.webp">`;}
  905. if (_img) {
  906. // 将 img 标签插入到网页中
  907. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img);
  908. addHistory(pageElems);
  909. pageNum.now = pageNum._now + 1
  910. }
  911. }
  912.  
  913.  
  914. // [古风漫画网] 获取下一页地址
  915. function gufengmh_nextL() {
  916. let pageElems = getOne(curSite.pager.pageE); // 寻找数据所在元素
  917. if (pageElems) {
  918. let comicUrl, nextId;
  919. var url = '';
  920. pageElems.textContent.split(';').forEach(function (one){ // 分号 ; 分割为数组并遍历
  921. //console.log(one)
  922. if (one.indexOf('comicUrl') > -1) { // 下一页 URL 前半部分
  923. comicUrl = one.split('"')[1];
  924. } else if (one.indexOf('nextChapterData') > -1) { // 下一页 URL 的后半部分 ID
  925. nextId = one.split('"id":')[1].split(',')[0];
  926. }
  927. })
  928. if (comicUrl && nextId && nextId != 'null') { // 组合到一起就是下一页 URL
  929. url = comicUrl + nextId + '.html'
  930. if (url === curSite.pageUrl) return
  931. curSite.pageUrl = url
  932. getPageElems_(curSite.pageUrl); // 访问下一页 URL 获取
  933. }
  934. }
  935. }
  936. // [古风漫画网] 插入数据
  937. function gufengmh_insertE(pageElems, type) {
  938. if (pageElems) {
  939. let url = curSite.pageUrl;
  940. pageElems = getOne(curSite.pager.pageE, pageElems, pageElems);
  941. let chapterImages, chapterPath;
  942. getOne(curSite.pager.pageE).innerText = pageElems.textContent; // 将当前网页内的数据所在元素内容改为刚刚获取的下一页数据内容,以便循环获取下一页 URL
  943. pageElems.textContent.split(';').forEach(function (one){ // 分号 ; 分割为数组并遍历
  944. //console.log(one)
  945. if (one.indexOf('chapterImages') > -1) { // 图片文件名数组
  946. chapterImages = one.replace(/^.+\[/, '').replace(']', '').replaceAll('"', '').split(',')
  947. } else if (one.indexOf('chapterPath') > -1) { // 图片文件路径
  948. chapterPath = one.split('"')[1];
  949. } else if (one.indexOf('pageTitle') > -1) { // 网页标题
  950. addHistory(pageElems, one.split('"')[1]);
  951. }
  952. })
  953. if (chapterImages && chapterPath) {
  954. let _img = '';
  955. chapterImages.forEach(function (one2){_img += '<img src="https://res.xiaoqinre.com/' + chapterPath + one2 + '" data-index="0" style="display: inline-block;">';})
  956. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中
  957. pageNum.now = pageNum._now + 1
  958. }
  959. }
  960. }
  961.  
  962.  
  963. // [Mangabz 漫画] 初始化(调整本话图片)
  964. function mangabz_init() {
  965. let showimage = getCSS('#showimage'),
  966. cp_img = getCSS('#cp_img'),
  967. cp_image = getCSS('#cp_image');
  968. if (showimage) {showimage.removeAttribute('oncontextmenu');}
  969. if (cp_img) {cp_img.removeAttribute('oncontextmenu');}
  970. if (cp_image) {
  971. cp_image.removeAttribute('oncontextmenu');
  972. cp_image.removeAttribute('id');
  973. cp_image.removeAttribute('style');
  974. }
  975. }
  976. // [Mangabz 漫画] 获取下一页地址
  977. function mangabz_nextL() {
  978. var url = '';
  979. if (MANGABZ_PAGE === MANGABZ_IMAGE_COUNT) { // 下一话
  980. if (getNextE('//a[./img[contains(@src, "icon_xiayizhang")]]')) getPageElems_(curSite.pageUrl); // 访问下一话 URL 获取
  981. } else { // 下一页
  982. if (!mkey) var mkey = '';
  983. 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}`
  984. if (url === curSite.pageUrl) return
  985. curSite.pageUrl = url
  986. //console.log(curSite.pageUrl)
  987. getPageElems_(curSite.pageUrl, 'text', 'GET', '', 'Next'); // 访问下一页 URL 获取
  988. }
  989. }
  990. // [Mangabz 漫画] 插入数据
  991. function mangabz_insertE(pageElems, type) {
  992. if (pageElems) {
  993. if (type === 'Next') { // 下一页
  994. let imgArr = eval(pageElems),
  995. _img = '';
  996. for (let now of imgArr) {_img += `<img src="${now}">`;}
  997. if (_img) {
  998. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中
  999. MANGABZ_PAGE += imgArr.length;
  1000. addHistory(pageElems, document.title, location.origin + MANGABZ_CURL.substring(0, MANGABZ_CURL.length - 1) + '-p' + MANGABZ_PAGE + '/');
  1001. }
  1002. } else { // 下一话
  1003. // 插入 <script> 标签
  1004. insScript('css;html:not([dir]) > head > script:not([src])', document.body, pageElems);
  1005. addHistory(pageElems);
  1006. pageNum.now = pageNum._now + 1
  1007. replaceElems(pageElems)
  1008. MANGABZ_PAGE = 0;
  1009. mangabz_nextL();
  1010. }
  1011. }
  1012. }
  1013.  
  1014.  
  1015. // [动漫屋] 获取下一页地址
  1016. function dm5_nextL() {
  1017. var url = '';
  1018. if (DM5_PAGE === DM5_IMAGE_COUNT) { // 下一话
  1019. if (getNextE('//div[@class="view-paging"]//a[text()="下一章"]')) getPageElems_(curSite.pageUrl); // 访问下一话 URL 获取
  1020. } else { // 下一页
  1021. if (!mkey) var mkey = '';
  1022. url = location.origin + location.pathname + 'chapterfun.ashx' + `?cid=${DM5_CID}&page=${DM5_PAGE + 1}&key=${(mkey)}&language=1&gtk=6&_cid=${DM5_CID}&_mid=${DM5_MID}&_dt=${DM5_VIEWSIGN_DT}&_sign=${DM5_VIEWSIGN}`
  1023. if (url === curSite.pageUrl) return
  1024. curSite.pageUrl = url
  1025. //console.log(curSite.pageUrl)
  1026. getPageElems_(curSite.pageUrl, 'text', 'GET', '', 'Next'); // 访问下一页 URL 获取
  1027. }
  1028. }
  1029. // [动漫屋] 插入数据
  1030. function dm5_insertE(pageElems, type) {
  1031. if (pageElems) {
  1032. if (type === 'Next') { // 下一页
  1033. let imgArr = eval(pageElems),
  1034. _img = '';
  1035. for (let now of imgArr) {_img += `<img src="${now}">`;}
  1036. if (_img) {
  1037. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中
  1038. DM5_PAGE += imgArr.length;
  1039. addHistory(pageElems, document.title, location.origin + DM5_CURL.substring(0, DM5_CURL.length - 1) + '-p' + DM5_PAGE + '/');
  1040. }
  1041. } else { // 下一话
  1042. // 插入 <script> 标签
  1043. insScript('css;html:not([dir]) > head > script:not([src])', document.body, pageElems);
  1044. addHistory(pageElems);
  1045. pageNum.now = pageNum._now + 1
  1046. replaceElems(pageElems)
  1047. DM5_PAGE = 0;
  1048. dm5_nextL();
  1049. }
  1050. }
  1051. }
  1052.  
  1053.  
  1054. // [Xmanhua 漫画] 获取下一页地址
  1055. function xmanhua_nextL() {
  1056. var url = '';
  1057. if (XMANHUA_PAGE === XMANHUA_IMAGE_COUNT) { // 下一话
  1058. if (getNextE('//a[./img[contains(@src, "reader-bottom-right-2.png")]]')) getPageElems_(curSite.pageUrl); // 访问下一话 URL 获取
  1059. } else { // 下一页
  1060. if (!mkey) var mkey = '';
  1061. 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}`
  1062. if (url === curSite.pageUrl) return
  1063. curSite.pageUrl = url
  1064. //console.log(curSite.pageUrl)
  1065. getPageElems_(curSite.pageUrl, 'text', 'GET', '', 'Next'); // 访问下一页 URL 获取
  1066. }
  1067. }
  1068. // [Xmanhua 漫画] 插入数据
  1069. function xmanhua_insertE(pageElems, type) {
  1070. if (pageElems) {
  1071. if (type === 'Next') { // 下一页
  1072. let imgArr = eval(pageElems),
  1073. _img = '';
  1074. for (let now of imgArr) {_img += `<img src="${now}">`;}
  1075. if (_img) {
  1076. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中
  1077. XMANHUA_PAGE += imgArr.length;
  1078. addHistory(pageElems, document.title, location.origin + XMANHUA_CURL.substring(0, XMANHUA_CURL.length - 1) + '-p' + XMANHUA_PAGE + '/');
  1079. }
  1080. } else { // 下一话
  1081. // 插入 <script> 标签
  1082. insScript('css;html:not([dir]) > head > script:not([src])', document.body, pageElems);
  1083. addHistory(pageElems);
  1084. pageNum.now = pageNum._now + 1
  1085. replaceElems(pageElems)
  1086. XMANHUA_PAGE = 0;
  1087. xmanhua_nextL();
  1088. }
  1089. }
  1090. }
  1091.  
  1092.  
  1093. // [COCOMANGA 漫画] 初始化(调整本话图片)
  1094. function cocomanga_init() {
  1095. let last = getCSS('.mh_comicpic:last-of-type');
  1096. if (last && last.getAttribute('p')) {
  1097. getOne(curSite.pager.insertP[0]).innerHTML = ''; // 删除旧图片元素
  1098. cocomanga_img(parseInt(last.getAttribute('p'))) // 插入新图片元素
  1099. }
  1100. }
  1101. // [COCOMANGA 漫画] 生成图片元素并插入网页
  1102. function cocomanga_img(totalImageCount) {
  1103. if (totalImageCount < 1) return
  1104. let _img = '';
  1105. for (let i=1; i<=totalImageCount; i++) {_img += `<div class="mh_comicpic" p="${i}"><img src="${__cr.getPicUrl(i)}"></div>`;}
  1106. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), _img); // 将 img 标签插入到网页中
  1107. }
  1108. // [COCOMANGA 漫画] 插入数据
  1109. function cocomanga_insertE(pageElems, type) {
  1110. if (pageElems) {
  1111. // 插入 <script> 标签
  1112. insScript('css;head > script:not([src]), script[src*="custom.js"], script[src*="dynamicjs.js"]', document.body, pageElems);
  1113.  
  1114. // 插入新图片元素
  1115. setTimeout(function() {
  1116. let totalImageCount = __cdecrypt('fw122587mkertyui', CryptoJS.enc.Base64.parse(mh_info.enc_code1).toString(CryptoJS.enc.Utf8));
  1117. if (!totalImageCount) totalImageCount = __cdecrypt('fw12558899ertyui', CryptoJS.enc.Base64.parse(mh_info.enc_code1).toString(CryptoJS.enc.Utf8));
  1118. cocomanga_img(parseInt(totalImageCount));
  1119. }, 100)
  1120. addHistory(pageElems);
  1121. pageNum.now = pageNum._now + 1
  1122. replaceElems(pageElems)
  1123. }
  1124. }
  1125.  
  1126.  
  1127. // [国家自然科学基金] 获取下一页地址
  1128. function nsfc_nextL() {
  1129. let id = decodeURIComponent(document.location.href.split('/')[document.location.href.split('/').length - 1]), data
  1130. if (!document.nowPageNum) document.nowPageNum = 2
  1131. data = `id=${id}&index=${document.nowPageNum}`
  1132. if (data === curSite.pageUrl) return
  1133. curSite.pageUrl = data
  1134. getPageElems_(location.origin + '/baseQuery/data/completeProjectReport', 'json', 'POST', data); // 访问下一页 URL 获取
  1135. }
  1136. // [国家自然科学基金] 插入数据
  1137. function nsfc_insertE(pageElems, type) {
  1138. if (!pageElems || pageElems.code != 200) {curSite.SiteTypeID = 0; return}
  1139. if (!pageElems.data.hasnext) {curSite.SiteTypeID = 0} else {document.nowPageNum++}
  1140. pageNum.now = pageNum._now + 1
  1141. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), `<img style="width: 100%;" data-magnify="gallery" data-src="${pageElems.data.url}" src="${pageElems.data.url}">`);
  1142. }
  1143.  
  1144.  
  1145.  
  1146. // [酷科研] 获取下一页地址
  1147. function coolkeyan_nextL() {
  1148. if (!getCSS('.q-img__image')) return
  1149. let id = getCSS('.q-breadcrumbs--last > span.q-breadcrumbs__el'), data
  1150. if (id && id.textContent) {id=parseInt(id.textContent)} else {return}
  1151. if (!document.nowPageNum) document.nowPageNum = 2
  1152. data = `ratify_no=${id}&index=${document.nowPageNum}`
  1153. if (data === curSite.pageUrl) return
  1154. curSite.pageUrl = data
  1155. getPageElems_(location.origin + '/api/funds/nsfc/creport?' + data, 'json', 'GET'); // 访问下一页 URL 获取
  1156. }
  1157. // [酷科研] 插入数据
  1158. function coolkeyan_insertE(pageElems, type) {
  1159. if (!pageElems || pageElems == {}) {curSite.SiteTypeID = 0; return}
  1160. if (!pageElems.url) {curSite.SiteTypeID = 0; return} else {document.nowPageNum++}
  1161. pageNum.now = pageNum._now + 1
  1162. getCSS('.q-img>div[style*="padding-bottom"]').style.paddingBottom = `${(document.nowPageNum * 1000) - 1000}px`
  1163. getOne(curSite.pager.insertP[0]).insertAdjacentHTML(getAddTo(curSite.pager.insertP[1]), `<div class="q-img__image absolute-full" style="background-size: contain; background-position: 50% 50%; background-image: url('${pageElems.url}'); top: ${(document.nowPageNum * 1000) - 2000}px"></div>`);
  1164. }
  1165.  
  1166.  
  1167. // --------------------------------------------------------
  1168.  
  1169.  
  1170. // 判断是支持
  1171. function doesItSupport() {
  1172. setDBSite(); // 配置 DBSite 变量对象
  1173.  
  1174. // 遍历判断是否是某个已支持的网站,顺便直接赋值
  1175. let support = false;
  1176. end:
  1177. for (let now in DBSite) { // 遍历 对象
  1178. if (!DBSite[now].host) continue; // 如果不存在则继续下一个循环
  1179. //console.log(DBSite[now].host)
  1180. // 如果是 数组
  1181. if (Array.isArray(DBSite[now].host)) {
  1182.  
  1183. for (let i of DBSite[now].host) { // 遍历 数组
  1184. // 针对自定义翻页规则中的正则
  1185. if (typeof i === 'string' && i.slice(0,1) === '/') i = new RegExp(i.slice(1,i.length-1))
  1186. if ((i instanceof RegExp && i.test(location.hostname)) || (typeof i === 'string' && i === location.hostname)) {
  1187.  
  1188. if (self != top) {if (!DBSite[now].iframe) break end;} // 如果当前位于 iframe 框架下,就需要判断是否需要继续执行
  1189. if (DBSite[now].functionS) {
  1190. if (typeof DBSite[now].functionS == 'function') {
  1191. DBSite[now].functionS();
  1192. } else { // 自定义翻页规则时,因为同域名不同页面 functionS 分开写,所以如果没找到就需要跳出当前数组循环,继续规则循环
  1193. if (new Function (DBSite[now].functionS)() === true) {curSite = DBSite[now];} else {break;}
  1194. }
  1195. } else {
  1196. curSite = DBSite[now];
  1197. }
  1198. support = true; break end; // 如果找到了就退出所有循环
  1199. }
  1200. }
  1201.  
  1202. // 如果是 正则/字符串
  1203. } else {
  1204. // 针对自定义翻页规则中的正则
  1205. if (typeof DBSite[now].host === 'string' && DBSite[now].host.slice(0,1) === '/') DBSite[now].host = new RegExp(DBSite[now].host.slice(1,DBSite[now].host.length-1))
  1206. if ((DBSite[now].host instanceof RegExp && DBSite[now].host.test(location.hostname)) || (typeof DBSite[now].host === 'string' && DBSite[now].host === location.hostname)) {
  1207.  
  1208. if (self != top) {if (!DBSite[now].iframe) break;} // 如果当前位于 iframe 框架下,就需要判断是否需要继续执行
  1209. if (DBSite[now].functionS) {
  1210. if (typeof DBSite[now].functionS == 'function') {
  1211. DBSite[now].functionS();
  1212. } else { // 自定义翻页规则时,因为同域名不同页面 functionS 分开写,所以如果没找到就需要继续规则循环
  1213. if (new Function (DBSite[now].functionS)() === true) {curSite = DBSite[now];} else {continue;}
  1214. }
  1215. } else {
  1216. curSite = DBSite[now];
  1217. }
  1218. support = true; break; // 如果找到了就退出循环
  1219. }
  1220. }
  1221. }
  1222.  
  1223. if (support) {
  1224. console.info('[自动无缝翻页] - 独立规则 网站'); return 1;
  1225. } else if (self != top) {
  1226. return -1;
  1227. } else if (typeof discuz_uid != 'undefined' || getCSS('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"]') || (getCSS('a[href*="www.discuz.net" i]') && getCSS('a[href*="www.discuz.net" i]').textContent.indexOf('Discuz!') > -1) || (getCSS('#ft') && getCSS('#ft').textContent.indexOf('Discuz!') > -1)) {
  1228. console.info('[自动无缝翻页] - <Discuz!> 论坛'); return 2;
  1229. } else if (getCSS('#flarum-loading')) {
  1230. console.info('[自动无缝翻页] - <Flarum> 论坛'); return 3;
  1231. } else if (getCSS('body#phpbb')) {
  1232. console.info('[自动无缝翻页] - <phpBB> 论坛'); return 4;
  1233. } else if (getXpath('//footer//a[contains(string(), "Xiuno")] | //link[contains(@href, "xiuno")] | //script[contains(@src, "xiuno")]')) {
  1234. console.info('[自动无缝翻页] - <Xiuno> 论坛'); return 5;
  1235. } else if (typeof XF != 'undefined') {
  1236. console.info('[自动无缝翻页] - <XenForo> 论坛'); return 6;
  1237. } else if (getCSS('head meta[name="generator" i][content="nexusphp" i]') || getXpath('id("footer")[contains(string(), "NexusPHP")]')) {
  1238. console.info('[自动无缝翻页] - <NexusPHP> 论坛'); return 7;
  1239. } else if (getCSS('link[href*="themes/dux" i], script[src*="themes/dux" i]')) {
  1240. console.info('[自动无缝翻页] - 使用 WordPress <DUX> 主题的网站'); return 100;
  1241. } else if (getCSS('link[href*="themes/xiu" i], script[src*="themes/xiu" i]')) {
  1242. console.info('[自动无缝翻页] - 使用 WordPress <XIU> 主题的网站'); return 101;
  1243. } else if (getCSS('link[href*="themes/d8" i], script[src*="themes/d8" i]')) {
  1244. console.info('[自动无缝翻页] - 使用 WordPress <D8> 主题的网站'); return 102;
  1245. } else if (getCSS('link[href*="themes/begin" i], script[src*="themes/begin" i], img[src*="themes/begin" i]')) {
  1246. console.info('[自动无缝翻页] - 使用 WordPress <Begin> 主题的网站'); return 103;
  1247. } else if (getCSS('link[href*="/wp-content/" i], script[src*="/wp-content/" i]')) {
  1248. if (getCSS('article.post') && getCSS('nav.navigation')) {
  1249. if (getCSS('.nav-previous a')) {
  1250. console.info('[自动无缝翻页] - 使用 WordPress <nav-previous 旧文章式> 主题的网站'); return 104;
  1251. } else if (getXpath('//nav[contains(@class, "navigation")]//a[contains(text(), "下一页") or contains(text(), ">")]')) {
  1252. console.info('[自动无缝翻页] - 使用 WordPress <nav-navigation> 下一页式> 主题的网站'); return 105;
  1253. }
  1254. }
  1255. } else if ((getCSS('meta[name="description" i][content*="小说"], meta[name="description" i][content*="章节"], meta[name="description" i][content*="阅读"]') || location.hostname.indexOf('biqu') > -1 || document.title.indexOf('笔趣阁') > -1) && getCSS('#content, .content, #chaptercontent, .chaptercontent, #BookText') && getXpath('//a[contains(text(), "下一章") or contains(text(), "下一页")]')) {
  1256. console.info('[自动无缝翻页] - <笔趣阁> 模板的小说网站'); return 200;
  1257. }
  1258. return 0;
  1259. }
  1260. // 判断网站类型
  1261. function webTypeIf() {
  1262. if (webType != 1) {
  1263. switch (webType) {
  1264. case 2: // < 所有 Discuz!论坛 >
  1265. discuz_(); break;
  1266. case 3: // < 所有 Flarum 论坛 >
  1267. DBSite.flarum.functionS(); break;
  1268. case 4: // < 所有 phpBB 论坛 >
  1269. DBSite.phpbb.functionS(); break;
  1270. case 5: // < 所有 Xiuno 论坛 >
  1271. DBSite.xiuno.functionS(); break;
  1272. case 6: // < 所有 XenForo 论坛 >
  1273. DBSite.xenforo.functionS(); break;
  1274. case 7: // < 所有 NexusPHP 论坛 >
  1275. DBSite.nexusphp.functionS(); break;
  1276. case 100: // < 所有使用 WordPress DUX 主题的网站 >
  1277. DBSite.dux.functionS(); if (location.hostname === 'apphot.cc') {curSite.pager.scrollD = 2500;}; break;
  1278. case 101: // < 所有使用 WordPress XIU 主题的网站 >
  1279. DBSite.dux.functionS(); curSite.function = {bF: src_bF, bFp: [0, 'img.thumb[data-original]', 'data-original']}; break;
  1280. case 102: // < 所有使用 WordPress D8 主题的网站 >
  1281. DBSite.dux.functionS(); delete curSite.function; break;
  1282. case 103: // < 所有使用 WordPress Begin 主题的网站 >
  1283. DBSite.begin.functionS(); break;
  1284. case 104: // < 所有使用 WordPress nav-previous 旧文章式 主题的网站 >
  1285. DBSite.wp_nav_navigation.functionS(); break;
  1286. case 105: // < 所有使用 WordPress nav-navigation 下一页式 主题的网站 >
  1287. DBSite.wp_nav_navigation.functionS('//nav[contains(@class, "navigation")]//a[contains(text(), "下一页") or contains(text(), ">")]'); break;
  1288. case 200: // < 所有使用 笔趣阁 模板的小说网站 >
  1289. DBSite.biquge.functionS(); break;
  1290. }
  1291. }
  1292. }
  1293. // 网站规则
  1294. function setDBSite() {
  1295. /*
  1296. functionS: 匹配该网站域名时要执行的函数(一般用于根据 URL 分配相应翻页规则)
  1297. locationC: 对于使用 pjax 技术的网站,需要监听 URL 变化来重新判断翻页规则(需要放在 functionS 中)
  1298.  
  1299. hiddenPN: 不显示脚本左下角的页码
  1300. history: 添加历史记录 并 修改当前 URL(默认开启,对于不支持的网站要设置为 false)
  1301. style: 要插入网页的 CSS Style 样式
  1302. retry: 允许获取失败后重试
  1303.  
  1304. pager: {
  1305. type: 翻页模式
  1306. 1 = 由脚本实现自动无缝翻页,可省略(适用于:静态加载内容网站,常规模式)
  1307.  
  1308. 2 = 只需要点击下一页按钮(适用于:网站自带了 自动无缝翻页 功能)
  1309. nextText: 按钮文本,当按钮文本 = 该文本时,才会点击按钮加载下一页(避免一瞬间加载太多次下一页,下同)
  1310. nextTextOf: 按钮文本的一部分,当按钮文本包含该文本时,才会点击按钮加载下一页
  1311. nextHTML: 按钮内元素,当按钮内元素 = 该元素内容时,才会点击按钮加载下一页
  1312. interval: 点击间隔时间,对于没有按钮文字变化的按钮,可以手动指定间隔时间(单位 ms,默认 300,当指定上面三个时,会忽略 interval)
  1313. isHidden: 只有下一页按钮可见时(没有被隐藏),才会点击
  1314.  
  1315. 3 = 依靠 [基准元素] 与 [浏览器可视区域底部] 之间的距离缩小来触发翻页(适用于:主体元素下方内容太多 且 高度不固定时)
  1316. scrollE: 作为基准线的元素(一般为底部页码元素)
  1317. scrollD: 基准元素 - 可视区域底部
  1318.  
  1319. 4 = 动态加载类网站(适用于:简单的动态加载内容网站)
  1320. insertE: 用来插入元素的函数
  1321.  
  1322. 5 = 插入 iframe 方式来加载下一页,无限套娃(适用于:部分动态加载内容的网站,需要允许 iframe 且支持通过 GET/POST 直接打开下一页)
  1323. style: 加载 iframe 前要插入的 CSS Style 样式(比如为了悬浮的样式与下一页的重叠,隐藏网页底部间距提高阅读连续性)
  1324. iframe: 这个必须加到 pager{} 外面(这样才会在该域名的 iframe 框架下运行脚本)
  1325. forceTarget: 强制新标签页打开链接(适用于一些使用 pjax 技术的链接)
  1326.  
  1327. 6 = 通过 iframe 获取下一页动态加载内容插入本页,只有一个娃(适用于:部分动态加载内容的网站,与上面不同的是,该模式适合简单的网页,没有复杂事件什么的)
  1328. loadTime: 预留的网页加载时间,确保网页内容加载完成
  1329. forceTarget: 强制新标签页打开链接
  1330.  
  1331. nextL: 下一页链接所在元素
  1332. pageE: 要从下一页获取的元素
  1333. insertP: 下一页元素插入本页的位置(数组第一个是基准元素,第二个是基准元素的前后具体位置)
  1334. 1 = 插入基准元素自身的前面
  1335. 2 = 插入基准元素内,第一个子元素前面
  1336. 3 = 插入基准元素内,最后一个子元素后面
  1337. 4 = 插入基准元素自身的后面
  1338. 5 = 插入 pageE 列表最后一个元素的后面(该 insertP 可以直接省略不写,等同于 ['pageE', 5] )
  1339. 6 = 插入该元素自身内部末尾(针对小说网站等文本类的),附带参数 insertP6Br: true, 用来中间插入换行
  1340. // 小技巧:当基准元素是下一页主体元素的父元素时(或者说要将下一页元素插入到本页同元素最后一个后面时)是可以省略不写 insertP
  1341. 例如:当 pageE: 'css;ul>li' 且 insertP: ['css;ul', 3] 时,实际等同于 ['css;ul>li', 5]
  1342. 当 pageE: 'css;.item' 且 insertP: ['css;.item', 4] 时,实际等同于 ['css;.item', 5]
  1343. 当 pageE: 'css;.item' 且 insertP: ['css;.page', 1] 时,实际等同于 ['css;.item', 5]
  1344. 注意:如 pageE 中选择了多类元素,则不能省略 insertP(比如包含 `,` 与 `|` 符号)
  1345.  
  1346. replaceE: 要替换为下一页内容的元素(比如页码)
  1347. scrollD: 翻页动作触发点([滚动条] 与 [网页底部] 之间的距离),数值越大,越早开始翻页,一般是访问网页速度越慢,该值就需要越大
  1348.  
  1349. scriptT: 单独插入 <script> 标签
  1350. 0 = 下一页的所有 <script> 标签
  1351. 1 = 下一页的所有 <script> 标签(不包括 src 链接)
  1352. 2 = 下一页主体元素 (pageE) 的同级 <script> 标签
  1353. 3 = 下一页主体元素 (pageE) 的子元素 <script> 标签
  1354.  
  1355. interval: 翻页后间隔时间(单位 ms)
  1356. forceHTTPS: 下一页链接强制 HTTPS
  1357. },
  1358. function: {
  1359. bF = 插入前执行函数
  1360. bFp = 参数
  1361. aF = 插入后执行函数
  1362. aFp = 参数
  1363. }
  1364. */ //<<< 规则简单说明 >>>
  1365. DBSite = {
  1366. discuz_forum: {
  1367. pager: {
  1368. type: 2,
  1369. nextL: 'css;#autopbn',
  1370. nextTextOf: '下一页',
  1371. scrollD: 1500
  1372. }
  1373. }, // Discuz! 论坛 - 帖子列表(自带无缝加载下一页按钮的)
  1374. discuz_guide: {
  1375. pager: {
  1376. nextL: 'css;a.nxt:not([href^="javascript"]) ,a.next:not([href^="javascript"])',
  1377. pageE: 'id("threadlist")//table[./tbody[contains(@id, "normalthread_")]]/tbody[not(@id="separatorline")]',
  1378. replaceE: 'css;.pg, .pages',
  1379. scrollD: 1500
  1380. }
  1381. }, // Discuz! 论坛 - 导读页 及 帖子列表(不带无缝加载下一页按钮的)
  1382. discuz_waterfall: {
  1383. pager: {
  1384. nextL: 'css;a.nxt:not([href^="javascript"]) ,a.next:not([href^="javascript"])',
  1385. pageE: 'css;#waterfall > li',
  1386. replaceE: 'css;.pg, .pages',
  1387. scrollD: 1500
  1388. }
  1389. }, // Discuz! 论坛 - 图片模式的帖子列表(不带无缝加载下一页按钮的)
  1390. discuz_thread: {
  1391. style: '.pgbtn {display: none;}',
  1392. pager: {
  1393. nextL: 'css;a.nxt:not([href^="javascript"]) ,a.next:not([href^="javascript"])',
  1394. pageE: 'css;#postlist > div[id^="post_"]',
  1395. replaceE: '//div[contains(@class,"pg") or contains(@class,"pages")][./a[contains(@class,"nxt") or contains(@class,"next") or contains(@class,"prev")][not(contains(@href,"javascript") or contains(@href,"commentmore"))]]',
  1396. scrollD: 1500
  1397. },
  1398. function: {
  1399. bF: src_bF,
  1400. bFp: [0, 'img[file]', 'file']
  1401. }
  1402. }, // Discuz! 论坛 - 帖子内
  1403. discuz_search: {
  1404. pager: {
  1405. nextL: 'css;a.nxt:not([href^="javascript"]) ,a.next:not([href^="javascript"])',
  1406. pageE: 'css;#threadlist > ul',
  1407. replaceE: 'css;.pg, .pages',
  1408. scrollD: 1500
  1409. }
  1410. }, // Discuz! 论坛 - 搜索页
  1411. discuz_youspace: {
  1412. pager: {
  1413. nextL: 'css;a.nxt:not([href^="javascript"]) ,a.next:not([href^="javascript"])',
  1414. pageE: 'css;form:not([action^="search.php?"]) tbody > tr:not(.th)',
  1415. replaceE: 'css;.pg, .pages',
  1416. scrollD: 1500
  1417. }
  1418. }, // Discuz! 论坛 - 回复页、主题页(别人的)
  1419. discuz_collection: {
  1420. pager: {
  1421. nextL: 'css;a.nxt:not([href^="javascript"]) ,a.next:not([href^="javascript"])',
  1422. pageE: 'css;#ct .bm_c table > tbody',
  1423. replaceE: 'css;.pg, .pages',
  1424. scrollD: 1500
  1425. }
  1426. }, // Discuz! 论坛 - 淘帖页
  1427. discuz_m: {
  1428. pager: {
  1429. nextL: '//a[@class="nxt" or @class="next"] | //div[@class="page"]/a[text()="下一页" or contains(text(), ">")]',
  1430. replaceE: 'css;.pg, .page',
  1431. scrollD: 1000
  1432. }
  1433. }, // Discuz! 论坛 - 触屏手机版
  1434. discuz_m_forum: {
  1435. pager: {
  1436. type: 2,
  1437. nextL: 'css;a.loadmore',
  1438. interval: 500,
  1439. scrollD: 1000
  1440. }
  1441. }, // Discuz! 论坛 - 触屏手机版 - 帖子列表(自带无缝加载下一页按钮的)
  1442. flarum: {
  1443. functionS: ()=> {locationC = true;if (!indexOF('/d/')) {curSite = DBSite.flarum;}},
  1444. pager: {
  1445. type: 2,
  1446. nextL: 'css;.DiscussionList-loadMore > button',
  1447. isHidden: true,
  1448. scrollD: 1500
  1449. }
  1450. }, // Flarum 论坛
  1451. phpbb: {
  1452. functionS: ()=> {if (indexOF('/viewforum.php')) {
  1453. curSite = DBSite.phpbb;
  1454. } else if (indexOF('/viewtopic.php') && GM_getValue('menu_thread')) {
  1455. curSite = DBSite.phpbb_post;
  1456. } else if (indexOF('/search.php')) {
  1457. curSite = DBSite.phpbb_search;
  1458. }},
  1459. pager: {
  1460. nextL: 'css;.pagination li.next a[rel="next"], .topic-actions .pagination strong~a',
  1461. pageE: 'css;.forumbg:not(.announcement) ul.topiclist.topics > li',
  1462. replaceE: 'css;.action-bar .pagination, .topic-actions .pagination',
  1463. scrollD: 2000
  1464. }
  1465. }, // phpBB 论坛 - 帖子列表
  1466. phpbb_post: {
  1467. pager: {
  1468. nextL: 'css;.pagination li.next a[rel="next"], .topic-actions .pagination strong~a',
  1469. pageE: 'css;div.post[id], div.post[id]+hr',
  1470. replaceE: 'css;.action-bar .pagination, .topic-actions .pagination',
  1471. scrollD: 2000
  1472. }
  1473. }, // phpBB 论坛 - 帖子内
  1474. phpbb_search: {
  1475. pager: {
  1476. nextL: 'css;.pagination li.next a[rel="next"], .topic-actions .pagination strong~a',
  1477. pageE: 'css;div.search.post',
  1478. replaceE: 'css;.action-bar .pagination, .pagination',
  1479. scrollD: 2000
  1480. }
  1481. }, // phpBB 论坛 - 搜索页
  1482. xenforo: {
  1483. functionS: ()=> {if (indexOF(/\/(forums|f)\//)) {
  1484. curSite = DBSite.xenforo;
  1485. } else if (indexOF(/\/(threads|t)\//) && GM_getValue('menu_thread')) {
  1486. curSite = DBSite.xenforo_post;
  1487. } else if (indexOF('/search/')) {
  1488. curSite = DBSite.xenforo_search;
  1489. }},
  1490. pager: {
  1491. nextL: 'css;a.pageNav-jump--next',
  1492. pageE: 'css;.structItemContainer-group.js-threadList > div',
  1493. replaceE: 'css;nav.pageNavWrapper',
  1494. scrollD: 2500
  1495. }
  1496. }, // XenForo 论坛 - 帖子列表
  1497. xenforo_post: {
  1498. pager: {
  1499. nextL: 'css;a.pageNav-jump--next',
  1500. pageE: 'css;.block-body.js-replyNewMessageContainer > article',
  1501. replaceE: 'css;nav.pageNavWrapper',
  1502. scrollD: 2500
  1503. }
  1504. }, // XenForo 论坛 - 帖子内
  1505. xenforo_search: {
  1506. pager: {
  1507. nextL: 'css;a.pageNav-jump--next',
  1508. pageE: 'css;ol.block-body > li',
  1509. replaceE: 'css;nav.pageNavWrapper',
  1510. scrollD: 2500
  1511. }
  1512. }, // XenForo 论坛 - 搜索页
  1513. xiuno: {
  1514. functionS: ()=> {if (lp == '/' || indexOF(/\/(index|forum)/)) {curSite = DBSite.xiuno;} else if (indexOF('/thread') && GM_getValue('menu_thread')) {curSite = DBSite.xiuno_post;}},
  1515. pager: {
  1516. nextL: '//li[@class="page-item"]/a[text()="▶"]',
  1517. pageE: 'css;ul.threadlist > li',
  1518. replaceE: 'css;ul.pagination',
  1519. scrollD: 1500
  1520. }
  1521. }, // Xiuno 论坛 - 帖子列表
  1522. xiuno_post: {
  1523. pager: {
  1524. nextL: '//li[@class="page-item"]/a[text()="▶"]',
  1525. pageE: 'css;li.post[data-pid]:not(.newpost)',
  1526. replaceE: 'css;ul.pagination',
  1527. scrollD: 1500
  1528. }
  1529. }, // Xiuno 论坛 - 帖子内
  1530. nexusphp: {
  1531. functionS: ()=> {
  1532. if (lp == '/torrents.php' || getCSS('table.torrents')) {
  1533. curSite = DBSite.nexusphp;
  1534. } else if (lp == '/subtitles.php') {
  1535. curSite = DBSite.nexusphp;
  1536. curSite.pager.pageE = 'css;#outer > table.main~table > tbody > tr:not(:first-of-type)'
  1537. } else if (lp == '/forums.php' && indexOF('action=viewforum', 's')) {
  1538. curSite = DBSite.nexusphp;
  1539. curSite.pager.pageE = 'css;#outer > table.main+table > tbody > tr:not(:first-of-type):not(:last-of-type)'
  1540. } else if (lp == '/forums.php' && indexOF('action=viewtopic', 's') && GM_getValue('menu_thread')) {
  1541. curSite = DBSite.nexusphp;
  1542. curSite.pager.pageE = 'css;td.text > div, td.text > div+table.main'
  1543. }},
  1544. pager: {
  1545. nextL: '//a[./b[contains(text(), "下一页") or contains(text(), ">>")]]',
  1546. pageE: 'css;table.torrents > tbody > tr:not(:first-of-type)',
  1547. replaceE: '//p[@align][./font[@class="gray"]]',
  1548. scrollD: 1500
  1549. }
  1550. }, // NexusPHP 论坛
  1551. dux: {
  1552. host: 'www.puresys.net',
  1553. functionS: ()=> {if (!indexOF('.html')) curSite = DBSite.dux;},
  1554. pager: {
  1555. nextL: 'css;li.next-page > a',
  1556. pageE: 'css;.content > article',
  1557. replaceE: 'css;.content > .pagination',
  1558. scrollD: 1500
  1559. },
  1560. function: {
  1561. bF: src_bF,
  1562. bFp: [0, 'img.thumb[data-src]', 'data-src']
  1563. }
  1564. }, // WordPress 的 DUX、XIU、D8 主题
  1565. begin: {
  1566. functionS: ()=> {if (location.search.slice(0,3) === '?s=') {curSite = DBSite.begin_search;} else if (!indexOF('.html')) {curSite = DBSite.begin;}},
  1567. pager: {
  1568. type: 2,
  1569. nextL: 'css;div[id^="ias_trigger_"]',
  1570. interval: 500,
  1571. scrollD: 1500
  1572. }
  1573. }, // WordPress 的 Begin 主题
  1574. begin_search: {
  1575. pager: {
  1576. nextL: 'css;a.next',
  1577. pageE: 'css;#main > ul > li',
  1578. replaceE: 'css;nav.pagination',
  1579. scrollD: 1500
  1580. }
  1581. }, // WordPress 的 Begin 主题 - 搜索页
  1582. wp_nav_navigation: {
  1583. functionS: function(nextL = 'css;.nav-previous a') {if (!indexOF('/post/') && !getCSS('#comments, .comments-area, #disqus_thread')) {curSite = DBSite.wp_nav_navigation; curSite.pager.nextL = nextL;}},
  1584. pager: {
  1585. nextL: 'css;.nav-previous a',
  1586. pageE: 'css;article.post',
  1587. replaceE: 'css;nav.navigation',
  1588. scrollD: 1500
  1589. }
  1590. }, // Wordpress 的 nav.navigation 规则
  1591. biquge: {
  1592. functionS: ()=> {if (indexOF(/\d+\/\d+\.html/)) {curSite = DBSite.biquge;}},
  1593. style: 'img, .posterror {display: none !important;}',
  1594. pager: {
  1595. nextL: '//a[contains(text(), "下一章") or contains(text(), "下一页")]',
  1596. pageE: 'css;#content, .content, #chaptercontent, .chaptercontent, #BookText',
  1597. insertP: ['css;#content, .content, #chaptercontent, .chaptercontent, #BookText', 6],
  1598. insertP6Br: true,
  1599. replaceE: '//*[./a[contains(text(), "下一章") or contains(text(), "下一页")]]',
  1600. scrollD: 1500
  1601. }
  1602. }, // 笔趣阁 模板的小说网站
  1603. baidu: {
  1604. host: 'www.baidu.com',
  1605. functionS: ()=> {locationC = true; if (lp == '/s') {curSite = DBSite.baidu;} else if (location.pathname.slice(location.pathname.length - 2,location.pathname.length) == '/s' || isMobile()) {location.hostname = 'm.baidu.com';}},
  1606. style: '.new-pmd .c-img-border {position: initial !important;} .op-bk-polysemy-video__wrap.c-gap-bottom {display: none !important;}',
  1607. pager: {
  1608. nextL: 'id("page")//a[contains(text(),"下一页")]',
  1609. pageE: 'css;#content_left > *',
  1610. replaceE: 'css;#page',
  1611. scrollD: 2000
  1612. }
  1613. }, // 百度 搜索
  1614. baidu_m: {
  1615. host: 'm.baidu.com',
  1616. functionS: ()=> {if (location.pathname.slice(location.pathname.length - 2,location.pathname.length) == '/s') curSite = DBSite.baidu_m;},
  1617. style: 'div.result[tpl="recommend_list"], #page-copyright {display: none !important;}',
  1618. pager: {
  1619. nextL: 'css;a[class^="new-nextpage"]',
  1620. pageE: 'css;#results > *',
  1621. replaceE: 'css;#page-controller',
  1622. scrollD: 2000
  1623. }
  1624. }, // 百度 搜索 - 手机版
  1625. google: {
  1626. host: /^www\.google\./,
  1627. functionS: ()=> {if (lp == '/search' && !indexOF('tbm=isch', 's')) {
  1628. if (indexOF('sclient=mobile', 's') || isMobile()) {
  1629. curSite = DBSite.google_m;
  1630. } else {
  1631. curSite = DBSite.google;
  1632. }
  1633. } else if (lp == '/scholar') {
  1634. curSite = DBSite.google_scholar;
  1635. }},
  1636. pager: {
  1637. nextL: 'css;#pnnext',
  1638. pageE: 'id("search")/* | //style[not(contains(text(), "table,div,span,p{display:none}"))]',
  1639. insertP: ['css;#search', 3],
  1640. replaceE: 'id("navcnt") | id("rcnt")//div[@role="navigation"]',
  1641. scriptT: 0,
  1642. scrollD: 3000
  1643. },
  1644. function: {
  1645. bF: google_bF
  1646. }
  1647. }, // 谷歌 搜索
  1648. google_m: {
  1649. pager: {
  1650. type: 2,
  1651. nextL: 'css;a[aria-label="查看更多"], a[aria-label="See more" i]',
  1652. isHidden: true,
  1653. scrollD: 1000
  1654. }
  1655. }, // 谷歌 搜索 - 手机版
  1656. bing: {
  1657. host: ['www.bing.com','cn.bing.com'],
  1658. functionS: ()=> {if (lp == '/search') {
  1659. curSite = DBSite.bing;
  1660. curSite.function = {bF: bing_bF}
  1661. } else if (lp == '/academic/search') {
  1662. curSite = DBSite.bing_academic;
  1663. }},
  1664. style: '.b_imagePair.square_mp > .inner {display: none !important;}',
  1665. pager: {
  1666. nextL: 'css;a.sb_pagN, a.sb_halfnext, a.sb_fullnpl',
  1667. pageE: 'css;#b_results > li:not(.b_msg):not([class="b_ans"]):not(.b_pag):not(#mfa_root)',
  1668. replaceE: 'css;#b_results > .b_pag',
  1669. scrollD: 2000
  1670. }
  1671. }, // 必应 搜索 + 手机版
  1672. sogou: {
  1673. host: 'www.sogou.com',
  1674. functionS: ()=> {if (lp != '/') {curSite = DBSite.sogou;}},
  1675. pager: {
  1676. nextL: 'css;#sogou_next',
  1677. pageE: 'css;.results > *',
  1678. replaceE: 'css;#pagebar_container',
  1679. scriptT: 3,
  1680. scrollD: 2000
  1681. }
  1682. }, // 搜狗 搜索
  1683. sogou_m: {
  1684. host: ['m.sogou.com', 'wap.sogou.com'],
  1685. functionS: ()=> {if (lp != '/') {curSite = DBSite.sogou_m;}},
  1686. pager: {
  1687. type: 2,
  1688. nextL: 'css;#ajax_next_page',
  1689. isHidden: true,
  1690. scrollD: 1000
  1691. }
  1692. }, // 搜狗 搜索 - 手机版
  1693. sogou_weixin: {
  1694. host: 'weixin.sogou.com',
  1695. functionS: ()=> {if (lp == '/') {
  1696. curSite = DBSite.sogou_weixin;
  1697. } else if (lp == '/weixin') {
  1698. curSite = DBSite.sogou_weixin_search;
  1699. }},
  1700. pager: {
  1701. type: 2,
  1702. nextL: 'css;#look-more',
  1703. interval: 1000,
  1704. scrollD: 1000
  1705. }
  1706. }, // 搜狗微信 - 首页
  1707. sogou_weixin_search: {
  1708. pager: {
  1709. nextL: 'css;#sogou_next',
  1710. pageE: 'css;ul[class*="news-list"] > li',
  1711. replaceE: 'css;#pagebar_container',
  1712. scrollD: 1200
  1713. }
  1714. }, // 搜狗微信 - 搜索
  1715. toutiao: {
  1716. host: ['www.toutiao.com', 'so.toutiao.com'],
  1717. functionS: ()=> {if (location.hostname != 'www.toutiao.com') {
  1718. if (lp == '/search/' || isMobile()) {
  1719. curSite = DBSite.toutiao_m;
  1720. } else if (lp == '/search') {
  1721. curSite = DBSite.toutiao;
  1722. }
  1723. }},
  1724. pager: {
  1725. nextL: '//div[contains(@class, "-pagination")]/a[string()="下一页"]',
  1726. pageE: 'css;div[class*="-result-list"] > .result-content[data-i]',
  1727. replaceE: 'css;div[class*="-pagination"]',
  1728. scrollD: 2000
  1729. },
  1730. function: {
  1731. bF: pageElems => { // 插入前函数(过滤相关搜索)
  1732. if (getXpath('//div[contains(@class,"-header") and string()="相关搜索"]', pageElems[pageElems.length - 1])) pageElems[pageElems.length - 1].style.display = 'none';
  1733. return pageElems
  1734. }
  1735. }
  1736. }, // 头条 搜索
  1737. toutiao_m: {
  1738. pager: {
  1739. nextL: 'css;#page-bottom a[class*="containerRight_"], #page-bottom a[class*="container_"]',
  1740. pageE: 'css;#results > div',
  1741. replaceE: 'css;#page-bottom',
  1742. scrollD: 2000
  1743. }
  1744. }, // 头条 搜索 - 手机版
  1745. so: {
  1746. host: 'www.so.com',
  1747. functionS: ()=> {if (lp != '/') {curSite = DBSite.so; insStyle('img {opacity: 1 !important;}')}},
  1748. pager: {
  1749. nextL: 'css;a#snext',
  1750. pageE: 'css;ul.result > li, style:not(src)',
  1751. insertP: ['css;ul.result', 3],
  1752. replaceE: 'css;#page',
  1753. scrollD: 2000
  1754. },
  1755. function: {
  1756. bF: src_bF,
  1757. bFp: [0, 'img[data-isrc]', 'data-isrc']
  1758. }
  1759. }, // 360 搜索
  1760. so_m: {
  1761. host: 'm.so.com',
  1762. functionS: ()=> {if (lp != '/') {curSite = DBSite.so_m;}},
  1763. pager: {
  1764. type: 2,
  1765. nextL: 'css;#load-more',
  1766. isHidden: true,
  1767. scrollD: 1000
  1768. }
  1769. }, // 360 搜索 - 手机版
  1770. duckduckgo: {
  1771. host: 'duckduckgo.com',
  1772. functionS: ()=> {
  1773. if (getCookie('av') != '1') {
  1774. document.cookie='av=1; expires=Thu, 18 Dec 2031 12:00:00 GMT; path=/'; // 写入 Cookie 强制开启自带的无缝翻页功能
  1775. location.reload(); // 刷新网页
  1776. }
  1777. },
  1778. history: false
  1779. }, // DuckDuckGo 搜索
  1780. startpage: {
  1781. host: ['startpage.com', 'www.startpage.com'],
  1782. functionS: ()=> {if (indexOF('/search')) {curSite = DBSite.startpage;}},
  1783. pager: {
  1784. nextL: ()=> getNextF('//div[contains(@class, "pagination ")]/form[./button[@class="pagination__next-prev-button next"]]'),
  1785. pageE: 'css;section.w-gl--desktop > div',
  1786. replaceE: 'css;.pagination',
  1787. scrollD: 2000
  1788. }
  1789. }, // Startpage 搜索
  1790. yandex: {
  1791. host: ['yandex.com', 'yandex.ru', 'yandex.ua', 'yandex.by', 'yandex.kz', 'yandex.uz', 'yandex.com.tr'],
  1792. functionS: ()=> {if (lp == '/search/') {curSite = DBSite.yandex;} else if (lp == '/video/search') {curSite = DBSite.yandex_video;}},
  1793. pager: {
  1794. nextL: 'css;a.pager__item_kind_next',
  1795. pageE: 'css;#search-result > *, style',
  1796. insertP: ['css;#search-result', 3],
  1797. replaceE: 'css;.pager',
  1798. scrollD: 1500
  1799. }
  1800. }, // Yandex 搜索
  1801. yandex_video: {
  1802. hiddenPN: true,
  1803. pager: {
  1804. type: 2,
  1805. nextL: 'css;button.more__button',
  1806. interval: 1000,
  1807. scrollD: 1000
  1808. }
  1809. }, // Yandex 搜索 - 视频
  1810. yahoo: {
  1811. host: 'search.yahoo.com',
  1812. functionS: ()=> {if (indexOF('/search')) {curSite = DBSite.yahoo;}},
  1813. pager: {
  1814. nextL: 'css;.pagination a.next',
  1815. pageE: 'css;#web ol > li',
  1816. replaceE: 'css;.pagination',
  1817. scrollD: 2000
  1818. }
  1819. }, // Yahoo 搜索
  1820. yahoo_jp: {
  1821. host: 'search.yahoo.co.jp',
  1822. functionS: ()=> {if (indexOF('/search')) {curSite = DBSite.yahoo_jp;}},
  1823. pager: {
  1824. nextL: 'css;.Pagenation__next > a',
  1825. pageE: 'css;.Contents__innerGroupBody > div',
  1826. replaceE: 'css;.Pagenation',
  1827. scrollD: 2000
  1828. }
  1829. }, // Yahoo 搜索 (JP)
  1830. qwant: {
  1831. host: 'www.qwant.com',
  1832. functionS: ()=> {locationC = true; if (indexOF('q=', 's') && indexOF('t=web', 's')) {curSite = DBSite.qwant;}},
  1833. pager: {
  1834. type: 2,
  1835. nextL: 'css;button[data-testid="buttonShowMore"]',
  1836. interval: 500,
  1837. scrollD: 2000
  1838. }
  1839. }, // Qwant 搜索
  1840. ecosia: {
  1841. host: 'www.ecosia.org',
  1842. functionS: ()=> {if (lp == '/search') {curSite = DBSite.ecosia;}},
  1843. pager: {
  1844. nextL: 'css;nav.pagination a[aria-label="Next page"]',
  1845. pageE: 'css;section.mainline > div:not(.related-queries)',
  1846. replaceE: 'css;nav.pagination',
  1847. scrollD: 1500
  1848. }
  1849. }, // Ecosia 搜索
  1850. magi: {
  1851. host: 'magi.com',
  1852. functionS: ()=> {if (lp == '/search') {curSite = DBSite.magi;}},
  1853. pager: {
  1854. type: 2,
  1855. nextL: 'css;.card[data-type="next"]',
  1856. nextText: '加载更多',
  1857. scrollD: 1500
  1858. }
  1859. }, // Magi 搜索
  1860. ask: {
  1861. host: ['ask.com', 'www.ask.com'],
  1862. functionS: ()=> {if (lp == '/web') {curSite = DBSite.ask;}},
  1863. style: '.PartialSearchResults-heading {display: none !important;}',
  1864. pager: {
  1865. nextL: 'css;li.PartialWebPagination-next > a',
  1866. pageE: 'css;.PartialSearchResults.mid',
  1867. replaceE: 'css;.PartialWebPagination',
  1868. scrollD: 2000
  1869. }
  1870. }, // ASK 搜索
  1871. fsou: {
  1872. host: 'fsou.cc',
  1873. functionS: ()=> {
  1874. if (lp == '/search') {
  1875. if (window.screen.width < 780) {
  1876. curSite = DBSite.fsou_m;
  1877. } else {
  1878. curSite = DBSite.fsou;
  1879. }
  1880. }
  1881. },
  1882. retry: 1000,
  1883. pager: {
  1884. type: 6,
  1885. nextL: ()=> getNextEP('css;.turn-page-num-wrap.selected', 'pageIndex=', /pageIndex=\d+/),
  1886. pageE: 'css;.organic-results > div',
  1887. replaceE: 'css;.bottom-pagination',
  1888. loadTime: 1000,
  1889. scrollD: 3000
  1890. }
  1891. }, // F 搜
  1892. fsou_m: {
  1893. pager: {
  1894. type: 2,
  1895. nextL: 'css;.next-page-container',
  1896. scrollD: 1500
  1897. }
  1898. }, // F 搜 - 手机版
  1899. baidu_tieba: {
  1900. host: ['tieba.baidu.com', 'jump2.bdimg.com'],
  1901. functionS: ()=> {if (location.hostname == 'jump2.bdimg.com') location.hostname = 'tieba.baidu.com';
  1902. if (lp == '/f') {
  1903. baidu_tieba_1(); // 右侧悬浮发帖按钮点击事件(解决自动翻页导致无法发帖的问题)
  1904. curSite = DBSite.baidu_tieba;
  1905. } else if (indexOF('/p/') && GM_getValue('menu_thread')) {
  1906. curSite = DBSite.baidu_tieba_post;
  1907. } else if (lp == '/f/search/res') {
  1908. curSite = DBSite.baidu_tieba_search;
  1909. }},
  1910. style: 'img.j_retract {margin-top: 0 !important;margin-bottom: 0 !important;}', // 修复帖子列表中预览图片,在切换下一个/上一个图片时,多出来的图片上下边距
  1911. history: false,
  1912. iframe: true,
  1913. pager: {
  1914. type: 4,
  1915. nextL: ()=> {if (getNextE('css;a.next.pagination-item')) getPageElems_(curSite.pageUrl + '&pagelets=frs-list%2Fpagelet%2Fthread&pagelets_stamp=' + new Date().getTime());},
  1916. pageE: 'css;#thread_list > li',
  1917. insertP: ['css;#thread_list', 3],
  1918. insertE: baidu_tieba_insertE,
  1919. replaceE: 'css;#frs_list_pager',
  1920. interval: 2000,
  1921. scrollD: 2500
  1922. },
  1923. function: {
  1924. bF: src_bF,
  1925. bFp: [0, 'img[data-original]', 'data-original']
  1926. }
  1927. }, // 百度贴吧 - 帖子列表
  1928. baidu_tieba_post: {
  1929. forceTarget: true,
  1930. style: '.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, .topic_list_box.topic-fixed {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 元素
  1931. pager: {
  1932. type: 5,
  1933. nextL: '//li[contains(@class,"pb_list_pager")]/a[text()="下一页"]',
  1934. style: 'ul.tbui_aside_float_bar, .core_title_wrap_bright.tbui_follow_fixed.core_title_absolute_bright {display: none !important;}',
  1935. scrollD: 1500
  1936. }
  1937. }, // 百度贴吧 - 帖子内
  1938. baidu_tieba_search: {
  1939. pager: {
  1940. nextL: 'css;a.next',
  1941. pageE: 'css;.s_post_list > div',
  1942. replaceE: 'css;.pager',
  1943. scrollD: 1000
  1944. }
  1945. }, // 百度贴吧 - 搜索页
  1946. douban_subject_comments: {
  1947. host: 'movie.douban.com',
  1948. functionS: ()=> {if (indexOF('/subject/') && indexOF('/comments')) {
  1949. curSite = DBSite.douban_subject_comments;
  1950. } else if (indexOF('/subject/') && indexOF('/reviews')) {
  1951. curSite = DBSite.douban_subject_reviews;
  1952. } else if(indexOF('/subject/') && indexOF('/episode') || indexOF('/subject/') && indexOF('/tv_discuss')) {
  1953. curSite = DBSite.douban_subject_episode;
  1954. } else if(indexOF('/people/') && indexOF('/collect')) {
  1955. curSite = DBSite.douban_people_collect;
  1956. } else if(indexOF('/celebrity/') && indexOF('/movies')) {
  1957. curSite = DBSite.douban_celebrity_movies;
  1958. }},
  1959. pager: {
  1960. nextL: 'css;a.next',
  1961. pageE: 'css;#comments > .comment-item',
  1962. replaceE: 'css;#paginator',
  1963. scrollD: 1500
  1964. }
  1965. }, // 豆瓣 - 短评
  1966. douban_subject_reviews: {
  1967. pager: {
  1968. nextL: 'css;link[rel="next"]',
  1969. pageE: 'css;.review-list > div',
  1970. replaceE: 'css;.paginator',
  1971. scrollD: 1500
  1972. }
  1973. }, // 豆瓣 - 影评
  1974. douban_subject_episode: {
  1975. pager: {
  1976. nextL: 'css;link[rel="next"]',
  1977. pageE: 'css;#comments > div',
  1978. replaceE: 'css;.paginator',
  1979. scrollD: 1500
  1980. }
  1981. }, // 豆瓣 - 剧评
  1982. douban_people_collect: {
  1983. pager: {
  1984. nextL: 'css;link[rel="next"]',
  1985. pageE: 'css;.grid-view > div',
  1986. replaceE: 'css;.paginator',
  1987. scrollD: 1500
  1988. }
  1989. }, // 豆瓣 - 看过的电影
  1990. douban_celebrity_movies: {
  1991. pager: {
  1992. nextL: 'css;link[rel="next"]',
  1993. pageE: 'css;.grid_view > ul > li',
  1994. replaceE: 'css;.paginator',
  1995. scrollD: 1500
  1996. }
  1997. }, // 豆瓣 - 作品
  1998. douban_group: {
  1999. host: 'www.douban.com',
  2000. functionS: ()=> {if (indexOF('/group/topic/') && GM_getValue('menu_thread')) {
  2001. curSite = DBSite.douban_group_topic;
  2002. } else if (indexOF('/group/explore')) {
  2003. curSite = DBSite.douban_group_explore;
  2004. } else if (indexOF('/group/') && indexOF('/discussion')) {
  2005. curSite = DBSite.douban_group;
  2006. }},
  2007. pager: {
  2008. nextL: 'css;span.next > a',
  2009. pageE: 'css;table.olt > tbody > tr:not(.th)',
  2010. replaceE: 'css;.paginator',
  2011. scrollD: 1500
  2012. }
  2013. }, // 豆瓣 - 小组
  2014. douban_group_explore: {
  2015. pager: {
  2016. nextL: 'css;span.next > a',
  2017. pageE: 'css;#content .article > div > .channel-item',
  2018. replaceE: 'css;.paginator',
  2019. scrollD: 1500
  2020. }
  2021. }, // 豆瓣 - 小组讨论精选
  2022. douban_group_topic: {
  2023. pager: {
  2024. nextL: 'css;span.next > a',
  2025. pageE: 'css;#comments > li',
  2026. replaceE: 'css;.paginator',
  2027. scrollD: 1500
  2028. }
  2029. }, // 豆瓣 - 小组帖子内
  2030. zhihu: {
  2031. host: 'www.zhihu.com',
  2032. functionS: ()=> {locationC = true; if (indexOF(/\/people\/.+\/.+/) || indexOF('/collection/')) {curSite = DBSite.zhihu; if (self != top) insStyle('#ProfileHeader {display: none !important;}')}},
  2033. forceTarget: true,
  2034. iframe: true,
  2035. pager: {
  2036. type: 5,
  2037. nextL: ()=> {
  2038. let next = getCSS('.Pagination .PaginationButton--current+button:not(.PaginationButton-next)');
  2039. if (next) return (location.origin + location.pathname + '?page=' + next.textContent)
  2040. },
  2041. scrollD: 2000
  2042. }
  2043. }, // 知乎 - 用户主页、收藏夹
  2044. weibo_comment: {
  2045. host: 'weibo.com',
  2046. pager: {
  2047. type: 2,
  2048. nextL: 'css;a[action-type="click_more_comment"]',
  2049. nextText: '查看更多c',
  2050. scrollD: 1000
  2051. }
  2052. }, // 微博评论
  2053. tianya: {
  2054. host: 'bbs.tianya.cn',
  2055. functionS: ()=> {if (indexOF('/list')) {
  2056. curSite = DBSite.tianya;
  2057. } else if (indexOF('/post') && GM_getValue('menu_thread')) {
  2058. curSite = DBSite.tianya_post;
  2059. }},
  2060. pager: {
  2061. nextL: '//div[contains(@class, "pages")]/div[@class="links"]/a[text()="下一页"]',
  2062. pageE: 'css;.tab-bbs-list > tbody:not(:first-of-type)',
  2063. replaceE: '//div[contains(@class, "pages")]',
  2064. scrollD: 1500
  2065. }
  2066. }, // 天涯社区
  2067. tianya_post: {
  2068. pager: {
  2069. nextL: 'css;a.js-keyboard-next',
  2070. pageE: 'css;.atl-main > div[class="atl-item"]',
  2071. replaceE: 'css;.atl-pages > form',
  2072. scrollD: 2000
  2073. }
  2074. }, // 天涯社区 - 帖子内
  2075. hupu: {
  2076. host: 'bbs.hupu.com',
  2077. functionS: ()=> {if (indexOF('.html')) {
  2078. if (GM_getValue('menu_thread')) curSite = DBSite.hupu_post;
  2079. } else if (lp != '/' && !indexOF('/all-')) {
  2080. curSite = DBSite.hupu;
  2081. }},
  2082. pager: {
  2083. nextL: ()=> {let next = getCSS('li.hupu-rc-pagination-item-active+li.hupu-rc-pagination-item > a');if (next) {return (location.origin + location.pathname.replace(/-\d+/,'') + '-' + next.textContent)} else {return ''}},
  2084. pageE: 'css;li.bbs-sl-web-post-body',
  2085. replaceE: 'css;ul.hupu-rc-pagination',
  2086. scrollD: 1500
  2087. }
  2088. }, // 虎扑社区
  2089. hupu_post: {
  2090. pager: {
  2091. nextL: 'css;li.hupu-rc-pagination-next > a',
  2092. pageE: 'css;.post-reply-list ',
  2093. replaceE: 'css;ul.hupu-rc-pagination',
  2094. scrollD: 2000
  2095. }
  2096. }, // 虎扑社区 - 帖子内
  2097. nga_thread: {
  2098. host: ['bbs.nga.cn', 'ngabbs.com', 'nga.178.com', 'g.nga.cn'],
  2099. iframe: true,
  2100. functionS: ()=> {locationC = true;
  2101. if (lp == '/thread.php') {
  2102. curSite = DBSite.nga_thread;
  2103. } else if (lp == '/read.php' && GM_getValue('menu_thread')) {
  2104. curSite = DBSite.nga_read;
  2105. }},
  2106. pager: {
  2107. nextL: 'css;#pagebbtm a[title="下一页"]',
  2108. pageE: 'css;#topicrows > tbody, #topicrows > script',
  2109. insertP: ['css;#topicrows', 3],
  2110. replaceE: 'css;div[name="pageball"]',
  2111. scriptT: 2,
  2112. scrollD: 1000
  2113. },
  2114. function: {
  2115. aF: ()=> {document.body.appendChild(document.createElement('script')).textContent = 'commonui.topicArg.loadAll();';}
  2116. }
  2117. }, // NGA - 各版块帖子列表
  2118. nga_read: {
  2119. history: false,
  2120. retry: 1000,
  2121. pager: {
  2122. nextL: 'css;#pagebbtm a[title*="下一页"]',
  2123. pageE: 'id("m_posts_c")/table | id("m_posts_c")/script | //script[contains(text(), "commonui.userInfo.setAll")]',
  2124. insertP: ['css;#m_posts_c', 3],
  2125. replaceE: 'css;div[name="pageball"]',
  2126. scriptT: 2,
  2127. scrollD: 1000
  2128. }
  2129. }, // NGA - 帖子内
  2130. v2ex_recent: {
  2131. host: ['v2ex.com', 'www.v2ex.com'],
  2132. functionS: ()=> {if (lp == '/') {
  2133. v2ex_aF('#Main a.topic-link:not([target])');
  2134. } else if (lp == '/recent') {
  2135. curSite = DBSite.v2ex_recent;
  2136. v2ex_aF('#Main a.topic-link:not([target])');
  2137. } else if (lp == '/notifications') {
  2138. curSite = DBSite.v2ex_notifications;
  2139. v2ex_aF('#Main a[href^="/t/"]:not([target])');
  2140. } else if (lp == '/balance') {
  2141. curSite = DBSite.v2ex_balance;
  2142. } else if (indexOF('/go/')) {
  2143. curSite = DBSite.v2ex_go;
  2144. v2ex_aF('#Main a.topic-link:not([target])');
  2145. } else if (indexOF('/replies')) {
  2146. curSite = DBSite.v2ex_replies;
  2147. v2ex_aF('#Main a[href^="/t/"]:not([target])');
  2148. }},
  2149. pager: {
  2150. nextL: 'css;a.page_current+a.page_normal',
  2151. pageE: 'css;.cell.item',
  2152. replaceE: 'css;#Main > .box > .cell[style]:not(.item) > table',
  2153. scrollD: 1500
  2154. },
  2155. function: {
  2156. aF: v2ex_aF,
  2157. aFp: '#Main a.topic-link:not([target])'
  2158. }
  2159. }, // V2EX - 最近主题页
  2160. v2ex_notifications: {
  2161. pager: {
  2162. nextL: 'css;a.page_current+a.page_normal',
  2163. pageE: 'css;#notifications > div',
  2164. replaceE: 'css;#Main > .box > .cell[style] > table',
  2165. scrollD: 1500
  2166. },
  2167. function: {
  2168. aF: v2ex_aF,
  2169. aFp: '#Main a[href^="/t/"]:not([target])'
  2170. }
  2171. }, // V2EX - 提醒消息页
  2172. v2ex_replies: {
  2173. pager: {
  2174. nextL: 'css;a.page_current+a.page_normal',
  2175. 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]',
  2176. insertP: ['//div[@id="Main"]//div[@class="box"]//div[@class="cell"][last()]', 1],
  2177. replaceE: 'css;#Main > .box > .cell[style] > table',
  2178. scrollD: 1500
  2179. },
  2180. function: {
  2181. aF: v2ex_aF,
  2182. aFp: '#Main a[href^="/t/"]:not([target])'
  2183. }
  2184. }, // V2EX - 用户回复页
  2185. v2ex_go: {
  2186. pager: {
  2187. nextL: 'css;a.page_current+a.page_normal',
  2188. pageE: 'css;#TopicsNode > div',
  2189. replaceE: 'css;#Main > .box > .cell[style] > table',
  2190. scrollD: 1500
  2191. },
  2192. function: {
  2193. aF: v2ex_aF,
  2194. aFp: '#Main a.topic-link:not([target])'
  2195. }
  2196. }, // V2EX - 分类主题页
  2197. v2ex_balance: {
  2198. pager: {
  2199. nextL: 'css;a.page_current+a.page_normal',
  2200. pageE: 'css;#Main .box > div:not(.cell) > table > tbody > tr:not(:first-child)',
  2201. replaceE: 'css;#Main > .box > .cell[style] > table',
  2202. scrollD: 1000
  2203. }
  2204. }, // V2EX - 账户余额页
  2205. jandan: {
  2206. host: 'jandan.net',
  2207. functionS: ()=> {if (lp == '/' || indexOF('/page/')) {
  2208. curSite = DBSite.jandan;
  2209. } else if (lp == '/dzh') {
  2210. curSite = DBSite.jandan_dzh;
  2211. } else {
  2212. curSite = DBSite.jandan_comment;
  2213. }},
  2214. style: '#nav_prev, #nav_next, .post.f:not(.list-post) {display: none !important;}',
  2215. history: false,
  2216. pager: {
  2217. nextL: '//div[@class="wp-pagenavi"]/a[contains(text(), "下一页") or contains(text(), "更多文章")]',
  2218. pageE: 'css;#content > .list-post',
  2219. replaceE: 'css;.wp-pagenavi',
  2220. scrollD: 1500
  2221. },
  2222. function: {
  2223. bF: src_bF,
  2224. bFp: [0, 'img[data-original]', 'data-original']
  2225. }
  2226. }, // 煎蛋网
  2227. jandan_comment: {
  2228. style: '#nav_prev, #nav_next {display: none !important;} .jandan-vote a.tucao-btn23:link {color: #c8c7cc !important;} .jandan-tucao {background-color: #fafaf9 !important;}',
  2229. pager: {
  2230. nextL: 'css;a.previous-comment-page',
  2231. pageE: 'css;ol.commentlist > li[id^="comment-"], script[src^="//cdn.jandan.net/static/min/"]',
  2232. insertP: ['css;ol.commentlist', 3],
  2233. replaceE: 'css;.cp-pagenavi',
  2234. scriptT: 2,
  2235. scrollD: 1500
  2236. },
  2237. function: {
  2238. bF: pageElems => { // 插入前函数(修改当前网页中的 吐槽 等按钮,避免重复添加点击事件)
  2239. getAllCSS('a.tucao-btn').forEach(function (now) {now.className = now.className.replace('tucao-btn', 'tucao-btn23');});
  2240. getAllCSS('a.comment-like.like').forEach(function (now) {now.className = now.className.replace('comment-like', 'comment-like23');});
  2241. getAllCSS('a.comment-unlike.unlike').forEach(function (now) {now.className = now.className.replace('comment-unlike', 'comment-unlike23');});
  2242. return pageElems
  2243. }
  2244. }
  2245. }, // 煎蛋网
  2246. jandan_dzh: {
  2247. history: false,
  2248. pager: {
  2249. type: 2,
  2250. nextL: 'css;.show_more',
  2251. interval: 1500,
  2252. scrollD: 1500
  2253. }
  2254. }, // 煎蛋网 - 大杂烩
  2255. qiushibaike: {
  2256. host: 'www.qiushibaike.com',
  2257. functionS: ()=> {insStyle('.qrcode-wrap, .qrcode-wrap-img, .index-side-left-AD1 {display: none !important;}');
  2258. if (lp == '/') {
  2259. curSite = DBSite.qiushibaike;
  2260. } else if (!indexOF('/article/')) {
  2261. curSite = DBSite.qiushibaike_;
  2262. }},
  2263. pager: {
  2264. nextL: '//ul[@class="pagination"]//a[./span[@class="next"]]',
  2265. pageE: 'css;.recommend-article > ul > li',
  2266. replaceE: 'css;ul.pagination',
  2267. scrollD: 1500
  2268. }
  2269. }, // 糗事百科
  2270. qiushibaike_: {
  2271. pager: {
  2272. nextL: '//ul[@class="pagination"]//a[./span[@class="next"]]',
  2273. pageE: 'css;[id^="qiushi_tag_"]',
  2274. replaceE: 'css;ul.pagination',
  2275. scrollD: 1500
  2276. }
  2277. }, // 糗事百科 - 分类页
  2278. lkong: {
  2279. host: 'www.lkong.com',
  2280. functionS: ()=> {locationC = true; if (indexOF('/forum/')) {
  2281. curSite = DBSite.lkong;
  2282. } else if (indexOF('/thread/') && GM_getValue('menu_thread')) {
  2283. curSite = DBSite.lkong;
  2284. curSite.pager.pageE = '//div[@class="main-content"]/parent::div | //head/style[@data-emotion-css]';
  2285. curSite.pager.insertP = ['//div[@class="main-content"][1]/parent::div/parent::div', 3];
  2286. }},
  2287. history: false,
  2288. pager: {
  2289. nextL: ()=> { // 获取下一页地址
  2290. let next = getCSS('li.ant-pagination-next'), page;
  2291. if (next && next.getAttribute('aria-disabled') === 'false') {
  2292. page = getCSS('li.ant-pagination-item-active[title]');
  2293. if (page && page.title) {return (location.origin + location.pathname + '?page=' + ++page.title);}
  2294. }
  2295. return '';
  2296. },
  2297. pageE: '//div[@class="main-title"]/parent::div/parent::div | //head/style[@data-emotion-css]',
  2298. insertP: ['//div[@class="main-title"][1]/parent::div/parent::div/parent::div', 3],
  2299. replaceE: 'css;ul.ant-pagination',
  2300. interval: 500,
  2301. scrollD: 1200
  2302. }
  2303. }, // 龙的天空
  2304. pediy_forum: {
  2305. host: 'bbs.pediy.com',
  2306. functionS: ()=> {if (indexOF('/forum-')) {
  2307. curSite = DBSite.pediy_forum;
  2308. } else if (indexOF('/thread-') && GM_getValue('menu_thread')) {
  2309. curSite = DBSite.pediy_thread;
  2310. }},
  2311. pager: {
  2312. nextL: '//a[@class="page-link" and text()="▶"]',
  2313. pageE: 'css;table.threadlist > tbody > tr',
  2314. replaceE: 'css;ul.pagination',
  2315. scrollD: 1500
  2316. }
  2317. }, // 看雪论坛 - 各版块帖子列表
  2318. pediy_thread: {
  2319. pager: {
  2320. nextL: '//a[@class="page-link" and text()="▶"]',
  2321. pageE: 'css;table.postlist > tbody > tr[data-pid]',
  2322. replaceE: 'css;ul.pagination',
  2323. scrollD: 1500
  2324. }
  2325. }, // 看雪论坛 - 帖子内
  2326. bangumitv: {
  2327. host: 'bangumi.tv',
  2328. functionS: ()=> {
  2329. if (indexOF('/browser') || indexOF('/subject_search')) {
  2330. curSite = DBSite.bangumitv;
  2331. } else if (indexOF('/forum')) {
  2332. curSite = DBSite.bangumitv_forum;
  2333. }},
  2334. pager: {
  2335. nextL: '//div[@class="page_inner"]/a[text()="››"]',
  2336. pageE: 'css;ul#browserItemList > li',
  2337. replaceE: 'css;.page_inner',
  2338. scrollD: 1500
  2339. }
  2340. }, // 番组计划
  2341. bangumitv_forum: {
  2342. pager: {
  2343. nextL: '//div[@class="page_inner"]/a[text()="››"]',
  2344. pageE: 'css;.topic_list > tbody:last-of-type > tr.topic',
  2345. replaceE: 'css;.page_inner',
  2346. scrollD: 1500
  2347. }
  2348. }, // 番组计划 - 小组帖子列表
  2349. dongchedi: {
  2350. host: 'www.dongchedi.com',
  2351. functionS: ()=> {locationC = true;
  2352. if (indexOF('/community/')) {
  2353. curSite = DBSite.dongchedi;
  2354. }},
  2355. pager: {
  2356. nextL: 'css;li.pagination-item.is-active+li > a',
  2357. pageE: 'css;.data-wrapper > section.community-card, style',
  2358. insertP: ['css;.data-wrapper', 3],
  2359. replaceE: '//ul[./li[contains(@class, "pagination-item")]]',
  2360. scrollD: 2000
  2361. },
  2362. function: {
  2363. bF: pageElems => {
  2364. pageElems.forEach(function (one) {
  2365. one.querySelectorAll('.g-load-img-wrap, .tw-absolute.tw-cursor-pointer, .avatar').forEach(function (now) {
  2366. getCSS('noscript+img', now).src = getCSS('noscript > img', now).src;
  2367. });
  2368. });
  2369. return pageElems
  2370. }
  2371. }
  2372. }, // 懂车帝论坛
  2373. kdslife: {
  2374. host: 'club.kdslife.com',
  2375. functionS: ()=> {
  2376. if (indexOF('/f_')) {
  2377. curSite = DBSite.kdslife;
  2378. } else if (indexOF('/t_')) {
  2379. curSite = DBSite.kdslife_t;
  2380. }},
  2381. pager: {
  2382. nextL: '//div[@class="fr i3_r"]/a[text()="后一页"]',
  2383. pageE: 'css;ul.main_List > li.i2:not(.h_bg)',
  2384. replaceE: 'css;ul.main_List > li.i3',
  2385. scrollD: 1000
  2386. }
  2387. }, // 宽带山论坛
  2388. kdslife_t: {
  2389. pager: {
  2390. nextL: '//div[@class="pages"]/a[text()=">>"]',
  2391. pageE: 'css;#reply_list_panel > *, script[src*="ui/js/kds.js"]',
  2392. insertP: ['css;#reply_list_panel', 3],
  2393. replaceE: 'css;.pages',
  2394. scriptT: 2,
  2395. scrollD: 1000
  2396. }
  2397. }, // 宽带山论坛 - 帖子内
  2398. libaclub: {
  2399. host: 'www.libaclub.com',
  2400. functionS: ()=> {
  2401. if (lp == '/' || indexOF('/date_')) {
  2402. curSite = DBSite.libaclub;
  2403. } else if (indexOF('/f_')) {
  2404. curSite = DBSite.libaclub_f;
  2405. } else if (indexOF('/t_') || indexOF('/reply_')) {
  2406. curSite = DBSite.libaclub_t;
  2407. } else if (indexOF('/prt_')) {
  2408. curSite = DBSite.libaclub_prt;
  2409. } else if (lp == '/facade.php') {
  2410. curSite = DBSite.libaclub_search;
  2411. }},
  2412. style: 'li.ui-list-merchant-ad, .ui-nav-appImage {display: none !important;}',
  2413. pager: {
  2414. nextL: '//div[@class="ui-crumbs-more"]/a[@class="fn-link"][1]',
  2415. pageE: 'css;ul.ui-list > li:not(.ui-list-item-head):not(.ui-list-merchant-ad)',
  2416. replaceE: 'css;div.ui-crumbs-more',
  2417. scrollD: 1200
  2418. }
  2419. }, // 篱笆网论坛
  2420. libaclub_f: {
  2421. style: 'li.ui-list-merchant-ad, .ui-nav-appImage {display: none !important;}',
  2422. pager: {
  2423. nextL: 'css;a.ui-paging-next',
  2424. pageE: 'css;ul.ui-list > li:not(.ui-list-item-head):not(.ui-list-merchant-ad)',
  2425. replaceE: 'css;div.ui-paging',
  2426. scrollD: 1200
  2427. }
  2428. }, // 篱笆网论坛 - 各版块帖子列表
  2429. libaclub_t: {
  2430. style: 'li.ui-list-merchant-ad, .ui-nav-appImage {display: none !important;}',
  2431. pager: {
  2432. nextL: 'css;a.ui-paging-next',
  2433. pageE: 'css;.ui-box-content > div.ui-topic, .ui-box-content > a[name]',
  2434. insertP: ['css;.ui-box-content', 3],
  2435. replaceE: 'css;div.ui-paging',
  2436. scrollD: 1500
  2437. }
  2438. }, // 篱笆网论坛 - 帖子内
  2439. libaclub_prt: {
  2440. style: 'li.ui-list-merchant-ad, .ui-nav-appImage {display: none !important;}',
  2441. pager: {
  2442. nextL: 'css;a.ui-paging-next',
  2443. pageE: 'css;ul.ui-list > li',
  2444. replaceE: 'css;div.ui-paging',
  2445. scrollD: 2000
  2446. }
  2447. }, // 篱笆网论坛 - 帖子内 - 打印版
  2448. libaclub_search: {
  2449. style: 'li.ui-list-merchant-ad, .ui-nav-appImage {display: none !important;}',
  2450. pager: {
  2451. nextL: '//div[@class="ui-page"]/a[contains(text(), "下一页")]',
  2452. pageE: 'css;.ui-box-main > ul.ui-list > li',
  2453. replaceE: 'css;div.ui-page',
  2454. scrollD: 1200
  2455. }
  2456. }, // 篱笆网论坛 - 搜索页
  2457. taoguba: {
  2458. host: 'www.taoguba.com.cn',
  2459. functionS: ()=> {insStyle('#joinTGB {display: none !important;}')
  2460. if (indexOF('/Article/') && GM_getValue('menu_thread')) {
  2461. curSite = DBSite.taoguba_t;
  2462. } else if (indexOF('/shenghuoba/')) {
  2463. curSite = DBSite.taoguba_;
  2464. } else if (indexOF(/\/bbs|zongban|dianzan|jinghua\//)) {
  2465. curSite = DBSite.taoguba;
  2466. }},
  2467. history: false,
  2468. pager: {
  2469. nextL: ()=> {
  2470. let next = getXpath('//div[contains(@class, "t_page01")]/a[contains(text(), "下一页")]'), next_ = '/';
  2471. if (next) {
  2472. next = next.getAttribute('onclick').replace('gotoPage(','').replace(')','').split(',');
  2473. if (indexOF(/\/dianzan|jinghua\//)) next_ = '-';
  2474. if (parseInt(next[0]) <= parseInt(next[2])) {return (`${location.origin}/${location.pathname.split('/')[1]}/${next[0]}${next_}${next[1]}`)}
  2475. }
  2476. return '';
  2477. },
  2478. pageE: 'css;.p_list > .p_list01[class*="user_"]',
  2479. replaceE: 'css;.t_page',
  2480. scrollD: 1000
  2481. }
  2482. }, // 淘股吧论坛
  2483. taoguba_: {
  2484. history: false,
  2485. pager: {
  2486. nextL: ()=> {
  2487. let next = getCSS('#N_go_pageBtn'), next_ = location.pathname.split('/')[2].split('-')[0];
  2488. if (next && (parseInt(next.dataset.now) + 1 <= parseInt(next.dataset.total))) {
  2489. if (!next_) next_ = 'H';
  2490. return (`${location.origin}/shenghuoba/${next_}-${parseInt(next.dataset.now) + 1}`)
  2491. }
  2492. return '';
  2493. },
  2494. pageE: 'css;.lifeContent-topicList-item',
  2495. replaceE: 'css;.N_sortPage ',
  2496. scrollD: 1000
  2497. }
  2498. }, // 淘股吧论坛 - 生活圈
  2499. taoguba_t: {
  2500. history: false,
  2501. pager: {
  2502. nextL: ()=> {
  2503. let next = getXpath('//div[contains(@class, "t_page01")]/a[contains(text(), "下一页")]');
  2504. if (next) {
  2505. next = next.getAttribute('onclick').replace('gotoPageTopic(','').replace(')','').split(',');
  2506. if (parseInt(next[0]) <= parseInt(next[1])) {return (`${location.origin}/Article/${getCSS("#looktopicID").value}/${next[0]}`)}
  2507. }
  2508. return '';
  2509. },
  2510. pageE: 'css;div[id^="reply_"]',
  2511. replaceE: 'css;.t_page',
  2512. scrollD: 1000
  2513. },
  2514. function: {
  2515. bF: src_bF,
  2516. bFp: [0, 'img[data-original]', 'data-original']
  2517. }
  2518. }, // 淘股吧论坛 - 帖子内
  2519. lowendtalk: {
  2520. host: 'lowendtalk.com',
  2521. pager: {
  2522. nextL: 'css;a.Next',
  2523. pageE: 'css;ul.DataList > li',
  2524. replaceE: 'css;.Pager',
  2525. scrollD: 1500
  2526. }
  2527. }, // LowEndTalk
  2528. lieyou: {
  2529. host: 'bbs.lieyou888.com',
  2530. functionS: ()=> {if (indexOF('/forum')) {curSite = DBSite.lieyou;}},
  2531. pager: {
  2532. nextL: '//div[contains(@class, "_pageNav")]/a[text()="下一页"]',
  2533. pageE: 'css;ul.gb-bbs-list > li',
  2534. replaceE: 'css;._pageNav',
  2535. scrollD: 1000
  2536. },
  2537. function: {
  2538. bF: src_bF,
  2539. bFp: [0, 'img[original]', 'original']
  2540. }
  2541. }, // 芥子空间论坛
  2542. xcar_forumdisplay: {
  2543. host: 'www.xcar.com.cn',
  2544. functionS: ()=> {if (lp == '/bbs/forumdisplay.php') {curSite = DBSite.xcar_forumdisplay}},
  2545. pager: {
  2546. nextL: 'css;a.page_down',
  2547. pageE: 'css;.table-section > dl:not(.table_head)',
  2548. replaceE: 'css;.forumList_page',
  2549. scrollD: 2000
  2550. }
  2551. }, // 爱卡汽车网论坛 - 各版块帖子列表
  2552. flyert_forumdisplay: {
  2553. host: 'www.flyert.com',
  2554. functionS: ()=> {if (indexOF('/forum-') || indexOF('mod=forumdisplay', 's')) {
  2555. curSite = DBSite.flyert_forumdisplay;
  2556. } else if (indexOF('/forum') || indexOF('mod=viewthread', 's')) {
  2557. if (GM_getValue('menu_thread')) {curSite = DBSite.flyert_viewthread;}
  2558. }},
  2559. pager: {
  2560. nextL: 'css;a.nxt:not([href*="javascript"])',
  2561. pageE: 'css;#threadlist table > tbody[id^="normalthread_"]',
  2562. replaceE: 'css;.pg',
  2563. scrollD: 2500
  2564. }
  2565. }, // 飞客网论坛 - 各版块帖子列表
  2566. flyert_viewthread: {
  2567. pager: {
  2568. nextL: 'css;a.nxt:not([href*="javascript"])',
  2569. pageE: 'css;#postlist > .comiis_viewbox',
  2570. replaceE: 'css;.comiis_pgs > .pg',
  2571. scrollD: 3000
  2572. }
  2573. }, // 飞客网论坛 - 帖子内
  2574. cnprint: {
  2575. host: 'www.cnprint.org',
  2576. functionS: ()=> {if (indexOF('/forum/')) {curSite = DBSite.cnprint;} else if (indexOF('/thread/') && GM_getValue('menu_thread')) {curSite = DBSite.cnprint_thread;}},
  2577. pager: {
  2578. nextL: 'css;a[rel="next"]',
  2579. pageE: 'css;tbody[id*="threadbits_forum"] > tr',
  2580. replaceE: 'css;.pagenav',
  2581. scrollD: 2500
  2582. }
  2583. }, // CPC 中文印刷社区
  2584. cnprint_thread: {
  2585. pager: {
  2586. nextL: 'css;a[rel="next"]',
  2587. pageE: 'css;#posts > div:not([id])',
  2588. replaceE: 'css;.pagenav',
  2589. scrollD: 2000
  2590. }
  2591. }, // CPC 中文印刷社区 - 帖子内
  2592. discusshk: {
  2593. host: /.+\.discuss\.com\.hk/,
  2594. functionS: ()=> {if (lp == '/forumdisplay.php') {curSite = DBSite.discusshk;} else if (lp == '/viewthread.php' && GM_getValue('menu_thread')) {curSite = DBSite.discusshk_thread;}},
  2595. pager: {
  2596. nextL: 'css;.pagination a.next',
  2597. pageE: 'css;tbody[id^="normalthread_"]',
  2598. replaceE: 'css;.pagination',
  2599. scrollD: 2000
  2600. }
  2601. }, // 中国香港社区
  2602. discusshk_thread: {
  2603. style: '.viewthread.mt-0:not(:first-of-type) .viewthread__head {display: none !important;}',
  2604. pager: {
  2605. nextL: 'css;.pagination a.next',
  2606. pageE: 'css;.viewthread',
  2607. replaceE: 'css;.pagination',
  2608. scrollD: 2000
  2609. }
  2610. }, // 中国香港论坛 - 帖子内
  2611. tgfcer: {
  2612. host: 'bbs.tgfcer.com',
  2613. functionS: ()=> {if (lp == '/forumdisplay.php' || indexOF('/forum')) {curSite = DBSite.tgfcer;} else if (GM_getValue('menu_thread') && (lp == '/viewthread.php' || indexOF('/thread'))) {curSite = DBSite.tgfcer_thread;}},
  2614. pager: {
  2615. nextL: 'css;.pages a.next',
  2616. pageE: 'css;tbody[id^="normalthread_"]',
  2617. replaceE: 'css;.pages',
  2618. scrollD: 2000
  2619. }
  2620. }, // TGFC Lifestyle
  2621. tgfcer_thread: {
  2622. style: '.viewthread:not(:first-of-type) h1 {display: none !important;}',
  2623. pager: {
  2624. nextL: 'css;.pages a.next',
  2625. pageE: 'css;.viewthread',
  2626. replaceE: 'css;.pages',
  2627. scrollD: 2000
  2628. }
  2629. }, // TGFC Lifestyle - 帖子内
  2630. south: {
  2631. host: /((www|bbs)\.)?(soul|north|south|white|level|summer|spring|snow)-plus\.(net|org)/,
  2632. functionS: ()=> {
  2633. if (lp == '/thread.php' || lp == '/search.php') {
  2634. curSite = DBSite.south;
  2635. } else if (lp == '/thread_new.php') {
  2636. curSite = DBSite.south; curSite.pager.pageE = 'css;li.dcsns-li'; curSite.pager.scrollD = 2000; curSite.function = {bF: src_bF,bFp: [0, 'img[data-original]', 'data-original']}; curSite.style = 'img.lazy {display: inline !important;}';
  2637. } else if (GM_getValue('menu_thread') && lp == '/read.php') {
  2638. curSite = DBSite.south; curSite.pager.pageE = 'css;form[name=delatc] > *:not(input)';
  2639. } else if (lp == '/u.php' && (indexOF('action-topic-', 's') || indexOF('action-post-', 's'))) {
  2640. curSite = DBSite.south; curSite.pager.pageE = 'css;#u-contentmain table tr';
  2641. }},
  2642. pager: {
  2643. nextL: '//div[@class="pages"]/ul/li[./b]/following-sibling::li[1][not(@class)]/a[not(text()="»")]',
  2644. pageE: 'css;tr.tr3',
  2645. replaceE: 'css;.pages',
  2646. scrollD: 1500
  2647. }
  2648. }, // South Plus (南+)
  2649. goddessfantasy: {
  2650. host: 'www.goddessfantasy.net',
  2651. functionS: ()=> {
  2652. if (indexOF('board=', 's')) {
  2653. curSite = DBSite.goddessfantasy;
  2654. } else if (indexOF('topic=', 's')) {
  2655. if (GM_getValue('menu_thread')) curSite = DBSite.goddessfantasy; curSite.pager.pageE = 'css;#quickModForm > *';
  2656. }},
  2657. pager: {
  2658. nextL: '//div[contains(@class,"pagelinks")]/a[@class="navPages" and text()="»"]',
  2659. pageE: 'css;.table_grid > tbody > tr',
  2660. replaceE: 'css;.pagelinks',
  2661. scrollD: 1500
  2662. }
  2663. }, // 纯美苹果园
  2664. adnmb3: {
  2665. host: ['adnmb3.com', 'www.tnmb.org'],
  2666. functionS: ()=> {
  2667. if (indexOF('/m/f/')) {
  2668. curSite = DBSite.adnmb3_mf;
  2669. } else if (indexOF('/m/t/')) {
  2670. if (GM_getValue('menu_thread')) curSite = DBSite.adnmb3_mt;
  2671. } else if (indexOF(/\/(f|Forum)\//)) {
  2672. curSite = DBSite.adnmb3;
  2673. } else if (indexOF('/t/')) {
  2674. if (GM_getValue('menu_thread')) curSite = DBSite.adnmb3_t;
  2675. }},
  2676. pager: {
  2677. nextL: '//ul[contains(@class, "pagination")]//a[text()="下一页"]',
  2678. pageE: 'css;.h-threads-list > *, script[src$="/h.desktop.js"]',
  2679. insertP: ['css;.h-threads-list', 3],
  2680. replaceE: '//ul[contains(@class, "pagination")]',
  2681. scriptT: 2,
  2682. scrollD: 2500
  2683. }
  2684. }, // A 岛
  2685. adnmb3_t: {
  2686. pager: {
  2687. nextL: '//ul[contains(@class, "pagination")]//a[text()="下一页"]',
  2688. pageE: 'css;.h-threads-list > .h-threads-item > .h-threads-item-replys, script[src$="/h.desktop.js"]',
  2689. insertP: ['css;.h-threads-list > .h-threads-item', 3],
  2690. replaceE: '//ul[contains(@class, "pagination")]',
  2691. scriptT: 2,
  2692. scrollD: 2500
  2693. }
  2694. }, // A 岛 - 帖子内
  2695. adnmb3_mf: {
  2696. pager: {
  2697. nextL: '//li[contains(@class, "pagination-next")]//a[text()="下一页"]',
  2698. 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"]',
  2699. insertP: ['css;#h-threads-pagination', 1],
  2700. replaceE: 'css;#h-threads-pagination',
  2701. scriptT: 2,
  2702. scrollD: 2500
  2703. }
  2704. }, // A 岛 - 帖子列表(手机版)
  2705. adnmb3_mt: {
  2706. pager: {
  2707. nextL: '//li[contains(@class, "pagination-next")]//a[text()="下一页"]',
  2708. pageE: 'css;.h-threads-replylist > div, script[src$="/h.mobile.js"]',
  2709. insertP: ['css;.h-threads-replylist', 3],
  2710. replaceE: 'css;#h-threads-pagination',
  2711. scriptT: 2,
  2712. scrollD: 2500
  2713. }
  2714. }, // A 岛 - 帖子内(手机版)
  2715. pixiv: {
  2716. host: 'www.pixiv.net',
  2717. functionS: ()=> {locationC = true;
  2718. if (lp == '/') {
  2719. forceTarget();
  2720. } else if (indexOF('/tags/')/* && self == top*/) {
  2721. curSite = DBSite.pixiv;
  2722. } else if (indexOF('/users/') && indexOF(/\/(artworks|illustrations|manga)/)) {
  2723. curSite = DBSite.pixiv_user;
  2724. } else if (indexOF('/artworks/')) {
  2725. setTimeout(function(){getXpath('//button[contains(string(), "查看全部") or contains(string(), "See all") or contains(string(), "すべて見る") or contains(string(), "모두 보기")]').click();}, 1000)
  2726. }
  2727. },
  2728. forceTarget: true,
  2729. style: 'ul[class*="-1 "] > li {display: inline !important;} #root{margin-bottom: -175px;} ul > li > button[class^="sc-"], a[href^="/premium/lead/lp"] {display: none !important;}',
  2730. iframe: true,
  2731. pager: {
  2732. type: 5,
  2733. nextL: 'css;a[aria-disabled="false"][class*="filterProps-Styled-Component"][href]:last-child',
  2734. /*pageE: '//ul[contains(@class, "-1 ")]/li',
  2735. insertP: ['//ul[contains(@class, "-1 ")]', 3],
  2736. replaceE: '//nav[./a[@aria-disabled="false"][contains(@class, "filterProps-Styled-Component")]]',*/
  2737. scrollD: 2000
  2738. }
  2739. }, // Pixiv - 分类页
  2740. pixiv_user: {
  2741. forceTarget: true,
  2742. style: 'ul[class*="-1 "] > li {display: inline !important;} #root{margin-bottom: -125px;} ul > li > button[class^="sc-"][style="background-color: rgb(0, 0, 0);"], a[href^="/premium/lead/lp"] {display: none !important;}',
  2743. pager: {
  2744. type: 5,
  2745. nextL: 'css;a[aria-disabled="false"][class*="filterProps-Styled-Component"][href]:last-child',
  2746. /*pageE: '//ul[contains(@class, "-1 ")]/li',
  2747. insertP: ['//ul[contains(@class, "-1 ")]', 3],
  2748. replaceE: '//nav[./a[@aria-disabled="false"][contains(@class, "filterProps-Styled-Component")]]',*/
  2749. scrollD: 2000
  2750. }
  2751. }, // Pixiv - 用户作品页
  2752. vilipix: {
  2753. host: 'www.vilipix.com',
  2754. functionS: ()=> {locationC = true; if (lp == '/') {forceTarget();} else if (indexOF(/\/(tags|user|new|ranking)/)) {curSite = DBSite.vilipix;}},
  2755. forceTarget: true,
  2756. pager: {
  2757. type: 6,
  2758. nextL: ()=> {let next = getCSS('li.number.active+li.number'); if (next) return (location.origin + location.pathname + '?p=' + next.textContent)},
  2759. pageE: 'css;ul.illust-content > li',
  2760. replaceE: 'css;ul.el-pager',
  2761. loadTime: 800,
  2762. scrollD: 2000
  2763. }
  2764. }, // Vilipix
  2765. pixivision: {
  2766. host: 'www.pixivision.net',
  2767. functionS: ()=> {if (!indexOF('/a/')) curSite = DBSite.pixivision;},
  2768. pager: {
  2769. nextL: 'css;a.next',
  2770. pageE: 'css;li.article-card-container',
  2771. replaceE: 'css;._pager',
  2772. scrollD: 2000
  2773. }
  2774. }, // Pixivision
  2775. _58pic: {
  2776. host: 'www.58pic.com',
  2777. functionS: ()=> {insStyle('.qt-model-t.login-model {display: none !important;}');
  2778. if (indexOF(/\/(tupian|piccate)\//)) {
  2779. curSite = DBSite._58pic;
  2780. if (indexOF('/piccate/') && getCSS('.card-grid-box .qt-card-box[style*="width:"]')) insStyle('.card-grid-box .qt-card-box {display: block;height: 300px;min-height: 250px;}')
  2781. } else if (indexOF('/c/')) {
  2782. curSite = DBSite._58pic_c;
  2783. }},
  2784. style: '.qtw-card.place-box, .card-lazy, .is-line .is-back {display: none !important;}',
  2785. pager: {
  2786. nextL: '//div[contains(@class,"page-box")]//a[text()="下一页"]',
  2787. pageE: 'css;.card-grid-box:not(.favorites-box) > div',
  2788. replaceE: 'css;.page-box',
  2789. scrollD: 2500
  2790. },
  2791. function: {
  2792. bF: "src_bF",
  2793. bFp: [0, 'img[data-original]', 'data-original']
  2794. }
  2795. }, // 千图网 - 分类/搜索页
  2796. _58pic_c: {
  2797. pager: {
  2798. nextL: '//div[contains(@class,"page-box")]//a[text()="下一页"]',
  2799. pageE: 'css;.list-box > .qtw-card',
  2800. replaceE: 'css;.page-box',
  2801. scrollD: 4000
  2802. },
  2803. function: {
  2804. bF: src_bF,
  2805. bFp: [0, 'img[data-original]', 'data-original']
  2806. }
  2807. }, // 千图网 - 专题/收藏夹
  2808. _588ku: {
  2809. host: '588ku.com',
  2810. style: '.listlogin-box.listloginBox, .CLdialogV1, .editIndexEntry, .globalRSideB {display: none !important;}',
  2811. pager: {
  2812. nextL: '//ul[contains(@class, "page-list")]//a[text()="下一页"]',
  2813. pageE: 'css;.data-box .dataList, .data-box .data-list',
  2814. insertP: ['css;.data-box .dataList, .data-box .data-list', 3],
  2815. replaceE: 'css;ul.page-list',
  2816. scrollD: 2000
  2817. },
  2818. function: {
  2819. bF: src_bF,
  2820. bFp: [0, 'img[data-original]', 'data-original']
  2821. }
  2822. }, // 千库网
  2823. nipic: {
  2824. host: ['www.nipic.com', 'soso.nipic.com'],
  2825. style: 'li.search-works-item {display: none !important;}',
  2826. pager: {
  2827. nextL: '//a[@title="下一页" or text()="下一页"][not(contains(@class, "search-works-nextpage"))]',
  2828. pageE: 'css;ul#img-list-outer > li',
  2829. replaceE: 'css;.common-page-box, .common-seo-page-box',
  2830. scrollD: 2000
  2831. },
  2832. function: {
  2833. bF: src_bF,
  2834. bFp: [0, 'img[data-original]', 'data-original']
  2835. }
  2836. }, // 昵图网
  2837. ztupic: {
  2838. host: 'www.ztupic.com',
  2839. functionS: ()=> {if (lp != '/' && !indexOF('/sucai/')) {curSite = DBSite.ztupic;}},
  2840. pager: {
  2841. nextL: 'css;a.page-link[rel="next"]',
  2842. pageE: 'css;.floor_item',
  2843. replaceE: 'css;ul.pagination',
  2844. scrollD: 2000
  2845. },
  2846. function: {
  2847. bF: src_bF,
  2848. bFp: [0, 'img[data-src]', 'data-src']
  2849. }
  2850. }, // 众图网
  2851. ooopic: {
  2852. host: ['www.ooopic.com', 'so.ooopic.com', 'weili.ooopic.com'],
  2853. functionS: ()=> {if (lp != '/' && !indexOF('/weili_')) {curSite = DBSite.ooopic;}},
  2854. style: '.overWidth.clearfix.masonry {height: auto !important;} .pic-list, .video-list {position: relative !important;float: left !important;top: auto !important;left: auto !important;}',
  2855. pager: {
  2856. nextL: 'css;a.next_page, a.so-next',
  2857. pageE: 'css;.overWidth.clearfix.masonry > div',
  2858. replaceE: 'css;.page',
  2859. scrollD: 2000
  2860. },
  2861. function: {
  2862. bF: src_bF,
  2863. bFp: [0, 'img[data-original]', 'data-original']
  2864. }
  2865. }, // 我图网
  2866. ibaotu: {
  2867. host: 'ibaotu.com',
  2868. functionS: ()=> {if (lp != '/' && !indexOF('/sucai/')) {curSite = DBSite.ibaotu;if (indexOF('/yinxiao') || indexOF('/peiyue')) {curSite.pager.pageE = 'css;ul.media-list-ul > li[pr-data-title]'} else if (indexOF('/font/')) {curSite.pager.pageE = 'css;.baotufonts-list > a'}}},
  2869. style: '.searchAdver {display: none !important;}',
  2870. pager: {
  2871. nextL: 'css;a.next',
  2872. pageE: 'css;.pr-container[pr-data-title]:not(.searchAdver)',
  2873. replaceE: 'css;.pagelist',
  2874. scrollD: 2000
  2875. },
  2876. function: {
  2877. bF: src_bF,
  2878. bFp: [0, 'img[data-url]', 'data-url']
  2879. }
  2880. }, // 包图网
  2881. pixabay: {
  2882. host: 'pixabay.com',
  2883. pager: {
  2884. nextL: '//a[text()="›"]',
  2885. pageE: 'css;[class^="results"] > [class^="container"] > div',
  2886. replaceE: '//a[text()="›"]',
  2887. scrollD: 2000
  2888. },
  2889. function: {
  2890. bF: src_bF,
  2891. bFp: [0, 'img[data-lazy-src]', 'data-lazy-src']
  2892. }
  2893. }, // Pixabay
  2894. logosc: {
  2895. host: 'www.logosc.cn',
  2896. functionS: ()=> {if (indexOF('/so/')) {curSite = DBSite.logosc;}},
  2897. pager: {
  2898. type: 2,
  2899. nextL: 'css;button.so-pablo-button',
  2900. interval: 1500,
  2901. scrollD: 1500
  2902. }
  2903. }, // 搜图神器 (免费无版权)
  2904. sccnn: {
  2905. host: 'www.sccnn.com',
  2906. pager: {
  2907. nextL: '//ul[@class="listpage"]//a[text()=">"]',
  2908. pageE: 'css;td[valign="TOP"]:not([width]) tr[valign="Middle"]',
  2909. replaceE: 'css;ul.listpage',
  2910. scrollD: 1000
  2911. }
  2912. }, // 素材中国
  2913. sccnn_so: {
  2914. host: 'so.sccnn.com',
  2915. pager: {
  2916. nextL: 'css;font[color="Red"]+a.F16',
  2917. pageE: '//tr[@valign="Top"][1]/preceding-sibling::tr',
  2918. replaceE: '//tr[@valign="Top"][last()]',
  2919. scrollD: 1000
  2920. }
  2921. }, // 素材中国 - 搜索页
  2922. pngss: {
  2923. host: 'pngss.com',
  2924. functionS: ()=> {if (lp == '/search') curSite = DBSite.pngss;},
  2925. pager: {
  2926. nextL: 'css;.page a[rel="next"]',
  2927. pageE: 'css;ul.list-ul > li',
  2928. replaceE: 'css;.page',
  2929. scrollD: 1200
  2930. },
  2931. function: {
  2932. bF: src_bF,
  2933. bFp: [0, 'img[data-original]', 'data-original']
  2934. }
  2935. }, // PNG 搜索网
  2936. iconfont: {
  2937. host: 'www.iconfont.cn',
  2938. functionS: ()=> {locationC = true; if (indexOF('/search/')) curSite = DBSite.iconfont;},
  2939. forceTarget: true,
  2940. style: '.footer, header .bind-tips, .block-pagination-wrap, #magix_vf_main .block-sub-banner, #J_block_sidebar {display: none !important;}',
  2941. iframe: true,
  2942. pager: {
  2943. type: 5,
  2944. nextL: ()=> getNextEP('css;li.active+li:not(.disabled) > a', 'page=', /page=\d+/),
  2945. scrollD: 1000
  2946. }
  2947. }, // iconfont
  2948. iconarchive: {
  2949. host: 'iconarchive.com',
  2950. functionS: ()=> {if (indexOF(/\/(tag|search|category)/)) curSite = DBSite.iconarchive;},
  2951. pager: {
  2952. nextL: 'css;a.next',
  2953. pageE: 'css;.icondetail',
  2954. replaceE: 'css;.pagination',
  2955. scrollD: 2000
  2956. }
  2957. }, // IconArchive
  2958. puxiang: {
  2959. host: 'www.puxiang.com',
  2960. functionS: ()=> {if (lp == '/search/favorite') {
  2961. curSite = DBSite.puxiang_collect;
  2962. } else if (lp == '/search/puxiang' || lp == '/list' || lp == '/galleries' || lp == '/articles') {
  2963. curSite = DBSite.puxiang;
  2964. } else if (lp == '/') {
  2965. curSite = DBSite.puxiang; curSite.pager.scrollD = 4000;
  2966. }},
  2967. pager: {
  2968. nextL: 'css;li.next > a',
  2969. pageE: 'css;.work-list > div',
  2970. replaceE: 'css;.pagerbar',
  2971. scrollD: 1500
  2972. }
  2973. }, // 普象网 - 作品集/搜索页
  2974. puxiang_collect: {
  2975. pager: {
  2976. nextL: 'css;li.next > a',
  2977. pageE: 'css;.collect-list > div',
  2978. replaceE: 'css;.pagerbar',
  2979. scrollD: 1500
  2980. }
  2981. }, // 普象网 - 收藏夹
  2982. xuexiniu: {
  2983. host: ['www.xuexiniu.com', 'bbs.xuexiniu.com'],
  2984. functionS: ()=> {
  2985. if (getCSS('body#nv_forum.pg_forumdisplay')) {
  2986. if (getCSS('ul.waterfall')) {
  2987. curSite = DBSite.xuexiniu_forum;
  2988. } else {
  2989. curSite = DBSite.discuz_guide
  2990. }
  2991. } else if (getCSS('body#nv_forum.pg_viewthread') && GM_getValue('menu_thread')) {
  2992. curSite = DBSite.xuexiniu_thread;
  2993. } else if (indexOF('/search.php')) {
  2994. curSite = DBSite.xuexiniu_search;
  2995. } else {
  2996. curSite = DBSite.xuexiniu;
  2997. }
  2998. },
  2999. pager: {
  3000. nextL: '//a[@class="page-link" and contains(text(), "下一页")]',
  3001. pageE: 'css;.row > .col-sm-6',
  3002. replaceE: 'css;ul.pagination',
  3003. scrollD: 1000
  3004. }
  3005. }, // 学犀牛 - 分类页
  3006. xuexiniu_forum: {
  3007. pager: {
  3008. nextL: 'css;a.nxt:not([href*="javascript"])',
  3009. pageE: 'css;.waterfall > li',
  3010. replaceE: 'css;.pg',
  3011. scrollD: 1500
  3012. }
  3013. }, // 学犀牛 - 各板块帖子列表
  3014. xuexiniu_thread: {
  3015. pager: {
  3016. nextL: 'css;a.nxt:not([href*="javascript"])',
  3017. pageE: 'css;#zhanzhuai_primary > .box',
  3018. replaceE: 'css;.pg',
  3019. scrollD: 1500
  3020. }
  3021. }, // 学犀牛 - 帖子内
  3022. xuexiniu_search: {
  3023. pager: {
  3024. nextL: 'css;a.nxt:not([href*="javascript"])',
  3025. pageE: 'css;.yangshi.yangshi2',
  3026. insertP: ['css;.page', 1],
  3027. replaceE: 'css;.page',
  3028. scrollD: 1500
  3029. }
  3030. }, // 学犀牛 - 搜索页
  3031. om: {
  3032. host: 'www.om.cn',
  3033. functionS: ()=> {if (lp != '/') {curSite = DBSite.om;}},
  3034. pager: {
  3035. nextL: 'css;li.next > a',
  3036. pageE: 'css;.main_content > ul > li',
  3037. replaceE: 'css;ul.pagination',
  3038. scrollD: 1500
  3039. }
  3040. }, // 欧模网
  3041. xiadele: {
  3042. host: ['www.xiadele.com', 'search.xiadele.com'],
  3043. functionS: ()=> {if (lp != '/') {curSite = DBSite.xiadele;}},
  3044. style: '.last-li-carousel-img {display: none !important;}',
  3045. pager: {
  3046. nextL: 'css;li.next_page a[rel="next"]',
  3047. pageE: 'css;ul.list-page-ul > li',
  3048. replaceE: 'css;ul.pagination',
  3049. scrollD: 2000
  3050. }
  3051. }, // 下得乐
  3052. Mixkit: {
  3053. host: 'mixkit.co',
  3054. functionS: ()=> {if (lp != '/') {curSite = DBSite.Mixkit;}},
  3055. pager: {
  3056. nextL: 'css;a.pagination__link--next',
  3057. pageE: 'css;.item-grid-item',
  3058. replaceE: 'css;.pagination__wrapper',
  3059. scrollD: 2000
  3060. }
  3061. }, // Mixkit
  3062. _3dmgame: {
  3063. host: 'www.3dmgame.com',
  3064. functionS: ()=> {
  3065. if (getCSS('.Llist_b > div.lis')) {
  3066. curSite = DBSite._3dmgame_list;
  3067. } else if (getCSS('.newsleft > ul')) {
  3068. curSite = DBSite._3dmgame_list2;
  3069. } else if (indexOF('/resource')) {
  3070. curSite = DBSite._3dmgame_list3;
  3071. } else {
  3072. curSite = DBSite._3dmgame;
  3073. }},
  3074. pager: {
  3075. type: 3,
  3076. nextL: 'css;li.next > a',
  3077. pageE: 'css;script[src*="common.js"], .news_warp_center > *',
  3078. insertP: ['css;.news_warp_center', 3],
  3079. replaceE: 'css;.pagewrap',
  3080. scrollE: 'css;.pagewrap',
  3081. scriptT: 2,
  3082. interval: 500,
  3083. scrollD: 500
  3084. }
  3085. }, // 3DM
  3086. _3dmgame_list: {
  3087. pager: {
  3088. nextL: 'css;li.next > a',
  3089. pageE: 'css;.Llist_b > div.lis',
  3090. replaceE: 'css;.pagewrap',
  3091. scrollD: 1000
  3092. },
  3093. function: {
  3094. bF: src_bF,
  3095. bFp: [0, 'img[data-original]', 'data-original']
  3096. }
  3097. }, // 3DM - 分类页
  3098. _3dmgame_list2: {
  3099. pager: {
  3100. nextL: 'css;li.next > a',
  3101. pageE: 'css;.newsleft > ul > li',
  3102. replaceE: 'css;.pagewrap',
  3103. scrollD: 1000
  3104. },
  3105. function: {
  3106. bF: src_bF,
  3107. bFp: [0, 'img[data-original]', 'data-original']
  3108. }
  3109. }, // 3DM - 游戏专区 - 分类页
  3110. _3dmgame_list3: {
  3111. pager: {
  3112. nextL: 'css;li.next > a',
  3113. pageE: 'css;.item > ul',
  3114. insertP: ['css;.item > ul:last-child', 1],
  3115. replaceE: 'css;.pagewrap',
  3116. scrollD: 800
  3117. }
  3118. }, // 3DM - 游戏专区 - 资源页
  3119. _3dmgame_mod: {
  3120. host: 'mod.3dmgame.com',
  3121. pager: {
  3122. nextL: ()=> getNextEP('//li[@class="page-list active"]/following-sibling::li[contains(@class, "page-list")]/a', 'Page=', /Page=\d+/),
  3123. 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")]',
  3124. insertP: ['//div[contains(@class, "game-mod-wrap") or contains(@class, "search-mod ")]', 3],
  3125. scriptT: 2,
  3126. scrollD: 1200
  3127. }
  3128. }, // 3DM MOD站
  3129. ali213_www: {
  3130. host: 'www.ali213.net',
  3131. pager: {
  3132. type: 3,
  3133. nextL: 'css;#after_this_page',
  3134. pageE: 'css;#Content >*:not(.news_ding):not(.page_fenye)',
  3135. insertP: ['css;.page_fenye', 1],
  3136. replaceE: 'css;.page_fenye',
  3137. scrollE: 'css;.page_fenye',
  3138. interval: 500,
  3139. scrollD: 100
  3140. }
  3141. }, // 游侠网
  3142. ali213_list: {
  3143. host: 'down.ali213.net',
  3144. functionS: ()=> {if (getCSS('.famous-ul > .famous-li')) {curSite = DBSite.ali213_list;}},
  3145. pager: {
  3146. nextL: 'css;a.page-next',
  3147. pageE: 'css;.famous-ul > .famous-li',
  3148. replaceE: 'css;.page-container',
  3149. scrollD: 1000
  3150. },
  3151. function: {
  3152. bF: src_bF,
  3153. bFp: [0, 'img[data-original]', 'data-original']
  3154. }
  3155. }, // 游侠网 - 分类页
  3156. ali213_gl: {
  3157. host: 'gl.ali213.net',
  3158. style: '.n_show_b, a.morezjjump {display: none !important;}',
  3159. pager: {
  3160. type: 3,
  3161. nextL: 'css;a.next',
  3162. pageE: 'css;.c-detail > *',
  3163. insertP: ['css;.c-detail', 3],
  3164. replaceE: 'css;.page_fenye',
  3165. scrollE: 'css;.page_fenye',
  3166. interval: 500,
  3167. scrollD: 300
  3168. }
  3169. }, // 游侠网 - 攻略
  3170. ali213_pic: {
  3171. host: 'pic.ali213.net',
  3172. style: 'a.prev, a.next {display: none !important;}',
  3173. pager: {
  3174. nextL: 'css;a.next',
  3175. pageE: 'css;#image-show > img',
  3176. replaceE: 'css;#image-show > a',
  3177. scrollD: 1200
  3178. }
  3179. }, // 游侠网 - 图库
  3180. gamersky_ent: {
  3181. host: 'www.gamersky.com',
  3182. functionS: ()=> {if (indexOF('/ent/')) {
  3183. curSite = DBSite.gamersky_ent;
  3184. } else {
  3185. curSite = DBSite.gamersky_gl;
  3186. if (indexOF('/zl/') && indexOF('.shtml')) {curSite.pager.insertP = ['css;.pagecss', 1]; curSite.pager.scrollD = 400;}
  3187. }},
  3188. pager: {
  3189. type: 3,
  3190. nextL: '//div[@class="page_css"]/a[text()="下一页"]',
  3191. pageE: 'css;.Mid2L_con > *:not(.gs_nc_editor):not(.pagecss):not(.page_css):not(.gs_ccs_solve):not(.post_ding)',
  3192. insertP: ['css;.page_css', 1],
  3193. replaceE: 'css;.page_css',
  3194. scrollE: 'css;.page_css',
  3195. interval: 500,
  3196. scrollD: 100
  3197. }
  3198. }, // 游民星空
  3199. gamersky_gl: {
  3200. pager: {
  3201. type: 3,
  3202. nextL: '//div[@class="page_css"]/a[text()="下一页"]',
  3203. pageE: 'css;.Mid2L_con > *:not(.gs_nc_editor):not(.pagecss):not(.gs_ccs_solve):not(.post_ding)',
  3204. insertP: ['css;.gs_nc_editor', 1],
  3205. replaceE: 'css;.page_css',
  3206. scrollE: 'css;.page_css',
  3207. forceHTTPS: true,
  3208. interval: 500,
  3209. scrollD: 100
  3210. },
  3211. function: {
  3212. bF: pageElems => { // 插入前函数(移除下一页底部的 "更多相关内容请关注:xxx" 文字 + 加载图片)
  3213. pageElems.forEach(function (one) {if (one.tagName === 'P' && one.textContent.indexOf('更多相关内容请关注') > -1) {one.style.display = 'none';}});
  3214. return src_bF(pageElems, [0, 'img[data-src]', 'data-src'])
  3215. }
  3216. }
  3217. }, // 游民星空 - 攻略
  3218. nexusmods: {
  3219. host: 'www.nexusmods.com',
  3220. functionS: ()=> {locationC = true; if (!(lp == '/' || indexOF(/\/mods\/\d+/))) {curSite = DBSite.nexusmods;}},
  3221. history: false,
  3222. pager: {
  3223. nextL: nexusmods_nextL,
  3224. pageE: 'css;ul.tiles > li',
  3225. replaceE: 'css;.pagination',
  3226. scrollD: 4000
  3227. },
  3228. function: {
  3229. bF: nexusmods_bF
  3230. }
  3231. }, // NexusMods
  3232. curseforge: {
  3233. host: 'www.curseforge.com',
  3234. pager: {
  3235. nextL: 'css;.pagination-next > a',
  3236. pageE: 'css;div.my-2',
  3237. replaceE: 'css;.pagination',
  3238. scrollD: 2500
  3239. }
  3240. }, // CurseForge
  3241. steamcommunity_workshop: {
  3242. host: 'steamcommunity.com',
  3243. functionS: ()=> {if (indexOF('/workshop/browse')) {curSite = DBSite.steamcommunity_workshop;} else if (indexOF(/eventcomments\/\d/)) {curSite = DBSite.steamcommunity_eventcomments;}},
  3244. pager: {
  3245. nextL: '//a[@class="pagebtn" and text()=">"]',
  3246. pageE: 'css;.workshopBrowseItems > *',
  3247. replaceE: 'css;.workshopBrowsePaging',
  3248. scriptT: 2,
  3249. scrollD: 1500
  3250. }
  3251. }, // Steam 创意工坊 - 项目列表
  3252. steamcommunity_eventcomments: {
  3253. style: '.forum_paging_controls {display: none !important;}',
  3254. pager: {
  3255. nextL: ()=> getNextUP('ctp=', /ctp=\d+/, location.pathname, '2', getCSS('span.commentthread_pagelinks > a:last-child').textContent),
  3256. pageE: 'css;.commentthread_comments > .commentthread_comment',
  3257. replaceE: 'css;.forum_paging .forum_paging_summary',
  3258. scriptT: 1,
  3259. scrollD: 1500
  3260. }
  3261. }, // Steam 社区 - 活动评论
  3262. yikm: {
  3263. host: 'www.yikm.net',
  3264. pager: {
  3265. nextL: '//ul[@class="pager"]//a[text()="下一页"]',
  3266. pageE: '//h2[contains(text(), "所有游戏") or contains(text(), "搜索结果")]/following-sibling::div[1]/div',
  3267. replaceE: 'css;ul.pager',
  3268. scrollD: 1500
  3269. }
  3270. }, // 小霸王其乐无穷
  3271. switch520: {
  3272. host: 'switch520.com',
  3273. functionS: ()=> {if (!indexOF('.html')) {curSite = DBSite.switch520;}},
  3274. pager: {
  3275. nextL: 'css;a.next',
  3276. pageE: 'css;.row.posts-wrapper > div',
  3277. replaceE: 'css;ul.page-numbers',
  3278. scrollD: 1000
  3279. }
  3280. }, // Switch520
  3281. cs_rin_ru: {
  3282. host: 'cs.rin.ru',
  3283. functionS: ()=> {if (lp == '/forum/viewforum.php') {
  3284. curSite = DBSite.cs_rin_ru;
  3285. } else if (lp == '/forum/search.php') {
  3286. curSite = DBSite.cs_rin_ru_search;
  3287. if (indexOF('sr=posts', 's')) curSite.pager.pageE = 'css;#wrapcentre > form > table.tablebg > tbody > tr[class^="row"]'
  3288. } else if (lp == '/forum/viewtopic.php' && GM_getValue('menu_thread')) {
  3289. curSite = DBSite.cs_rin_ru_list;
  3290. }},
  3291. pager: {
  3292. nextL: '//td[@class="gensmall"][@align="right"]//a[text()="Next"]',
  3293. pageE: 'css;#pagecontent > table.tablebg > tbody > tr:not([align])',
  3294. replaceE: 'css;#pagecontent > table:first-child',
  3295. scrollD: 1500
  3296. },
  3297. function: {
  3298. bF: pageElems => { // 插入前函数(过滤置顶帖子)
  3299. for (let i = 0; i < pageElems.length; i++) {if (pageElems[i].textContent.replace(/\n| /g,'') === 'Topics') {pageElems.splice(0,i+1); break;}}
  3300. return pageElems
  3301. }
  3302. }
  3303. }, // cs.rin.ru - 各版块帖子列表
  3304. cs_rin_ru_list: {
  3305. pager: {
  3306. nextL: 'id("pageheader")/p[@class="gensmall"]//a[text()="Next"]',
  3307. pageE: 'css;#pagecontent > table.tablebg:not(:nth-last-child(2)):not(:nth-child(2))',
  3308. replaceE: 'css;#pagecontent >table:not(.tablebg), #pageheader p.gensmall',
  3309. scrollD: 2000
  3310. }
  3311. }, // cs.rin.ru - 帖子内
  3312. cs_rin_ru_search: {
  3313. pager: {
  3314. nextL: 'id("wrapcentre")/div[@class="nav"]//a[text()="Next"]',
  3315. pageE: 'css;#wrapcentre > form > table.tablebg > tbody > tr[valign]',
  3316. replaceE: 'css;#wrapcentre > div',
  3317. scrollD: 1500
  3318. }
  3319. }, // cs.rin.ru - 搜索页
  3320. crackhub: {
  3321. host: 'crackhub.site',
  3322. style: 'html.wp-dark-mode-active .inside-article {background-color: var(--wp-dark-mode-bg);}',
  3323. pager: {
  3324. nextL: 'css;a.next.page-numbers',
  3325. pageE: 'css;article[id^="post-"]',
  3326. replaceE: 'css;nav.paging-navigation',
  3327. scrollD: 2000
  3328. }
  3329. }, // Crackhub213
  3330. fitgirl: {
  3331. host: 'fitgirl-repacks.site',
  3332. pager: {
  3333. nextL: 'css;a.next.page-numbers',
  3334. pageE: 'css;article[id^="post-"]',
  3335. replaceE: 'css;nav.paging-navigation',
  3336. scrollD: 2500
  3337. }
  3338. }, // FitGirl Repacks
  3339. bilibili_search: {
  3340. host: 'search.bilibili.com',
  3341. functionS: ()=> {
  3342. locationC = true;
  3343. if (lp == '/all' || lp == '/video') {
  3344. curSite = DBSite.bilibili_search;
  3345. } else if (lp == '/article') {
  3346. curSite = DBSite.bilibili_search_article;
  3347. }
  3348. },
  3349. retry: 100,
  3350. pager: {
  3351. nextL: bilibili_search_nextL,
  3352. pageE: '//ul[contains(@class, "video-list")]/li | //script[contains(text(), "window.__INITIAL_STATE__")]',
  3353. insertP: ['css;ul.video-list', 3],
  3354. replaceE: 'css;ul.pages',
  3355. scriptT: 2,
  3356. scrollD: 1000
  3357. },
  3358. function: {
  3359. bF: bilibili_search_bF,
  3360. aF: bilibili_search_aF
  3361. }
  3362. }, // B 站(Bilibili) - 搜索页 - 视频
  3363. bilibili_search_article: {
  3364. retry: 100,
  3365. pager: {
  3366. nextL: bilibili_search_nextL,
  3367. pageE: 'css;li.article-item',
  3368. replaceE: 'css;ul.pages',
  3369. //scriptT: 2,
  3370. scrollD: 1000
  3371. }
  3372. }, // B 站(Bilibili) - 搜索页 - 专栏
  3373. cupfox: {
  3374. host: 'www.cupfox.com',
  3375. pager: {
  3376. type: 2,
  3377. nextL: 'css;.load-more',
  3378. nextText: '点击加载更多',
  3379. scrollD: 700
  3380. }
  3381. }, // 茶杯狐
  3382. novipnoad: {
  3383. host: 'www.novipnoad.com',
  3384. functionS: ()=> {if (lp != '/' && !indexOF('.html')) {curSite = DBSite.novipnoad;}},
  3385. pager: {
  3386. nextL: 'css;a.nextpostslink',
  3387. pageE: 'css;.video-listing-content .row > div',
  3388. replaceE: 'css;.wp-pagenavi',
  3389. scrollD: 1500
  3390. },
  3391. function: {
  3392. bF: src_bF,
  3393. bFp: [0, 'img[data-original]', 'data-original']
  3394. }
  3395. }, // NO视频
  3396. ddrk: {
  3397. host: ['ddrk.me', 'ddys.tv'],
  3398. functionS: ()=> {if (lp == '/' || indexOF(/\/(category|tag)\//)) {curSite = DBSite.ddrk;}},
  3399. pager: {
  3400. nextL: 'css;a.next',
  3401. pageE: 'css;.post-box-list > article',
  3402. replaceE: 'css;.pagination_wrap',
  3403. scrollD: 1500
  3404. }
  3405. }, // 低端影视
  3406. nfmovies: {
  3407. host: 'www.nfmovies.com',
  3408. functionS: ()=> {if (lp == '/search.php' || indexOF('/list/')) {curSite = DBSite.nfmovies;}},
  3409. pager: {
  3410. nextL: '//ul[contains(@class, "myui-page")]/li/a[text()="下一页"]',
  3411. pageE: 'css;ul.myui-vodlist > li',
  3412. replaceE: 'css;ul.myui-page',
  3413. scrollD: 1500
  3414. },
  3415. function: {
  3416. bF: src_bF,
  3417. bFp: [1, 'a[data-original]', 'data-original']
  3418. }
  3419. }, // 奈菲影视
  3420. zxzj: {
  3421. host: ['www.zxzj.me', 'www.zxzj.fun'],
  3422. functionS: ()=> {if (lp != '/' && !indexOF('/detail/') && !indexOF('/video/')) {curSite = DBSite.zxzj;}},
  3423. style: 'div.stui-page__all {display: none !important;}',
  3424. pager: {
  3425. nextL: '//ul[contains(@class, "stui-page__item")]//a[text()="下一页"]',
  3426. pageE: 'css;ul.stui-vodlist > li',
  3427. replaceE: 'css;ul.stui-page__item',
  3428. scrollD: 1000
  3429. },
  3430. function: {
  3431. bF: src_bF,
  3432. bFp: [1, 'a[data-original]', 'data-original']
  3433. }
  3434. }, // 在线之家
  3435. enlienli: {
  3436. host: 'enlienli.com',
  3437. functionS: ()=> {if (indexOF('/show/') || indexOF('/search')) {curSite = DBSite.enlienli;}},
  3438. pager: {
  3439. nextL: 'css;a.page-number.page-next',
  3440. pageE: 'css;.module-items > *',
  3441. replaceE: 'css;#page',
  3442. scrollD: 1000
  3443. },
  3444. function: {
  3445. bF: src_bF,
  3446. bFp: [0, 'img[data-src]', 'data-src']
  3447. }
  3448. }, // 嗯哩嗯哩
  3449. mjw91: {
  3450. host: 'mjw91.com',
  3451. functionS: ()=> {if (!indexOF('/video/') || !indexOF('/vplay/')) {curSite = DBSite.mjw91;}},
  3452. pager: {
  3453. nextL: 'css;.next-page > a',
  3454. pageE: 'css;.m-movies > article',
  3455. replaceE: 'css;.pagination',
  3456. scrollD: 1500
  3457. },
  3458. function: {
  3459. bF: src_bF,
  3460. bFp: [0, 'img[data-original]', 'data-original']
  3461. }
  3462. }, // 91 美剧网
  3463. zhenbuka: {
  3464. host: ['www.zhenbuka3.com', 'www.zhenbuka5.com'],
  3465. functionS: ()=> {if (indexOF('/vodtype/')) {curSite = DBSite.zhenbuka;}},
  3466. pager: {
  3467. nextL: '//ul[contains(@class, "stui-page")]/li/a[text()="下一页"]',
  3468. pageE: 'css;ul.stui-vodlist > li',
  3469. replaceE: 'css;ul.stui-page',
  3470. scrollD: 1500
  3471. },
  3472. function: {
  3473. bF: src_bF,
  3474. bFp: [1, 'a[data-original]', 'data-original']
  3475. }
  3476. }, // 真不卡影院
  3477. zzzfun: {
  3478. host: 'www.zzzfun.com',
  3479. functionS: ()=> {
  3480. if (indexOF('/vod_type') || indexOF('/vod_show')) {
  3481. curSite = DBSite.zzzfun;
  3482. } else if (indexOF('/vod_search')) {
  3483. curSite = DBSite.zzzfun_search;
  3484. }},
  3485. pager: {
  3486. nextL: 'css;#page a[title="下一页"]',
  3487. pageE: 'css;ul.search-result > a',
  3488. replaceE: 'css;#page',
  3489. scrollD: 1000
  3490. },
  3491. function: {
  3492. bF: src_bF,
  3493. bFp: [0, 'img[data-original]', 'data-original']
  3494. }
  3495. }, // ZzzFun 动漫
  3496. zzzfun_search: {
  3497. pager: {
  3498. nextL: 'css;#page a[title="下一页"]',
  3499. pageE: 'css;ul.show-list > li',
  3500. replaceE: 'css;#page',
  3501. scrollD: 1000
  3502. },
  3503. function: {
  3504. bF: src_bF,
  3505. bFp: [0, 'img[data-original]', 'data-original']
  3506. }
  3507. }, // ZzzFun 动漫 - 搜索页
  3508. tucao: {
  3509. host: 'www.tucao.one',
  3510. functionS: ()=> {if (indexOF('/list/')) {
  3511. curSite = DBSite.tucao;
  3512. } else if (indexOF('search', 's')) {
  3513. curSite = DBSite.tucao_search;
  3514. }},
  3515. pager: {
  3516. nextL: 'css;.pagego a',
  3517. pageE: 'css;.list > ul > li',
  3518. replaceE: 'css;.newpages, .pagego, #float_show',
  3519. scrollD: 1000
  3520. }
  3521. }, // 吐槽弹幕网
  3522. tucao_search: {
  3523. pager: {
  3524. nextL: '//a[@class="a1"][contains(text(), "下一页")]',
  3525. pageE: 'css;.search_list > *',
  3526. replaceE: 'css;.pages',
  3527. scrollD: 1000
  3528. }
  3529. }, // 吐槽弹幕网 - 搜索页
  3530. mandao: {
  3531. host: 'www.mandao.tv',
  3532. functionS: ()=> {if (lp != '/' && !indexOF('/man')) {
  3533. curSite = DBSite.mandao;
  3534. }},
  3535. pager: {
  3536. nextL: '//div[contains(@class, "page")]/a[text()=">"]',
  3537. pageE: 'css;.index-tj > ul > li',
  3538. replaceE: 'css;.page',
  3539. scrollD: 1000
  3540. },
  3541. function: {
  3542. bF: src_bF,
  3543. bFp: [0, 'img[data-original]', 'data-original']
  3544. }
  3545. }, // 漫岛动漫
  3546. yxdm: {
  3547. host: 'www.yxdm.li',
  3548. functionS: ()=> {if (indexOF('/search') || indexOF('/category') || indexOF('/resource')) {curSite = DBSite.yxdm;}},
  3549. pager: {
  3550. nextL: '//a[@class="nextPage" or text()="下一页"]',
  3551. pageE: 'css;.dhnew > ul > li',
  3552. replaceE: 'css;.pagelist',
  3553. scrollD: 2000
  3554. }
  3555. }, // 怡萱动漫
  3556. nicotv: {
  3557. host: 'www.nicotv.me',
  3558. functionS: ()=> {if (indexOF('/search') || indexOF('/type')) {curSite = DBSite.nicotv;}},
  3559. pager: {
  3560. nextL: '//ul[contains(@class, "pagination ")]//a[text()="»"]',
  3561. pageE: 'css;ul.list-unstyled > li',
  3562. replaceE: 'css;ul.pagination ',
  3563. scrollD: 1000
  3564. },
  3565. function: {
  3566. bF: src_bF,
  3567. bFp: [0, 'img[data-original]', 'data-original']
  3568. }
  3569. }, // 妮可动漫
  3570. yhdm: {
  3571. host: ['www.imomoe.la', 'www.imomoe.live'],
  3572. functionS: ()=> {if (indexOF('/list/')) {
  3573. curSite = DBSite.yhdm;
  3574. } else if (lp == '/so.asp' || lp == '/search.asp') {
  3575. curSite = DBSite.yhdm_;
  3576. }},
  3577. pager: {
  3578. nextL: '//div[@class="pages"]/a[text()="下一页"]',
  3579. pageE: 'css;#contrainer > .img> ul > li',
  3580. replaceE: 'css;.pages',
  3581. scrollD: 1000
  3582. }
  3583. }, // 樱花动漫
  3584. yhdm_: {
  3585. pager: {
  3586. nextL: '//div[@class="pages"]/a[text()="下一页"]',
  3587. pageE: 'css;#contrainer .fire .pics > ul > li',
  3588. replaceE: 'css;.pages',
  3589. scrollD: 1000
  3590. }
  3591. }, // 樱花动漫 - 搜索页等
  3592. agefans: {
  3593. host: ['www.agemys.com', 'www.age.tv'],
  3594. functionS: ()=> {if (indexOF('/catalog/') || lp == '/search') {
  3595. curSite = DBSite.agefans;
  3596. } else if (lp == '/recommend' || lp == '/update') {
  3597. curSite = DBSite.agefans_;
  3598. } else if (lp == '/rank') {
  3599. curSite = DBSite.agefans_rank;
  3600. }},
  3601. pager: {
  3602. nextL: 'id("container")//div[@class="blockcontent"]/div[@style][not(@class)]/li/a[contains(text(), "下一页")]',
  3603. pageE: 'css;#container .blockcontent1 > div',
  3604. replaceE: 'css;#container .blockcontent > div[style]:not([class])',
  3605. scrollD: 1000
  3606. }
  3607. }, // AGE 动漫 - 全部/搜索
  3608. agefans_: {
  3609. pager: {
  3610. nextL: 'id("container")//div[@class="blockcontent"]/div[@style][not(@class)]/li/a[contains(text(), "下一页")]',
  3611. pageE: 'css;#container .blockcontent > ul > li',
  3612. replaceE: 'css;#container .blockcontent > div[style]:not([class])',
  3613. scrollD: 1000
  3614. }
  3615. }, // AGE 动漫 - 其他页
  3616. agefans_rank: {
  3617. pager: {
  3618. nextL: 'id("container")/ul[@style][not(@class)]/li/a[contains(text(), "下一页")]',
  3619. pageE: 'css;#container > .div_right .blockcontent.div_right_r_3 > ul',
  3620. replaceE: 'css;#container > ul[style]:not([class])',
  3621. scrollD: 1000
  3622. }
  3623. }, // AGE 动漫 - 排行榜
  3624. dm233: {
  3625. host: 'www.dm233.cc',
  3626. functionS: ()=> {if (indexOF('/catalog/') || lp == '/recommend/' || lp == '/search') {
  3627. curSite = DBSite.dm233;
  3628. } else if (lp == '/article/') {
  3629. curSite = DBSite.dm233_article;
  3630. } else if (lp == '/rank/') {
  3631. curSite = DBSite.dm233_rank;
  3632. }},
  3633. pager: {
  3634. nextL: '//div[@class="pagelist"]//a[contains(text(), "下一页") or contains(text(), "下一頁")]',
  3635. pageE: 'css;.dhnew ul > li',
  3636. replaceE: 'css;.pagelist',
  3637. scrollD: 1000
  3638. }
  3639. }, // 233 动漫
  3640. dm233_article: {
  3641. pager: {
  3642. nextL: '//div[@class="pagelist"]//a[contains(text(), "下一页") or contains(text(), "下一頁")]',
  3643. pageE: 'css;.xgyd ul > li',
  3644. replaceE: 'css;.pagelist',
  3645. scrollD: 1000
  3646. }
  3647. }, // 233 动漫 - 动漫情报/资讯
  3648. dm233_rank: {
  3649. pager: {
  3650. nextL: '//div[@class="pagelist"]//a[contains(text(), "下一页") or contains(text(), "下一頁")]',
  3651. pageE: 'css;.side-update.normal-wai > .normal-nei',
  3652. replaceE: 'css;.pagelist',
  3653. scrollD: 1000
  3654. }
  3655. }, // 233 动漫 - 排行榜
  3656. anime1: {
  3657. host: 'anime1.me',
  3658. functionS: ()=> {if (indexOF('s=', 's')) {curSite = DBSite.wp_nav_navigation;} else if (lp == '/') {curSite = DBSite.anime1;}},
  3659. history: false,
  3660. pager: {
  3661. type: 4,
  3662. nextL: ()=> { // 获取下一页内容(叠加)
  3663. let next = getCSS('a.paginate_button.next');
  3664. if (next && next.className.indexOf('disabled') === -1) {
  3665. let oldList = getCSS('#table-list > tbody').innerHTML;
  3666. if (oldList) {next.click(); pageNum.now = pageNum._now + 1; getCSS('#table-list > tbody').insertAdjacentHTML('afterbegin', oldList);}
  3667. }
  3668. },
  3669. interval: 500,
  3670. scrollD: 800
  3671. }
  3672. }, // Anime1
  3673. yinfans: {
  3674. host: /www\.yinfans\./,
  3675. style: '#post_container {height: auto !important;} #post_container > li {position: static !important; float: left !important; height: 620px !important;}',
  3676. pager: {
  3677. nextL: 'css;a.next',
  3678. pageE: 'css;#post_container > li',
  3679. replaceE: 'css;.pagination',
  3680. scrollD: 1500
  3681. }
  3682. }, // 音范丝
  3683. btbtt: {
  3684. host: /btbtt/,
  3685. pager: {
  3686. nextL: '//div[@class="page"]/a[contains(text(), "▶") or contains(text(), "下一页")]',
  3687. pageE: 'css;#threadlist > *',
  3688. replaceE: 'css;.page',
  3689. scrollD: 2000
  3690. }
  3691. }, // BT 之家
  3692. bdys: {
  3693. host: 'www.bd2020.com',
  3694. functionS: ()=> {if (lp != '/' && !indexOF(/\/\d+\.htm/)) {curSite = DBSite.bdys;}},
  3695. pager: {
  3696. type: 2,
  3697. nextL: 'css;div.layui-flow-more > a',
  3698. nextText: '加载更多',
  3699. scrollD: 1000
  3700. }
  3701. }, // BD 影视
  3702. gaoqing_fm: {
  3703. host: 'gaoqing.fm',
  3704. pager: {
  3705. type: 2,
  3706. nextL: 'css;.col-md-12 > a, #loadmore > a',
  3707. interval: 1500,
  3708. scrollD: 1000
  3709. }
  3710. }, // 高清电台
  3711. yyds: {
  3712. host: 'yyds.fans',
  3713. functionS: ()=> {if (location.search != '' && !indexOF('p=', 's')) {curSite = DBSite.yyds;}},
  3714. pager: {
  3715. nextL: 'css;a.next.page-numbers',
  3716. pageE: 'css;.list-grouped > div',
  3717. replaceE: 'css;nav.pagination',
  3718. scrollD: 1100
  3719. }
  3720. }, // YYDS 电影
  3721. kisssub: {
  3722. host: ['www.kisssub.org','www.comicat.org', /(share|www)\.acgnx\./],
  3723. pager: {
  3724. nextL: 'css;a.nextprev:last-of-type',
  3725. pageE: 'css;#data_list > tr',
  3726. replaceE: 'css;.pages',
  3727. scrollD: 2500
  3728. }
  3729. }, // 爱恋动漫 / 漫猫动漫 / 末日动漫
  3730. dmhy: {
  3731. host: ['share.dmhy.org', 'dmhy.anoneko.com'],
  3732. pager: {
  3733. nextL: '//div[@class="nav_title"]/a[contains(text(), "下一")]',
  3734. pageE: 'css;#topic_list > tbody > tr',
  3735. replaceE: 'css;.nav_title',
  3736. scrollD: 1500
  3737. },
  3738. function: {
  3739. aF: ()=> {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');`;}
  3740. }
  3741. }, // 动漫花园
  3742. futaacg: {
  3743. host: /futaacg\./,
  3744. pager: {
  3745. nextL: 'css;ul.pagination a[rel="next"]',
  3746. pageE: 'css;.topic-list > div',
  3747. replaceE: 'css;ul.pagination',
  3748. scrollD: 1500
  3749. }
  3750. }, // 扶她动漫
  3751. acg_rip: {
  3752. host: 'acg.rip',
  3753. pager: {
  3754. nextL: 'css;li.next>a',
  3755. pageE: 'css;table.post-index > tbody > tr',
  3756. replaceE: 'css;ul.pagination',
  3757. scrollD: 1500
  3758. }
  3759. }, // ACG.RIP
  3760. bangumi: {
  3761. host: 'bangumi.moe',
  3762. functionS: ()=> {if (indexOF('/lite')) {curSite = DBSite.bangumi_lite;} else {curSite = DBSite.bangumi;}},
  3763. pager: {
  3764. type: 2,
  3765. nextL: 'css;[torrent-list="lattorrents"] button[ng-click="loadMore()"] ,[torrent-list="torrents"] button[ng-click="loadMore()"]',
  3766. interval: 1000,
  3767. scrollD: 1500
  3768. }
  3769. }, // 萌番组
  3770. bangumi_lite: {
  3771. pager: {
  3772. nextL: '//section/a[./span[contains(@class, "next")]]',
  3773. pageE: 'css;li.torrent-li',
  3774. replaceE: 'css;.page-btn-section',
  3775. scrollD: 2000
  3776. }
  3777. }, // 萌番组 lite
  3778. miobt: {
  3779. host: ['miobt.com', 'www.36dm.club'],
  3780. functionS: ()=> {curSite = DBSite.miobt; if (location.hostname === 'www.36dm.club') {curSite.pager.scrollD = 1000;}},
  3781. pager: {
  3782. nextL: '//a[@class="nextprev"][contains(text(), "〉") or contains(text(), "下一页") or contains(text(), "»")]',
  3783. pageE: 'css;#data_list > tr',
  3784. replaceE: 'css;.pages',
  3785. scrollD: 2000
  3786. }
  3787. }, // MioBT + 简单动漫
  3788. reimu: {
  3789. host: /\.reimu\./,
  3790. functionS: ()=> {if (lp == '/' || indexOF('/category') || indexOF('/tag')) curSite = DBSite.reimu},
  3791. pager: {
  3792. nextL: 'css;span.current+a.sfwppa-current-page',
  3793. pageE: 'css;article[id^="post-"]',
  3794. replaceE: 'css;.wp-pagenavi',
  3795. scrollD: 1500
  3796. }
  3797. }, // REIMU
  3798. hacg: {
  3799. host: /\.hacg\./,
  3800. functionS: ()=> {if (indexOF('/wp/') && !indexOF(/\d+\.html/)) curSite = DBSite.hacg},
  3801. pager: {
  3802. nextL: 'css;a.nextpostslink',
  3803. pageE: 'css;article[id^="post-"]',
  3804. replaceE: 'css;.wp-pagenavi',
  3805. scrollD: 1500
  3806. }
  3807. }, // HACG
  3808. nyaa: {
  3809. host: /nyaa\.si/,
  3810. pager: {
  3811. nextL: 'css;a[rel="next"], li.next > a',
  3812. pageE: 'css;table.torrent-list > tbody > tr',
  3813. replaceE: 'css;ul.pagination',
  3814. scrollD: 2000
  3815. }
  3816. }, // Nyaa
  3817. skrbt: {
  3818. host: /skrbt/,
  3819. functionS: ()=> {if (lp == '/search') curSite = DBSite.skrbt;},
  3820. pager: {
  3821. nextL: ()=> { // 获取下一页地址
  3822. let page = getCSS('a[onclick][aria-label="Next"]');
  3823. if (page) {page = /(?<=\()\d+(?=\))/.exec(page.onclick)[0];} else {return '';} // 获取下一页页码
  3824. if (page) return getNextF('css;#search-form').replace(/p=\d+/,'p=' + page)
  3825. return '';
  3826. },
  3827. pageE: 'css;div[class="row"] > .col-md-6 > ul',
  3828. insertP: ['css;nav[aria-label*="Page"]', 1],
  3829. replaceE: 'css;ul.pagination',
  3830. scrollD: 900
  3831. }
  3832. }, // SkrBT
  3833. _1337x: {
  3834. host: /1337x\./,
  3835. functionS: ()=> {if (indexOF('search/')) {curSite = DBSite._1337x;}},
  3836. pager: {
  3837. nextL: '//div[@class="pagination"]//a[text()=">>"]',
  3838. pageE: 'css;table.table-list > tbody > tr',
  3839. replaceE: 'css;.pagination',
  3840. scrollD: 1200
  3841. }
  3842. }, // 1337x
  3843. rarbg: {
  3844. host: /rarbg/,
  3845. functionS: ()=> {if (lp == '/torrents.php') {curSite = DBSite.rarbg; curSite.function.bF(getAllCSS('table.lista2t tr.lista2'));}},
  3846. style: 'html::-webkit-scrollbar {height: 0 !important;}',
  3847. pager: {
  3848. nextL: 'css;#pager_links > a[title="next page"]',
  3849. pageE: 'css;table.lista2t tr.lista2',
  3850. replaceE: 'css;#pager_links',
  3851. scrollD: 1200
  3852. },
  3853. function: {
  3854. bF: pageElems => { // 插入前函数(鼠标指向显示封面)
  3855. pageElems.forEach(function (one) {
  3856. one.querySelectorAll('td > a[onmouseover][onmouseout]').forEach(function (now) {
  3857. now.parentElement.parentElement.setAttribute('onmouseover', now.getAttribute('onmouseover')); now.removeAttribute('onmouseover');
  3858. now.parentElement.parentElement.setAttribute('onmouseout', now.getAttribute('onmouseout')); now.removeAttribute('onmouseout');
  3859. });
  3860. });
  3861. return pageElems
  3862. }
  3863. }
  3864. }, // RARBG
  3865. /*thepiratebay: {
  3866. host: 'thepiratebay.org',
  3867. functionS: ()=> {if (lp == '/search.php') {curSite = DBSite.thepiratebay;}},
  3868. pager: {
  3869. type: 6,
  3870. nextL: 'css;center > b+a[href]',
  3871. pageE: 'css;ol#torrents > li[id]',
  3872. replaceE: 'css;center',
  3873. loadTime: 1000,
  3874. scrollD: 1500
  3875. }
  3876. },*/ // thepiratebay
  3877. subdh: {
  3878. host: 'subdh.com',
  3879. functionS: ()=> {if (lp == '/' || indexOF('/list/new')) {curSite = DBSite.subdh;} else if (indexOF('/search')) {curSite = DBSite.subdh_search;}},
  3880. pager: {
  3881. nextL: '//a[@class="page-link"][contains(text(), "下一页")]',
  3882. pageE: 'css;.col-lg-9 .bg-white.shadow-sm.rounded-3 > .row.gx-0',
  3883. replaceE: 'css;ul.pagination',
  3884. scrollD: 1000
  3885. }
  3886. }, // SubDH
  3887. subdh_search: {
  3888. pager: {
  3889. nextL: '//a[@class="page-link"][contains(text(), "下一页")]',
  3890. pageE: 'css;.col-lg-9 .bg-white.shadow-sm.rounded-3',
  3891. insertP: ['css;nav[aria-label="pagination"]', 1],
  3892. replaceE: 'css;ul.pagination',
  3893. scrollD: 1000
  3894. }
  3895. }, // SubDH - 搜索页
  3896. mini4k: {
  3897. host: 'www.mini4k.com',
  3898. functionS: ()=> {if (indexOF('/forum') && !indexOF('/topic')) {curSite = DBSite.mini4k; curSite.pager.pageE = 'css;#block-white-content tbody > tr'} else if (lp != '/' && !indexOF(/\/\d{3,}/)) {curSite = DBSite.mini4k;};},
  3899. pager: {
  3900. nextL: 'css;a.pager__item--next',
  3901. pageE: 'css;div[class*="-item-list"] > ul > li',
  3902. replaceE: 'css;.pagination',
  3903. scrollD: 2000
  3904. }
  3905. }, // MINI4K
  3906. bthaha: {
  3907. host: /bthaha/,
  3908. functionS: ()=> {if (indexOF('/search/')) {
  3909. curSite = DBSite.bthaha;
  3910. getAllCSS('[id^="list_top"], [id^="list_bottom"]').forEach(function (one) {one.parentElement.parentElement.hidden = true;});
  3911. }},
  3912. style: '[id^="list_top"], [id^="list_bottom"] {display: none !important;}',
  3913. pager: {
  3914. nextL: '//ul[@class="pagination"]/li/a[contains(text(), "下一页")]',
  3915. pageE: 'css;table.table > tbody > tr',
  3916. replaceE: 'css;ul.pagination',
  3917. scrollD: 1000
  3918. },
  3919. function: {
  3920. bF: pageElems => { // 插入前函数(隐藏底部元素)
  3921. pageElems.forEach(function (one) {let now = one.querySelector('[id^="list_top"], [id^="list_bottom"]'); if (now) {one.hidden = true;};});
  3922. return pageElems
  3923. }
  3924. }
  3925. }, // BTHaha
  3926. a4k: {
  3927. host: 'www.a4k.net',
  3928. functionS: ()=> {if (!indexOF('/subtitle/')) {curSite = DBSite.a4k;};},
  3929. pager: {
  3930. nextL: 'css;a.pager__item--next',
  3931. pageE: 'css;ul.list > li',
  3932. replaceE: 'css;.pagination',
  3933. scrollD: 1000
  3934. }
  3935. }, // A4k 字幕网(字幕)
  3936. assrt: {
  3937. host: 'assrt.net',
  3938. functionS: ()=> {if (lp === '/sub/') {curSite = DBSite.assrt;} else if (indexOF('/list/')) {curSite = DBSite.assrt_list;}},
  3939. pager: {
  3940. nextL: ()=> getNextEP('css;#pl-current+a[href]:not([id])', 'page=', /page=\d+/),
  3941. pageE: 'css;.resultcard > div:not(#top-banner):not(#bottom-banner):not(.pagelinkcard)',
  3942. insertP: ['css;.pagelinkcard', 1],
  3943. replaceE: 'css;.pagelinkcard',
  3944. scrollD: 1000
  3945. }
  3946. }, // 射手网(字幕)
  3947. assrt_list: {
  3948. pager: {
  3949. nextL: '//a[@id="pl-nav" and text()=">"]',
  3950. pageE: 'css;#resultsdiv > .subitem:not([id])',
  3951. replaceE: 'css;.pagelinkcard',
  3952. scrollD: 1000
  3953. }
  3954. }, // 射手网(字幕)
  3955. subhd: {
  3956. host: 'subhd.tv',
  3957. functionS: ()=> {if (lp == '/forum/forum') {
  3958. curSite = DBSite.subhd_forum;
  3959. } else if (lp != '/' && lp != '/zu' && !indexOF('/a/') && !indexOF('/d/') && !indexOF('/forum/')) {
  3960. curSite = DBSite.subhd;
  3961. }},
  3962. pager: {
  3963. nextL: '//a[@class="page-link"][contains(text(), "下一页")]',
  3964. pageE: 'css;.bg-white.shadow-sm.rounded-3',
  3965. insertP: ['css;nav.clearfix', 1],
  3966. replaceE: 'css;nav.clearfix',
  3967. scrollD: 1000
  3968. }
  3969. }, // SubHD(字幕)
  3970. subhd_forum: {
  3971. pager: {
  3972. nextL: '//a[@class="page-link"][contains(text(), "下一页")]',
  3973. pageE: 'css;.bg-white.shadow-sm.rounded-3 > div',
  3974. replaceE: 'css;nav.clearfix',
  3975. scrollD: 800
  3976. }
  3977. }, // SubHD - forum(字幕)
  3978. manben: {
  3979. host: 'www.manben.com',
  3980. functionS: ()=> {if (indexOF(/\/m\d+/)) {
  3981. if (getCookie('showtype') != '2') {
  3982. document.cookie='showtype=2; expires=Thu, 18 Dec 2031 12:00:00 GMT; path=/'; // 写入 Cookie 开启 [垂直阅读] 模式
  3983. location.reload(); // 刷新网页
  3984. }
  3985. curSite = DBSite.mhxqiu;
  3986. }}
  3987. }, // 漫本
  3988. haoman: {
  3989. host: ['www.haoman6.com', 'www.g-lens.com'],
  3990. functionS: ()=> {
  3991. if (indexOF('/chapter/')) {
  3992. curSite = DBSite.haoman;
  3993. if (location.hostname == 'www.g-lens.com') curSite.function.bFp = [0, 'img[data-echo]', 'data-echo']
  3994. } else if (indexOF('/comic/')) {
  3995. if (getCSS('.chapter__more')) getCSS('.chapter__more').click();
  3996. } else if (indexOF('/category/') || indexOF('/search')) {
  3997. curSite = DBSite.haoman_list;
  3998. }},
  3999. style: '.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;}',
  4000. pager: {
  4001. nextL: ()=> {if (getCSS('a.rd-aside__item.j-rd-next')) return location.origin + getCSS('a.rd-aside__item.j-rd-next').getAttribute('_href')},
  4002. pageE: 'css;.rd-article-wr > div',
  4003. replaceE: 'css;a.last-crumb, .rd-aside',
  4004. interval: 2000,
  4005. scrollD: 2000
  4006. },
  4007. function: {
  4008. bF: src_bF,
  4009. bFp: [0, 'img[dta-echo]', 'dta-echo']
  4010. }
  4011. }, // 好漫 6
  4012. haoman_list: {
  4013. pager: {
  4014. nextL: 'css;a.next',
  4015. pageE: 'css;.cate-comic-list > div',
  4016. replaceE: 'css;#Pagination',
  4017. scrollD: 1000
  4018. },
  4019. function: {
  4020. bF: src_bF,
  4021. bFp: [0, 'img[data-original]', 'data-original']
  4022. }
  4023. }, // 好漫 6 - 分类/搜索页
  4024. cartoonmad: {
  4025. host: ['www.cartoonmad.com','www.cartoonmad.cc'],
  4026. functionS: ()=> {if (indexOF('/comic/')) {
  4027. getCSS('body > table > tbody > tr:nth-child(4) > td > table > tbody > tr:first-child > td:first-child > a').href = 'javascript:void(0);'; // 清理图片上的链接
  4028. curSite = DBSite.cartoonmad;
  4029. } else if (lp != '/') {
  4030. curSite = DBSite.cartoonmad_list;
  4031. }},
  4032. style: '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;}',
  4033. pager: {
  4034. nextL: cartoonmad_nextL,
  4035. pageE: 'css;body > table > tbody > tr:nth-child(4) > td > table > tbody > tr:first-child > td:first-child img',
  4036. replaceE: 'css;body > table > tbody > tr:nth-child(2), body > table > tbody > tr:nth-child(5)',
  4037. scrollD: 2000
  4038. }
  4039. }, // 动漫狂
  4040. cartoonmad_list: {
  4041. pager: {
  4042. nextL: '//a[@class="pages"][contains(text(), "下一頁")]',
  4043. pageE: 'css;td[background="/image/content_box4.gif"]+td > table > tbody > tr',
  4044. replaceE: '//a[@class="pages"]/parent::td/parent::tr | //font[contains(text(), "目前在第")]',
  4045. scrollD: 1000
  4046. }
  4047. }, // 动漫狂 - 分类/搜索页
  4048. dongman: {
  4049. host: 'www.dongman.la',
  4050. functionS: ()=> {if (indexOF('/chapter/')) {
  4051. src_bF(getAllCSS('img.mdui-img-fluid[data-srcset]:not([src])'), [0, 'img[data-srcset]', 'data-srcset']);
  4052. curSite = DBSite.dongman;
  4053. } else if (indexOF('/detail/')) {
  4054. setTimeout(function(){getCSS('a#zhankai').click()}, 500)
  4055. } else if (indexOF('/manhua/')) {
  4056. curSite = DBSite.dongman_list;
  4057. }},
  4058. style: 'button.prePic, button.nextPic, footer, header, #left-drawer {display: none !important;} body, #app {padding: 0 !important;} .slick-track {width: 100% !important;} .lazyBox {width: 100%; display: inline-block;}',
  4059. pager: {
  4060. nextL: '//footer//a[./label[text()="下一章"]]',
  4061. pageE: 'css;.lazyBox',
  4062. insertP: ['css;.slick-track', 3],
  4063. replaceE: 'css;footer',
  4064. scrollD: 3000
  4065. },
  4066. function: {
  4067. bF: src_bF,
  4068. bFp: [0, 'img[data-srcset]', 'data-srcset']
  4069. }
  4070. }, // 动漫啦
  4071. dongman_list: {
  4072. pager: {
  4073. nextL: '//a[@class="GPageLink" and text()="下一页"]',
  4074. pageE: 'css;.cy_list_mh > ul',
  4075. replaceE: 'css;.NewPages',
  4076. scrollD: 2000
  4077. }
  4078. }, // 动漫啦 - 分类页
  4079. manhuacat: {
  4080. host: ['www.manhuacat.com', 'www.maofly.com'],
  4081. functionS: ()=> {if (indexOF(/\/manga\/\d+\/.+\.html/)) {
  4082. if (getCookie('is_pull') == 'true') { // 强制关闭 [下拉] 模式
  4083. document.cookie='is_pull=false; expires=Thu, 18 Dec 2031 12:00:00 GMT; path=/'; // 写入 Cookie 关闭 [下拉] 模式
  4084. location.reload(); // 刷新网页
  4085. }
  4086. setTimeout(manhuacat_init, 100);
  4087. curSite = DBSite.manhuacat;
  4088. } else if (indexOF('/list')) {
  4089. curSite = DBSite.manhuacat_list;
  4090. } else if (indexOF('/search') || indexOF('/update')) {
  4091. curSite = DBSite.manhuacat_search;
  4092. }},
  4093. style: '#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;}', // 隐藏不需要的元素,调整图片
  4094. pager: {
  4095. type: 4,
  4096. nextL: manhuacat_nextL,
  4097. insertP: ['css;.img-content', 3],
  4098. insertE: manhuacat_insertE,
  4099. replaceE: 'css;.comic-detail > .breadcrumb-bar, .comic-detail >h2.h4, .vg-r-data, body > script:not([src])',
  4100. interval: 2000,
  4101. scrollD: 3000
  4102. }
  4103. }, // 漫画猫
  4104. manhuacat_list: {
  4105. pager: {
  4106. nextL: '//div[contains(@class, "pagination")]//a[contains(text(), "下一页") or contains(text(), "下页")]',
  4107. pageE: 'css;.comic-main-section > *',
  4108. replaceE: 'css;.pagination',
  4109. scrollD: 1000
  4110. },
  4111. function: {
  4112. bF: src_bF,
  4113. bFp: [0, 'img[data-original]', 'data-original']
  4114. }
  4115. }, // 漫画猫 - 分类页
  4116. manhuacat_search: {
  4117. pager: {
  4118. nextL: '//div[contains(@class, "pagination")]//a[contains(text(), "下一页") or contains(text(), "下页")]',
  4119. pageE: 'css;.comic-main-section .row > div',
  4120. replaceE: 'css;.pagination',
  4121. scrollD: 1000
  4122. }
  4123. }, // 漫画猫 - 搜索页
  4124. manhuatai: {
  4125. host: 'www.manhuatai.net',
  4126. functionS: ()=> {if (indexOF('/manhua/')) {
  4127. curSite = DBSite.manhuatai;
  4128. } else if (indexOF('/fenlei_') || indexOF('/top_')) {
  4129. curSite = DBSite.manhuatai_list;
  4130. } else if (indexOF('/search')) {
  4131. curSite = DBSite.manhuatai_search;
  4132. }},
  4133. pager: {
  4134. nextL: '//div[contains(@class, "page")]//a[@href][contains(text(), "下一页") or contains(text(), "下一章")]',
  4135. pageE: 'css;#htmlContent p.img > img',
  4136. replaceE: 'css;.page, .title',
  4137. scrollD: 2000
  4138. }
  4139. }, // 漫画台
  4140. manhuatai_list: {
  4141. pager: {
  4142. nextL: 'css;#pagelink a.next',
  4143. pageE: 'css;.article-list',
  4144. replaceE: 'css;#pagelink',
  4145. scrollD: 1500
  4146. }
  4147. }, // 漫画台 - 分类页
  4148. manhuatai_search: {
  4149. pager: {
  4150. nextL: 'css;#pagelink a.next',
  4151. pageE: 'css;#content > table > tbody > tr:not([align])',
  4152. replaceE: 'css;#pagelink',
  4153. scrollD: 1500
  4154. }
  4155. }, // 漫画台 - 搜索页
  4156. manhuapi: {
  4157. host: 'www.manhuapi.com',
  4158. functionS: ()=> {if (indexOF('/chapter/')) {
  4159. curSite = DBSite.manhuapi;
  4160. } else if (!indexOF(/\/manhua\/\d+\.html/)) {
  4161. curSite = DBSite.manhuapi_list;
  4162. }},
  4163. pager: {
  4164. nextL: '//div[@class="page"]/a[text()="下一页" or text()="下一章"]',
  4165. pageE: 'css;.mh_list img[src]',
  4166. replaceE: 'css;.page',
  4167. scrollD: 2000
  4168. }
  4169. }, // 漫画皮
  4170. manhuapi_list: {
  4171. pager: {
  4172. nextL: '//div[@class="pages"]/a[text()="下一页"]',
  4173. pageE: 'css;.cy_list_mh > ul',
  4174. replaceE: 'css;.pages',
  4175. scrollD: 1500
  4176. }
  4177. }, // 漫画皮 - 分类页
  4178. imanhuaw: {
  4179. host: ['www.imanhuaw.net', 'www.imanhuaw.com', 'www.ccshwy.com'],
  4180. functionS: ()=> {
  4181. if (getCSS('.mh-search-result')) {
  4182. curSite = DBSite.imanhuaw_list;
  4183. } else if (getCSS('a#zhankai')) {
  4184. getCSS('a#zhankai').click();
  4185. } else if (indexOF(/\/\d{3,}\.html/)) {
  4186. curSite = DBSite.imanhuaw; imanhuaw_init();
  4187. }
  4188. },
  4189. style: '#sider-left, #sider-right, .main-left, .main-right, .w996.tc, .title > span {display: none !important;} #qTcms_Pic_middle img {max-width: 110%;height: auto;}',
  4190. pager: {
  4191. type: 4,
  4192. nextL: imanhuaw_nextL,
  4193. insertP: ['css;#qTcms_Pic_middle img:last-of-type', 4],
  4194. insertE: imanhuaw_insertE,
  4195. replaceE: 'css;.title h2',
  4196. interval: 2000,
  4197. scrollD: 3000
  4198. }
  4199. }, // 爱漫画 + 188漫画网
  4200. imanhuaw_list: {
  4201. pager: {
  4202. nextL: '//div[@class="NewPages"]//a[text()="下一页"]',
  4203. pageE: 'css;ul.mh-search-list > li',
  4204. replaceE: 'css;.NewPages',
  4205. scrollD: 1500
  4206. }
  4207. }, // 爱漫画 - 分类页
  4208. manhuagui: {
  4209. host: ['www.mhgui.com', 'tw.mhgui.com', 'www.manhuagui.com', 'tw.manhuagui.com'],
  4210. functionS: ()=> {if (indexOF(/\/comic\/\d+\/\d+\.html/)) {
  4211. if (!getXpath('//li[@class="pfunc"]/a[@class="current"][text()="双击" or text()="雙擊"]')) getXpath('//li[@class="pfunc"]/a[text()="双击" or text()="雙擊"]').click();
  4212. pausePage = false;
  4213. setTimeout(manhuagui_init, 100);
  4214. curSite = DBSite.manhuagui;
  4215. } else if (indexOF('list/') || indexOF('/s/')) {
  4216. curSite = DBSite.manhuagui_list;
  4217. }},
  4218. style: '.sub-btn, .tc {display: none !important;} #mangaBox > img {width: auto !important;height: auto !important;display: block !important;margin: 0 auto !important;max-width: 100% !important;}',
  4219. pager: {
  4220. type: 4,
  4221. nextL: manhuagui_nextL,
  4222. pageE: 'css;body > script:not([src])',
  4223. insertP: ['css;#mangaBox', 3],
  4224. insertE: manhuagui_insertE,
  4225. replaceE: 'css;title',
  4226. interval: 4000,
  4227. scrollD: 2500
  4228. }
  4229. }, // 漫画柜
  4230. manhuagui_list: {
  4231. pager: {
  4232. nextL: '//div[@class="pager"]/a[text()="下一页" or text()="下一頁"]',
  4233. pageE: 'css;.book-result > ul > li, .book-list > ul > li',
  4234. insertP: ['css;.book-result > ul, .book-list > ul', 3],
  4235. replaceE: 'css;.pager',
  4236. scrollD: 1500
  4237. },
  4238. function: {
  4239. bF: src_bF,
  4240. bFp: [0, 'img[data-src]', 'data-src']
  4241. }
  4242. }, // 漫画台 - 分类/搜索页
  4243. _36manga: {
  4244. host: ['36manga.com', 'www.36manga.com', '36manhua.com', 'www.36manhua.com'],
  4245. functionS: ()=> {if (indexOF(/\/manhua\/.+\/\d+\.html/)) {
  4246. if (localStorage.getItem('chapterScroll') != '"pagination"') {
  4247. localStorage.setItem('chapterScroll', '"pagination"'); location.reload()
  4248. } else {
  4249. pausePage = false;
  4250. setTimeout(_36manga_init, 100);
  4251. curSite = DBSite._36manga;
  4252. }
  4253. } else if (indexOF('list/') || indexOF('/search/')) {
  4254. curSite = DBSite._36manga_list;
  4255. }},
  4256. style: '#sider-left, #sider-right, p.img_info, .tc, .chapter-view + .w996 {display: none !important;} #images > img {width: auto !important;height: auto !important;display: block !important;margin: 0 auto !important;max-width: 100% !important;}',
  4257. pager: {
  4258. type: 4,
  4259. nextL: _36manga_nextL,
  4260. pageE: '//body/script[contains(text(), "chapterImages")]',
  4261. insertP: ['css;#images', 3],
  4262. insertE: _36manga_insertE,
  4263. replaceE: 'css;.title',
  4264. interval: 4000,
  4265. scrollD: 2500
  4266. }
  4267. }, // 36漫画
  4268. _36manga_list: {
  4269. pager: {
  4270. nextL: 'css;ul.pagination li.next a',
  4271. pageE: 'css;#contList',
  4272. replaceE: 'css;ul.pagination',
  4273. scrollD: 1500
  4274. }
  4275. }, // 36漫画 - 分类/搜索页
  4276. manhuadb: {
  4277. host: 'www.manhuadb.com',
  4278. functionS: ()=> {if (indexOF(/\/manhua\/\d+\/.+\.html/)) {
  4279. if (getCSS('img.img-fluid.show-pic')) getCSS('img.img-fluid.show-pic').style.display = 'none'; // 隐藏第一个图片(避免重复)
  4280. setTimeout(manhuadb_init, 100);
  4281. curSite = DBSite.manhuadb;
  4282. } else if (indexOF('/list')) {
  4283. curSite = DBSite.manhuacat_list;
  4284. } else if (indexOF('/search') || indexOF('/update')) {
  4285. curSite = DBSite.manhuacat_search;
  4286. }},
  4287. style: '.row.m-0.pt-3.ad_2_wrap, .row.m-0.ad_1_wrap, .pagination.justify-content-center, #left, #right {display: none !important;}',
  4288. pager: {
  4289. type: 4,
  4290. nextL: manhuadb_nextL,
  4291. pageE: 'css;body > script:not([type]):not([src]), .vg-r-data, ol.links-of-books.num_div',
  4292. insertP: ['css;.pjax-container', 3],
  4293. insertE: manhuadb_insertE,
  4294. interval: 5000,
  4295. scrollD: 3000
  4296. }
  4297. }, // 漫画 DB
  4298. hicomic: {
  4299. host: 'www.hicomic.net',
  4300. functionS: ()=> {if (indexOF('/chapters/')) {
  4301. setTimeout(hicomic_init, 100);
  4302. curSite = DBSite.hicomic;
  4303. }},
  4304. style: '.content {height: auto !important;} .footer, .left_cursor, .right_cursor, .finish {display: none !important;} .content > img {display: block !important;margin: 0 auto !important;}',
  4305. pager: {
  4306. type: 4,
  4307. nextL: hicomic_nextL,
  4308. insertP: ['css;.content', 3],
  4309. insertE: hicomic_insertE,
  4310. interval: 5000,
  4311. scrollD: 3000
  4312. }
  4313. }, // HiComic (嗨漫画)
  4314. dmzj: {
  4315. host: 'www.dmzj.com',
  4316. functionS: ()=> {if (indexOF('/view/')) {
  4317. if (getCookie('display_mode') != '1') { // 强制开启 [上下滚动阅读] 模式
  4318. document.cookie='display_mode=1; expires=Thu, 18 Dec 2031 12:00:00 GMT; path=/'; // 写入 Cookie 开启 [上下滚动阅读] 模式
  4319. location.reload(); // 刷新网页
  4320. }
  4321. setTimeout(function() {dmzj_init('.comic_wraCon > a > img')}, 100);
  4322. curSite = DBSite.dmzj;
  4323. } else if (indexOF('/category') || indexOF('/update')) {
  4324. curSite = DBSite.dmzj_list;
  4325. } else if (indexOF('/rank')) {
  4326. curSite = DBSite.dmzj_rank;
  4327. }},
  4328. style: '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;}', // 隐藏中间的页数信息
  4329. pager: {
  4330. type: 4,
  4331. nextL: 'css;span.next > a',
  4332. insertP: ['css;.comic_wraCon', 3],
  4333. insertE: dmzj_insertE,
  4334. replaceE: 'css;.wrap_last_mid, .wrap_last_head',
  4335. interval: 2000,
  4336. scrollD: 3000
  4337. }
  4338. }, // 动漫之家 - 原创
  4339. dmzj_list: {
  4340. style: '.wrap_mhlist_l.con_left, .wrap_list {height: auto!important;}',
  4341. pager: {
  4342. nextL: 'css;a.pg_next',
  4343. pageE: 'css;ul.list_con_li > li',
  4344. replaceE: 'css;.page',
  4345. scrollD: 1000
  4346. }
  4347. }, // 动漫之家 - 原创 - 分类页
  4348. dmzj_rank: {
  4349. style: '.wrap_mhlist_l.con_left {height: auto!important;}',
  4350. pager: {
  4351. nextL: 'css;a.pg_next',
  4352. pageE: 'css;.ph_r_con_li > div:not(.ad_column)',
  4353. replaceE: 'css;.page',
  4354. scrollD: 1000
  4355. }
  4356. }, // 动漫之家 - 原创 - 排行榜
  4357. dmzj_manhua: {
  4358. host: 'manhua.dmzj.com',
  4359. functionS: ()=> {if (indexOF(/\/\d+\.shtml/)) {
  4360. let chapterScroll = getCSS('#qiehuan_txt') // 强制为 [上下滚动阅读] 模式
  4361. if (chapterScroll && chapterScroll.textContent === '切换到上下滚动阅读') {chapterScroll.click();}
  4362. setTimeout(function() {dmzj_init('#center_box > .inner_img img[src]')}, 100);
  4363. curSite = DBSite.dmzj_manhua;
  4364. /*} else if (indexOF('/tags/')) {
  4365. curSite = DBSite.dmzj_manhua_list;*/
  4366. } else if (indexOF('/update')) {
  4367. curSite = DBSite.dmzj_manhua_update;
  4368. }},
  4369. style: '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;}', // 隐藏中间的页数信息
  4370. pager: {
  4371. type: 4,
  4372. nextL: 'css;#next_chapter',
  4373. insertP: ['css;#center_box', 3],
  4374. insertE: dmzj_manhua_insertE,
  4375. replaceE: 'css;.display_graybg',
  4376. interval: 2000,
  4377. scrollD: 3000
  4378. }
  4379. }, // 动漫之家 - 日漫
  4380. /*dmzj_manhua_list: {
  4381. pager: {
  4382. nextL: ()=> getNextUPN(/(?<=-)\d+(?=\.shtml)/, /-\d+\.shtml/, '-', '.shtml', '2', getCSS('#topage > option:last-child').value),
  4383. pageE: 'css;#search_list_div ul',
  4384. scrollD: 1500
  4385. }
  4386. },*/ // 动漫之家 - 日漫 - 分类页
  4387. dmzj_manhua_update: {
  4388. pager: {
  4389. nextL: '//div[@class="pages"]/a[contains(text(), "下一页")]',
  4390. pageE: 'css;.newpic_content > *:not(.pages)',
  4391. replaceE: 'css;.pages',
  4392. scrollD: 1000
  4393. }
  4394. }, //动漫之家 - 日漫 - 最新更新
  4395. acgn: {
  4396. host: 'comic.acgn.cc',
  4397. functionS: ()=> {
  4398. if (indexOF('/view-')) {
  4399. curSite = DBSite.acgn;
  4400. acgn_aF();
  4401. } else if (indexOF('/cate-') || indexOF('/pinyin-')) {
  4402. curSite = DBSite.acgn_list;
  4403. }
  4404. },
  4405. style: '.img1 {cursor: initial !important;}',
  4406. pager: {
  4407. nextL: 'css;#next_chapter',
  4408. pageE: 'css;.pic[_src]',
  4409. replaceE: 'css;[class^="display_"]',
  4410. interval: 2000,
  4411. scrollD: 2000
  4412. },
  4413. function: {
  4414. aF: acgn_aF
  4415. }
  4416. }, // 动漫戏说
  4417. acgn_list: {
  4418. pager: {
  4419. nextL: 'css;a[rel="next"]',
  4420. pageE: 'css;ul#display > li',
  4421. replaceE: 'css;#pagination',
  4422. scrollD: 1000
  4423. }
  4424. }, // 动漫戏说 - 分类页
  4425. ykmh: {
  4426. host: 'www.ykmh.com',
  4427. functionS: ()=> {if (indexOF(/\/\d+\.html/)) {
  4428. let chapterScroll = getCSS('#qiehuan_txt') // 强制为 [上下滚动阅读] 模式
  4429. if (localStorage.getItem('chapterScroll') != '"scroll"') {
  4430. localStorage.setItem('chapterScroll', '"scroll"'); location.reload()
  4431. } else {
  4432. setTimeout(ykmh_init, 100);
  4433. curSite = DBSite.ykmh;
  4434. }
  4435. } else if (indexOF('/list') || indexOF('/search')) {
  4436. curSite = DBSite.ykmh_list;
  4437. }},
  4438. style: 'p.img_info {display: none !important;} #images > img {display: block !important;margin: 0 auto !important; border: none !important; padding: 0 !important; max-width: 99% !important; height: auto !important;}',
  4439. pager: {
  4440. type: 4,
  4441. nextL: ykmh_nextL,
  4442. insertP: ['css;#images', 3],
  4443. insertE: ykmh_insertE,
  4444. replaceE: 'css;.head_title, span.head_wz',
  4445. interval: 2000,
  4446. scrollD: 3000
  4447. }
  4448. }, // 优酷漫画
  4449. ykmh_list: {
  4450. pager: {
  4451. nextL: 'css;li.next > a',
  4452. pageE: 'css;li.list-comic',
  4453. replaceE: 'css;ul.pagination',
  4454. scrollD: 1000
  4455. }
  4456. }, // 优酷漫画 - 分类页
  4457. copymanga: {
  4458. host: /copymanga\./,
  4459. functionS: ()=> {if (indexOF('/chapter/')) {
  4460. curSite = DBSite.copymanga;
  4461. } else if (indexOF('/comics')) {
  4462. curSite = DBSite.copymanga_list;
  4463. }},
  4464. style: '.upMember, .comicContainerAds, .footer {display: none !important;} body, html {height: auto !important;}',
  4465. iframe: true,
  4466. pager: {
  4467. type: 5,
  4468. nextL: 'css;.comicContent-next > a',
  4469. style: 'h4.header, h4.header +div[style*="fixed"] {display: none !important;}',
  4470. scrollD: 3000
  4471. }
  4472. }, // 拷贝漫画
  4473. copymanga_list: {
  4474. pager: {
  4475. nextL: 'css;li.next > a',
  4476. pageE: 'css;.exemptComic-box > div',
  4477. replaceE: 'css;ul.page-all',
  4478. scrollD: 1500
  4479. },
  4480. function: {
  4481. bF: src_bF,
  4482. bFp: [0, 'img[data-src]', 'data-src']
  4483. }
  4484. }, // 拷贝漫画 - 分类页
  4485. mhxqiu: {
  4486. host: /\.mhxqiu/,
  4487. functionS: ()=> {if (indexOF(/\/\d+\.html/)) { // 阅读页
  4488. curSite = DBSite.mhxqiu;
  4489. } else if (indexOF(/\/\d+\/$/)) { // 目录页
  4490. setTimeout(function(){if (getCSS('#zhankai')) getCSS('#zhankai').click();}, 500)
  4491. } else if (indexOF(/\/(sort|rank)\//)) { // 分类页
  4492. curSite = DBSite.mhxqiu_list;
  4493. }},
  4494. style: '.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;}',
  4495. pager: {
  4496. type: 4,
  4497. nextL: 'css;#mainControlNext',
  4498. insertP: ['css;#comicContain', 3],
  4499. insertE: mhxqiu_insertE,
  4500. replaceE: 'css;.main_control, h1.chaptername_title, span.title-comicHeading',
  4501. interval: 4000,
  4502. scrollD: 3000
  4503. }
  4504. }, // 漫画星球
  4505. mhxqiu_list: {
  4506. pager: {
  4507. nextL: '//div[@class="NewPages"]//a[contains(text(), "下一页")]',
  4508. pageE: 'css;.cy_list_mh > ul',
  4509. replaceE: 'css;.NewPages',
  4510. scrollD: 1000
  4511. }
  4512. }, // 漫画星球 - 分类页
  4513. fffdm: {
  4514. host: 'manhua.fffdm.com',
  4515. functionS: ()=> {if (location.pathname.split('/').length === 4) {curSite = DBSite.fffdm;}},
  4516. style: '#footer, #header {display: none !important;} #mhimg0 img {display: block !important;margin: 0 auto !important;}',
  4517. pager: {
  4518. type: 4,
  4519. nextL: '//a[contains(text(), "下一页") or contains(text(), "下一頁") or contains(text(), "下一话") or contains(text(), "下一話")]',
  4520. insertP: ['css;#mhimg0', 3],
  4521. insertE: fffdm_insertE,
  4522. replaceE: 'css;.navigation, #weizhi, h1',
  4523. scrollD: 2000
  4524. }
  4525. }, // 风之动漫
  4526. baozimh: {
  4527. host: ['www.webmota.com', 'cn.webmota.com', 'cn.baozimh.com'],
  4528. functionS: ()=> {
  4529. if (indexOF('/chapter/')) {
  4530. curSite = DBSite.baozimh;
  4531. } else if (indexOF('/comic/')) {
  4532. if (getCSS('#button_show_all_chatper')) getCSS('#button_show_all_chatper').click();
  4533. }},
  4534. style: '#footer, #header {display: none !important;} .header, .bottom-bar {opacity: 0.3;}',
  4535. pager: {
  4536. nextL: 'css;.next_chapter > a',
  4537. pageE: 'css;.comic-contain > amp-img',
  4538. replaceE: 'css;.next_chapter, .bottom-bar, .header .title',
  4539. scrollD: 2000
  4540. }
  4541. }, // 包子漫画
  4542. leyuman: {
  4543. host: 'www.leyuman.com',
  4544. functionS: ()=> {if (indexOF(/\/comic\/\d+\/\d+\.html/)) {
  4545. curSite = DBSite.leyuman;
  4546. setTimeout(leyuman_init, 100);
  4547. } else if (indexOF(/\/comic\/\d+\.html/)) {
  4548. setTimeout(function(){if (getCSS('#read-more')) getCSS('#read-more').click();}, 500)
  4549. } else {
  4550. curSite = DBSite.leyuman_list;
  4551. }},
  4552. style: '.mh_select, .mh_comicpic > p, mh_headpager {display: none !important;} .mh_comicpic > img{width: 100% !important; height: auto !important;}',
  4553. pager: {
  4554. type: 4,
  4555. nextL: 'css;#xurl',
  4556. insertP: ['css;.mh_comicpic', 3],
  4557. insertE: leyuman_insertE,
  4558. replaceE: 'css;.mh_headpager, .mh_readtitle',
  4559. interval: 3000,
  4560. scrollD: 3000
  4561. }
  4562. }, // 乐语漫画
  4563. leyuman_list: {
  4564. pager: {
  4565. nextL: '//a[@class="page-link"][contains(text(), "下一页")]',
  4566. pageE: 'css;.works_recommend.classification_works > ul',
  4567. replaceE: 'css;.paging',
  4568. scrollD: 1000
  4569. },
  4570. function: {
  4571. bF: src_bF,
  4572. bFp: [0, 'img[data-src]', 'data-src']
  4573. }
  4574. }, // 乐语漫画 - 分类页
  4575. _77mh: {
  4576. host: 'www.77mh.cc',
  4577. functionS: ()=> {if (indexOF(/\/\d+\.html/)) {
  4578. curSite = DBSite._77mh;
  4579. setTimeout(_77mh_init, 100);
  4580. } else if (indexOF('/colist_')) {
  4581. setTimeout(function(){if (getCSS('#listmore1, .listmore')) getCSS('#listmore1, .listmore').click();}, 500)
  4582. } else {
  4583. curSite = DBSite._77mh_list;
  4584. }},
  4585. style: '.page_num, #bdtopbot {display: none !important;} #comicImg > img {display: block !important;margin: 0 auto !important; border: none !important; padding: 0 !important; max-width: 99% !important; height: auto !important;}',
  4586. pager: {
  4587. type: 4,
  4588. nextL: _77mh_nextL,
  4589. insertP: ['css;#comicImg', 3],
  4590. insertE: _77mh_insertE,
  4591. interval: 3000,
  4592. scrollD: 2000
  4593. }
  4594. }, // 新新漫画
  4595. _77mh_list: {
  4596. pager: {
  4597. nextL: '//div[@class="pages_s"]/a[text()="下一页"]',
  4598. pageE: 'css;.ar_list_co > ul > li',
  4599. replaceE: 'css;.pages_s',
  4600. scrollD: 1000
  4601. }
  4602. }, // 新新漫画 - 分类页
  4603. _77mh_search: {
  4604. host: 'so.77mh.cc',
  4605. pager: {
  4606. nextL: 'css;a.next',
  4607. pageE: 'css;.ar_list_co > ul > dl',
  4608. replaceE: 'css;.pages_s',
  4609. scrollD: 1000
  4610. }
  4611. }, // 新新漫画 - 搜索页
  4612. gufengmh: {
  4613. host: /gufengmh/,
  4614. functionS: ()=> {if (indexOF(/\/\d+.+\.html/)) {
  4615. let chapterScroll = getCSS('#chapter-scroll') // 强制为 [下拉阅读] 模式
  4616. if (chapterScroll && chapterScroll.className === '') {chapterScroll.click();}
  4617. curSite = DBSite.gufengmh;
  4618. } else if (indexOF(/\/(update|list|search)/)) {
  4619. curSite = DBSite.gufengmh_list;
  4620. }},
  4621. style: 'p.img_info {display: none !important;}', // 隐藏中间的页数信息
  4622. pager: {
  4623. type: 4,
  4624. nextL: gufengmh_nextL,
  4625. pageE: 'css;body > script:first-child',
  4626. insertP: ['css;#images', 3],
  4627. insertE: gufengmh_insertE,
  4628. interval: 5000,
  4629. scrollD: 4000
  4630. }
  4631. }, // 古风漫画网
  4632. gufengmh_list: {
  4633. pager: {
  4634. nextL: 'css;li.next > a',
  4635. pageE: 'css;ul.book-list > li',
  4636. replaceE: 'css;ul.pagination',
  4637. scrollD: 1000
  4638. }
  4639. }, // 古风漫画网 - 分类页
  4640. szcdmj: {
  4641. host: 'www.szcdmj.com',
  4642. functionS: ()=> {
  4643. if (indexOF('/szcchapter/')) {
  4644. curSite = DBSite.szcdmj;
  4645. } else if (indexOF('/szcbook/')) {
  4646. if (getCSS('#detail-list-more')) getCSS('#detail-list-more').click();
  4647. } else if (lp == '/szcbolist' || lp == '/update') {
  4648. curSite = DBSite.szcdmj_list;
  4649. }},
  4650. style: '.header {opacity: 0.3 !important;}',
  4651. pager: {
  4652. nextL: '//div[@class="fanye"][1]/a[@href][text()="下一页" or text()="下一话"]',
  4653. pageE: 'css;.comicpage > div',
  4654. insertP: ['css;.comicpage', 3],
  4655. replaceE: 'css;.fanye,h1.title',
  4656. scrollD: 2000
  4657. },
  4658. function: {
  4659. bF: src_bF,
  4660. bFp: [0, 'img[data-original]', 'data-original']
  4661. }
  4662. }, // 砂之船动漫家
  4663. szcdmj_list: {
  4664. pager: {
  4665. nextL: 'css;#nextPage',
  4666. pageE: 'css;ul.mh-list > li',
  4667. replaceE: 'css;.pagination',
  4668. scrollD: 1000
  4669. }
  4670. }, // 砂之船动漫家 - 分类/搜索页
  4671. mangabz: {
  4672. host: ['mangabz.com', 'www.mangabz.com'],
  4673. functionS: ()=> {if (indexOF(/\/m\d+/)) {
  4674. setTimeout(mangabz_init, 1500);
  4675. curSite = DBSite.mangabz;
  4676. } else if (indexOF(/\/\d+bz\//)) {
  4677. if (getCSS('.detail-list-form-more')) getCSS('.detail-list-form-more').click();
  4678. } else if (indexOF('/manga-list') || lp == '/search') {
  4679. curSite = DBSite.mangabz_list;
  4680. }},
  4681. style: 'body > .container > div:not([id]) {display: none !important;} .top-bar {opacity: 0.3 !important;} #cp_img > img{display: block !important;margin: 0 auto !important; max-width: 99% !important; width: auto !important; height: auto !important;}',
  4682. pager: {
  4683. type: 4,
  4684. nextL: mangabz_nextL,
  4685. insertP: ['css;#cp_img', 3],
  4686. insertE: mangabz_insertE,
  4687. replaceE: 'css;p.top-title, body > .container > div:not([id])',
  4688. interval: 500,
  4689. scrollD: 2000
  4690. }
  4691. }, // Mangabz 漫画
  4692. mangabz_list: {
  4693. pager: {
  4694. nextL: '//div[contains(@class,"page-pagination")]//a[contains(text(), ">")]',
  4695. pageE: 'css;ul.mh-list > li',
  4696. replaceE: 'css;.page-pagination',
  4697. scrollD: 800
  4698. }
  4699. }, // Mangabz 漫画 - 分类/搜索页
  4700. dm5: {
  4701. host: 'www.dm5.com',
  4702. functionS: ()=> {if (indexOF(/\/m\d+/)) {
  4703. setTimeout(mangabz_init, 1500);
  4704. curSite = DBSite.dm5;
  4705. } else if (indexOF('/manga-list') || lp == '/search' || getCSS('.box-body > ul.mh-list > li')) {
  4706. curSite = DBSite.mangabz_list;
  4707. } else if (getCSS('.detail-more')) {
  4708. getCSS('.detail-more').click();
  4709. }},
  4710. style: '.view-paging > .container, .view-comment {display: none !important;} .rightToolBar {opacity: 0.3 !important;} #cp_img > img{display: block !important;margin: 0 auto !important; max-width: 99% !important; width: auto !important; height: auto !important;} body {overflow: auto !important;}',
  4711. pager: {
  4712. type: 4,
  4713. nextL: dm5_nextL,
  4714. insertP: ['css;#cp_img', 3],
  4715. insertE: dm5_insertE,
  4716. replaceE: 'css;.view-paging > .container, .rightToolBar',
  4717. interval: 500,
  4718. scrollD: 2000
  4719. }
  4720. }, // 动漫屋
  4721. xmanhua: {
  4722. host: ['xmanhua.com', 'www.xmanhua.com'],
  4723. functionS: ()=> {if (indexOF(/\/m\d+/)) {
  4724. setTimeout(mangabz_init, 1500);
  4725. curSite = DBSite.xmanhua;
  4726. } else if (indexOF(/\/\d+xm\//)) {
  4727. if (getCSS('.detail-list-form-more')) getCSS('.detail-list-form-more').click();
  4728. } else if (indexOF('/manga-list') || lp == '/search') {
  4729. curSite = DBSite.xmanhua_list;
  4730. }},
  4731. style: 'a.reader-bottom-page {display: none !important;} .header, .reader-bottom {opacity: 0.3 !important;} #cp_img > img{display: block !important;margin: 0 auto !important; max-width: 99% !important; width: auto !important; height: auto !important;}',
  4732. hiddenPN: true,
  4733. pager: {
  4734. type: 4,
  4735. nextL: xmanhua_nextL,
  4736. insertP: ['css;#cp_img', 3],
  4737. insertE: xmanhua_insertE,
  4738. replaceE: 'css;.reader-title, body > .container > div:not([id])',
  4739. interval: 500,
  4740. scrollD: 2500
  4741. }
  4742. }, // Xmanhua 漫画
  4743. xmanhua_list: {
  4744. pager: {
  4745. nextL: '//div[@class="page-pagination"]//a[contains(text(), ">")]',
  4746. pageE: 'css;ul.mh-list > li',
  4747. replaceE: 'css;.page-pagination',
  4748. scrollD: 1000
  4749. }
  4750. }, // Xmanhua 漫画 - 分类/搜索页
  4751. cocomanga: {
  4752. host: 'www.cocomanga.com',
  4753. functionS: ()=> {if (indexOF('.html')) {
  4754. if (!(getCookie('mh_readmode') === '' || getCookie('mh_readmode') === '3')) {
  4755. document.cookie='mh_readmode=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/'; // 强制开启自带的无缝翻页功能
  4756. location.reload(); // 刷新网页
  4757. }
  4758. setTimeout(cocomanga_init, 500);
  4759. curSite = DBSite.cocomanga;
  4760. } else if (indexOF(/\/\d+\/$/)) {
  4761. setTimeout(function(){if (getCSS('a.website-display-all')) getCSS('a.website-display-all').click();}, 300)
  4762. } else if (lp == '/show') {
  4763. curSite = DBSite.cocomanga_list;
  4764. } else if (lp == '/search') {
  4765. curSite = DBSite.cocomanga_search;
  4766. }},
  4767. style: '.mh_readend, .mh_footpager, .mh_readmode {display: none !important;} .mh_comicpic img {cursor: unset !important;} .mh_comicpic img {min-height: 150px;}',
  4768. pager: {
  4769. type: 4,
  4770. nextL: '//a[contains(@class, "read_page_link") and contains(string(), "下一章")][not(contains(@href, "javascript"))]',
  4771. insertP: ['css;#mangalist', 3],
  4772. insertE: cocomanga_insertE,
  4773. replaceE: 'css;.mh_readtitle, .mh_headpager > a.mh_prevbook, .mh_readend',
  4774. interval: 1000,
  4775. scrollD: 2500
  4776. }
  4777. }, // COCOMANGA 漫画
  4778. cocomanga_list: {
  4779. pager: {
  4780. nextL: ()=> getNextEP('css;.fed-page-info a.fed-btns-green+a[onclick]', 'page=', /page=\d+/),
  4781. pageE: 'css;ul.fed-list-info > li',
  4782. replaceE: 'css;.fed-page-info',
  4783. scrollD: 1000
  4784. },
  4785. function: {
  4786. bF: src_bF,
  4787. bFp: [1, 'a[data-original]', 'data-original']
  4788. }
  4789. }, // COCOMANGA 漫画 - 分类页
  4790. cocomanga_search: {
  4791. pager: {
  4792. nextL: ()=> getNextEP('css;.fed-page-info a.fed-btns-green+a[onclick]', 'page=', /page=\d+/),
  4793. pageE: 'css;dl.fed-deta-info',
  4794. replaceE: 'css;.fed-page-info',
  4795. scrollD: 1000
  4796. },
  4797. function: {
  4798. bF: src_bF,
  4799. bFp: [1, 'a[data-original]', 'data-original']
  4800. }
  4801. }, // COCOMANGA 漫画 - 搜索页
  4802. qidian: {
  4803. host: 'www.qidian.com',
  4804. functionS: ()=> {if (indexOF('/all/')) {curSite = DBSite.qidian;}},
  4805. pager: {
  4806. nextL: 'css;a[class*="pagination-next"]',
  4807. pageE: 'css;ul.all-img-list > li',
  4808. replaceE: 'css;#page-container',
  4809. scrollD: 900
  4810. }
  4811. }, // 起点中文
  4812. qidian_read: {
  4813. host: 'read.qidian.com',
  4814. style: '.admire-wrap {display: none !important;}',
  4815. pager: {
  4816. nextL: 'css;a[id$="chapterNext"]',
  4817. pageE: 'css;.main-text-wrap > div:not(.admire-wrap)',
  4818. replaceE: 'css;.chapter-control',
  4819. scrollD: 900
  4820. }
  4821. }, // 起点中文 - 阅读页
  4822. qimao: {
  4823. host: 'www.qimao.com',
  4824. functionS: ()=> {if (indexOF(/\/shuku\/\d+-\d+\//) || indexOF('/reader/index/')) {curSite = DBSite.qimao;}},
  4825. pager: {
  4826. nextL: '//div[@class="reader-footer"]/a[text()="下一章"]',
  4827. pageE: 'css;.article > p',
  4828. replaceE: 'css;.reader-footer',
  4829. scrollD: 900
  4830. }
  4831. }, // 七猫中文
  4832. zxcs: {
  4833. host: 'zxcs.me',
  4834. functionS: ()=> {if (indexOF('/sort/')) curSite = DBSite.zxcs;},
  4835. pager: {
  4836. nextL: 'css;#pagenavi > span+a',
  4837. pageE: 'css;dl[id="plist"]',
  4838. replaceE: 'css;#pagenavi',
  4839. scrollD: 900
  4840. }
  4841. }, // 知轩藏书
  4842. baoshuu: {
  4843. host: 'www.baoshuu.com',
  4844. functionS: ()=> {if (indexOF('/TXT/list')) curSite = DBSite.baoshuu;},
  4845. pager: {
  4846. nextL: '//div[@class="listl2"]//a[text()="下一页"]',
  4847. pageE: 'css;.listl2 > ul > li',
  4848. replaceE: 'css;.listl2 > dl',
  4849. scrollD: 900
  4850. }
  4851. }, // 宝书网
  4852. baoshuu_m: {
  4853. host: 'm.baoshuu.com',
  4854. functionS: ()=> {if (indexOF('/TXT/list')) curSite = DBSite.baoshuu_m;},
  4855. pager: {
  4856. nextL: '//div[@class="man_first"]//a[text()="下一页"]',
  4857. pageE: 'css;.man_first > ul > li',
  4858. replaceE: 'css;.man_first > dl',
  4859. scrollD: 900
  4860. }
  4861. }, // 宝书网- 手机版
  4862. yushubo: {
  4863. host: 'www.yushubo.com',
  4864. functionS: ()=> {if (indexOF('/read_')) {
  4865. curSite = DBSite.yushubo;
  4866. } else if (indexOF('/lists/')) {
  4867. curSite = DBSite.yushubo_list;
  4868. } else if (indexOF('/all')) {
  4869. curSite = DBSite.yushubo_all;
  4870. }},
  4871. style: '.readbg.mt10 {display: none !important;}',
  4872. pager: {
  4873. nextL: '//div[contains(@class, "articlebtn")]/a[contains(text(), "下一页") or contains(text(), "下一章")]',
  4874. pageE: 'css;#BookText',
  4875. insertP: ['css;#BookText', 6],
  4876. insertP6Br: true,
  4877. replaceE: 'css;.articlebtn',
  4878. scrollD: 1000
  4879. }
  4880. }, // 御书网
  4881. yushubo_list: {
  4882. pager: {
  4883. nextL: 'id("pager")//a[contains(text(), "下一页")]',
  4884. pageE: 'css;.books-list > ul > li',
  4885. replaceE: 'css;#pager',
  4886. scrollD: 1000
  4887. }
  4888. }, // 御书网 - 分类页
  4889. yushubo_all: {
  4890. pager: {
  4891. nextL: 'id("pager")//a[contains(text(), "下一页")]',
  4892. pageE: 'css;ul.search-list > li',
  4893. replaceE: 'css;#pager',
  4894. scrollD: 1000
  4895. }
  4896. }, // 御书网 - 书库页
  4897. soxscc: {
  4898. host: 'www.soxscc.org',
  4899. functionS: ()=> {if (indexOF(/\/\d{4,}\.html/)) {curSite = DBSite.soxscc;}},
  4900. style: '.content > p, img {display: none !important;}',
  4901. pager: {
  4902. nextL: '//font[contains(text(), "下一章")]/following-sibling::a[1]',
  4903. pageE: 'css;.content',
  4904. insertP: ['css;.content', 6],
  4905. insertP6Br: true,
  4906. replaceE: 'css;.pagego',
  4907. scrollD: 1500
  4908. }
  4909. }, // 搜小说
  4910. ihuaben: {
  4911. host: 'www.ihuaben.com',
  4912. functionS: ()=> {if (indexOF(/\/\d{4,}\.html/)) {curSite = DBSite.ihuaben;}},
  4913. style: '.discription > p > i, img, #container, #BDBannerBottom_PC, iframe, .navFooter {display: none !important;} .discription > p {font-size: 16px; min-height: 24px; padding-bottom: 24px;}',
  4914. pager: {
  4915. nextL: 'id("preAndNextBar")/a[contains(text(), "下一章")]',
  4916. pageE: 'css;#contentsource > p',
  4917. insertP: ['css;.discription', 3],
  4918. replaceE: 'css;#preAndNextBar',
  4919. scrollD: 1000
  4920. }
  4921. }, // 话本小说网
  4922. xineyby: {
  4923. host: 'www.xineyby.com',
  4924. functionS: ()=> {if (indexOF('/read/')) {
  4925. curSite = DBSite.xineyby;
  4926. } else if (indexOF(/\/(list|quanben|search)/)) {
  4927. curSite = DBSite.xineyby_list;
  4928. }},
  4929. pager: {
  4930. nextL: 'id("footlink")/a[contains(text(), "下一页")]',
  4931. pageE: 'css;#contents',
  4932. insertP: ['css;#contents', 6],
  4933. insertP6Br: true,
  4934. replaceE: 'css;#footlink, #amain dd h1',
  4935. scrollD: 900
  4936. }
  4937. }, // 无错小说网
  4938. xineyby_list: {
  4939. pager: {
  4940. nextL: 'css;#pagelink a.next',
  4941. pageE: 'css;#content > dd tbody > tr:not(:first-child)',
  4942. insertP: ['css;#content > dd tbody', 3],
  4943. replaceE: 'css;#pagelink',
  4944. scrollD: 900
  4945. }
  4946. }, // 无错小说网 - 分类/搜索页
  4947. _530p: {
  4948. host: 'www.530p.com',
  4949. functionS: ()=> {if (indexOF(/\/\d{4,}\.htm/)) {curSite = DBSite._530p;}},
  4950. pager: {
  4951. nextL: 'css;#nextLink',
  4952. pageE: 'css;#cp_content',
  4953. insertP: ['css;#cp_content', 6],
  4954. insertP6Br: true,
  4955. replaceE: 'css;#pg_bar',
  4956. scrollD: 1500
  4957. }
  4958. }, // 无弹窗小说网
  4959. xiaoshuo77: {
  4960. host: 'm.xiaoshuo77.net',
  4961. functionS: ()=> {if (indexOF('.html')) {curSite = DBSite.xiaoshuo77; xs_bF(getAllCSS('#novelcontent'), [/(<br>)?(&nbsp;)+内容未完,下一页.*$|【本章阅读.*$/, '<br>']);}},
  4962. style: '#novelcontent > p, img {display: none !important;}',
  4963. pager: {
  4964. nextL: 'css;.page_chapter a.p4',
  4965. pageE: 'css;#novelcontent',
  4966. insertP: ['css;#novelcontent', 6],
  4967. replaceE: 'css;.page_chapter',
  4968. scrollD: 1500
  4969. },
  4970. function: {
  4971. bF: xs_bF,
  4972. bFp: [/(<br>)?(&nbsp;)+内容未完,下一页.*$|【本章阅读.*$/, '<br>']
  4973. }
  4974. }, // 读书族小说网
  4975. linovel: {
  4976. host: 'www.linovel.net',
  4977. functionS: ()=> {if (indexOF(/\/book\/\d+\/.+\.html/)) {
  4978. insStyle('.reward-section {display: none !important;}');
  4979. } else if (indexOF('/cat/')) {
  4980. curSite = DBSite.linovel;
  4981. }},
  4982. pager: {
  4983. nextL: '//ul[@class="pagination"]/li/a[contains(text(), "下一页")]',
  4984. pageE: 'css;.rank-book-list > div',
  4985. replaceE: 'css;ul.pagination',
  4986. scrollD: 1000
  4987. }
  4988. }, // 轻之文库
  4989. _23qb: {
  4990. host: 'www.23qb.net',
  4991. functionS: ()=> {if (indexOF(/\/book\/\d+\/.+\.html/)) {
  4992. curSite = DBSite._23qb; xs_bF(getAllCSS('#mlfy_main_text > *'), [/(继续下一页).+|铅笔小说.+/, '']);
  4993. } else if (lp != '/' && !indexOF(/\/book\/\d+\//)) {
  4994. curSite = DBSite._23qb_list;
  4995. }},
  4996. pager: {
  4997. nextL: ()=> (location.origin + ReadParams.url_next),
  4998. pageE: 'id("TextContent")/p | //script[contains(text(), "ReadParams")]',
  4999. insertP: ['css;#TextContent', 3],
  5000. replaceE: 'css;.chepnav',
  5001. scriptT: 2,
  5002. scrollD: 1500
  5003. },
  5004. function: {
  5005. bF: xs_bF,
  5006. bFp: [/.*继续下一页.*|.*铅笔小说.*/, '']
  5007. }
  5008. }, // 铅笔小说
  5009. _23qb_list: {
  5010. pager: {
  5011. nextL: 'css;.pages a.next, .pages > strong+a',
  5012. pageE: 'css;#sitebox > dl',
  5013. replaceE: 'css;.pages',
  5014. scrollD: 1000
  5015. },
  5016. function: {
  5017. bF: src_bF,
  5018. bFp: [0, 'img[_src]', '_src']
  5019. }
  5020. }, // 铅笔小说 - 分类页
  5021. linovelib: {
  5022. host: 'www.linovelib.com',
  5023. functionS: ()=> {if (indexOF(/\/novel\/\d+\/.+\.html/)) {
  5024. curSite = DBSite.linovelib;
  5025. } else if (indexOF('/wenku/')) {
  5026. curSite = DBSite.linovelib_wenku;
  5027. } else if (indexOF('/top/') || indexOF('/topfull/') || indexOF('toplist.php')) {
  5028. curSite = DBSite.linovelib_top;
  5029. }},
  5030. pager: {
  5031. nextL: '//p[@class="mlfy_page"]/a[contains(text(), "下一页") or contains(text(), "下一章")]',
  5032. pageE: 'css;#mlfy_main_text > *',
  5033. replaceE: 'css;p.mlfy_page',
  5034. scrollD: 1000
  5035. }
  5036. }, // 哔哩轻小说
  5037. linovelib_wenku: {
  5038. pager: {
  5039. nextL: 'css;#pagelink > a.next',
  5040. pageE: 'css;.store_collist > div.bookbox',
  5041. replaceE: 'css;#pagelink',
  5042. scrollD: 1000
  5043. },
  5044. function: {
  5045. bF: src_bF,
  5046. bFp: [0, 'img[data-original]', 'data-original']
  5047. }
  5048. }, // 哔哩轻小说 - 文库
  5049. linovelib_top: {
  5050. pager: {
  5051. nextL: 'css;#pagelink > a.next',
  5052. pageE: 'css;.rankpage_box > div.rank_d_list',
  5053. replaceE: 'css;#pagelink',
  5054. scrollD: 1000
  5055. },
  5056. function: {
  5057. bF: src_bF,
  5058. bFp: [0, 'img[data-original]', 'data-original']
  5059. }
  5060. }, // 哔哩轻小说 - 全本
  5061. linovelib_w: {
  5062. host: 'w.linovelib.com',
  5063. functionS: ()=> {if (indexOF(/\/novel\/\d+\/.+\.html/)) {
  5064. curSite = DBSite.linovelib_w;
  5065. } else if (indexOF('/wenku/') || indexOF('/sa/')) {
  5066. curSite = DBSite.linovelib_w_wenku;
  5067. }},
  5068. style: 'body {min-height: 1000px;}',
  5069. pager: {
  5070. nextL: ()=> {if (ReadParams) {return (location.origin + ReadParams.url_next)}; return ''},
  5071. pageE: '//body/script[contains(text(), "var ReadParams")] | id("apage")/div',
  5072. insertP: ['css;#apage', 3],
  5073. scriptT: 2,
  5074. scrollD: 1000
  5075. }
  5076. }, // 哔哩轻小说 (手机版)
  5077. linovelib_w_wenku: {
  5078. pager: {
  5079. nextL: 'css;#pagelink > strong+a ,#pagelink a.next',
  5080. pageE: 'css;ol.book-ol > li',
  5081. replaceE: 'css;#pagelink',
  5082. scrollD: 1000
  5083. },
  5084. function: {
  5085. bF: src_bF,
  5086. bFp: [0, 'img[data-original]', 'data-original']
  5087. }
  5088. }, // 哔哩轻小说 (手机版) - 文库
  5089. ao3: {
  5090. host: 'archiveofourown.org',
  5091. functionS: ()=> {if (indexOF(/\/works$/) || lp == '/works/search') {
  5092. curSite = DBSite.ao3;
  5093. } else if (indexOF(/\/works\/\d+\/chapters\//)) {
  5094. curSite = DBSite.ao3_post;
  5095. }},
  5096. pager: {
  5097. nextL: 'css;li.next a',
  5098. pageE: 'css;li.work[id^="work_"]',
  5099. replaceE: 'css;.pagination',
  5100. scrollD: 2500
  5101. }
  5102. }, // AO3 - 列表页 + 搜索页
  5103. ao3_post: {
  5104. pager: {
  5105. nextL: 'css;li.chapter.next a',
  5106. pageE: 'css;#workskin > div',
  5107. replaceE: 'css;#main ul.navigation, #feedback > ul.actions',
  5108. scrollD: 2000
  5109. }
  5110. }, // AO3 - 阅读页
  5111. _423down: {
  5112. host: 'www.423down.com',
  5113. functionS: ()=> {if (!indexOF('.html')) curSite = DBSite._423down;},
  5114. pager: {
  5115. nextL: '//div[@class="paging"]//a[contains(text(),"下一页")]',
  5116. pageE: 'css;div.content-wrap ul.excerpt > li',
  5117. replaceE: 'css;div.paging',
  5118. scrollD: 2000
  5119. }
  5120. }, // 423Down
  5121. iao_su: {
  5122. host: 'iao.su',
  5123. pager: {
  5124. nextL: 'css;li.next > a',
  5125. pageE: 'css;#index > article, #archive > article',
  5126. insertP: ['css;ol.page-navigator', 1],
  5127. replaceE: 'css;ol.page-navigator',
  5128. scriptT: 3,
  5129. scrollD: 1000
  5130. }
  5131. }, // 不死鸟
  5132. sharerw: {
  5133. host: 'www.sharerw.com',
  5134. functionS: ()=> {if (!indexOF('.html')) {if (lp == '/search.php') {curSite = DBSite.sharerw_search;} else {curSite = DBSite.sharerw;};};},
  5135. pager: {
  5136. nextL: 'css;span.next > a',
  5137. pageE: 'css;.new-post > article',
  5138. replaceE: 'css;.pagebar',
  5139. scrollD: 1500
  5140. }
  5141. }, // 分享者
  5142. sharerw_search: {
  5143. pager: {
  5144. nextL: 'css;span.next > a',
  5145. pageE: 'css;#mainbox > article',
  5146. replaceE: 'css;.pagebar',
  5147. scrollD: 1500
  5148. }
  5149. }, // 分享者 - 搜索页
  5150. extfans: {
  5151. host: 'www.extfans.com',
  5152. functionS: ()=> {if (lp != '/') {curSite = DBSite.extfans;}},
  5153. pager: {
  5154. nextL: 'css;a.page-next',
  5155. pageE: 'css;.app-item-content, .article-item-content',
  5156. replaceE: 'css;.pagination-content',
  5157. scrollD: 2000
  5158. }
  5159. }, // 扩展迷
  5160. appinn: {
  5161. host: 'www.appinn.com',
  5162. pager: {
  5163. nextL: 'css;a.next.page-numbers',
  5164. pageE: 'css;section#latest-posts > article',
  5165. replaceE: 'css;div.nav-links',
  5166. scrollD: 1500
  5167. }
  5168. }, // 小众软件
  5169. isharepc: {
  5170. host: 'www.isharepc.com',
  5171. pager: {
  5172. nextL: 'css;a.next.page-numbers',
  5173. pageE: 'css;.content > div.post',
  5174. replaceE: 'css;nav.pagination',
  5175. scrollD: 1000
  5176. }
  5177. }, // 乐软博客
  5178. ghxi: {
  5179. host: 'www.ghxi.com',
  5180. functionS: ()=> {if (lp == '/' && !location.search) {curSite = DBSite.ghxi;} else {curSite = DBSite.ghxi_list;}},
  5181. pager: {
  5182. type: 2,
  5183. nextL: 'css;.load-more',
  5184. interval: 1000,
  5185. scrollD: 5000
  5186. }
  5187. }, // 果核剥壳 - 首页
  5188. ghxi_list: {
  5189. pager: {
  5190. nextL: 'css;a.next',
  5191. pageE: 'css;ul.post-loop > li',
  5192. replaceE: 'css;ul.pagination',
  5193. scrollD: 1500
  5194. },
  5195. function: {
  5196. bF: src_bF,
  5197. bFp: [0, 'img[data-original]', 'data-original']
  5198. }
  5199. }, // 果核剥壳 - 分类/搜索页
  5200. _6yit: {
  5201. host: ['www.6yit.com'],
  5202. functionS: ()=> {if (!indexOF('.html')) {curSite = DBSite._6yit;}},
  5203. pager: {
  5204. nextL: 'css;a.next.page-numbers',
  5205. pageE: 'css;posts.posts-item.list',
  5206. replaceE: 'css;.pagenav',
  5207. scrollD: 1500
  5208. }
  5209. }, // 六音软件
  5210. apprcn: {
  5211. host: ['www.apprcn.com', 'free.apprcn.com'],
  5212. functionS: ()=> {if (lp == '/' || indexOF('/category/')) {curSite = DBSite.apprcn;}},
  5213. pager: {
  5214. nextL: '//div[@class="pagination"]//a[contains(text(), "Next")]',
  5215. pageE: 'css;article.article',
  5216. replaceE: 'css;.pagination',
  5217. scrollD: 1000
  5218. }
  5219. }, // 反斗软件
  5220. weidown: {
  5221. host: 'www.weidown.com',
  5222. functionS: ()=> {if (indexOF('/search/')) { //搜索页
  5223. curSite = DBSite.weidown_search;
  5224. } else if (indexOF('/special')) { // 专题页
  5225. curSite = DBSite.weidown_special;
  5226. } else {
  5227. curSite = DBSite.weidown;
  5228. }},
  5229. pager: {
  5230. nextL: 'css;a.nextpage',
  5231. pageE: 'css;.articleWrapper > .itemArticle, .articleWrapper > .richTextItem.search',
  5232. insertP: ['css;.articleWrapper', 3],
  5233. replaceE: 'css;#pageGroup',
  5234. scrollD: 1500
  5235. }
  5236. }, // 微当下载
  5237. weidown_search: {
  5238. pager: {
  5239. nextL: 'css;a.nextpage',
  5240. pageE: 'css;.articleListWrapper > .richTextItem.search',
  5241. replaceE: 'css;#pageGroup',
  5242. scrollD: 700
  5243. }
  5244. }, // 微当下载 - 搜索页
  5245. weidown_special: {
  5246. pager: {
  5247. nextL: 'css;a.nextpage',
  5248. pageE: 'css;.special > .item, .articleWrapper > div',
  5249. insertP: ['css;.special, .articleWrapper', 3],
  5250. replaceE: 'css;#pageGroup',
  5251. scrollD: 700
  5252. }
  5253. }, // 微当下载 - 专题页
  5254. fsylr: {
  5255. host: 'fsylr.com',
  5256. functionS: ()=> {if (!indexOF('.html')) {curSite = DBSite.fsylr;}},
  5257. pager: {
  5258. nextL: 'css;a.next.page-numbers',
  5259. pageE: 'css;.posts-con > div:not([class*="posts-"])',
  5260. replaceE: 'css;nav.pagination',
  5261. scrollD: 2000
  5262. }
  5263. }, // 发烧友绿软
  5264. iplaysoft: {
  5265. host: 'www.iplaysoft.com',
  5266. functionS: ()=> {if (indexOF('.html') || indexOF('/p/')) {curSite = DBSite.iplaysoft_comment;} else {curSite = DBSite.iplaysoft;}},
  5267. pager: {
  5268. nextL: 'css;.pagenavi a[title="下一页"]',
  5269. pageE: 'css;#postlist > div.entry',
  5270. replaceE: 'css;.pagenavi-button, .pagenavi',
  5271. scrollD: 1200
  5272. },
  5273. function: {
  5274. bF: src_bF,
  5275. bFp: [0, 'img[data-src]', 'data-src']
  5276. }
  5277. }, // 异次元软件
  5278. iplaysoft_comment: {
  5279. pager: {
  5280. type: 2,
  5281. nextL: 'css;#loadHistoryComments',
  5282. nextTextOf: '展开后面',
  5283. scrollD: 1200
  5284. }
  5285. }, // 异次元软件 - 评论
  5286. mubolin: {
  5287. host: 'www.mubolin.cn',
  5288. pager: {
  5289. nextL: 'css;a.next.page-numbers',
  5290. pageE: 'css;#recent-content > div',
  5291. replaceE: 'css;nav.pagination',
  5292. scrollD: 1500
  5293. }
  5294. }, // 悪魔の小站
  5295. mpyit: {
  5296. host: 'www.mpyit.com',
  5297. functionS: ()=> {if (lp == '/' && !location.search) {
  5298. curSite = DBSite.mpyit;
  5299. } else if (indexOF('/category/') || indexOF('?s=', 's')) { // 搜索页 / 分类页
  5300. curSite = DBSite.mpyit_category;
  5301. }},
  5302. pager: {
  5303. nextL: 'css;a.page-numbers[title="下一页"]',
  5304. pageE: 'css;#post > div[id^="post-"]',
  5305. replaceE: 'css;#post > #pagenavi',
  5306. scrollD: 1700
  5307. }
  5308. }, // 老殁 | 殁漂遥
  5309. mpyit_category: {
  5310. pager: {
  5311. nextL: 'css;a.page-numbers[title="下一页"]',
  5312. pageE: 'css;#content > div[class^="entry_box"]',
  5313. replaceE: 'css;#content > #pagenavi',
  5314. scrollD: 1700
  5315. }
  5316. }, // 老殁 | 殁漂遥 - 搜索页/分类页
  5317. tenlonstudio: {
  5318. host: 'www.tenlonstudio.com',
  5319. functionS: ()=> {if (lp == '/' && !location.search) {
  5320. curSite = DBSite.tenlonstudio;
  5321. } else {
  5322. curSite = DBSite.tenlonstudio_list;
  5323. }},
  5324. pager: {
  5325. type: 2,
  5326. nextL: 'css;.load-more',
  5327. nextText: '加载更多',
  5328. interval: 500,
  5329. scrollD: 1000
  5330. }
  5331. }, // 腾龙工作室
  5332. tenlonstudio_list: {
  5333. pager: {
  5334. nextL: '//div[@class="btn-pager"]/a[contains(text(), "❯")]',
  5335. pageE: 'css;li.post-list-item',
  5336. replaceE: 'css;.ajax-pager',
  5337. scrollD: 1000
  5338. }
  5339. }, // 腾龙工作室 - 分类/搜索页
  5340. yxssp: {
  5341. host: 'www.yxssp.com',
  5342. pager: {
  5343. nextL: '//div[contains(@class, "page-nav")]/a[last()]',
  5344. pageE: 'css;.td-modules-container.td-module-number4 > div',
  5345. replaceE: 'css;.page-nav.td-pb-padding-side',
  5346. scrollD: 1000
  5347. }
  5348. }, // 异星软件空间
  5349. yrxitong: {
  5350. host: 'www.yrxitong.com',
  5351. functionS: ()=> {
  5352. if (lp == '/sr.jsp') {
  5353. curSite = DBSite.yrxitong_search;
  5354. } else if (!indexOF('/h-nd-')) {
  5355. curSite = DBSite.yrxitong;
  5356. }
  5357. },
  5358. pager: {
  5359. nextL: 'css;span.pageNext > a',
  5360. pageE: 'css;#containerFormsCenter .m_news_list > div',
  5361. replaceE: 'css;.pagenation',
  5362. scrollD: 1200
  5363. },
  5364. function: {
  5365. bF: src_bF,
  5366. bFp: [1, 'a[data-original]', 'data-original']
  5367. }
  5368. }, // 小鱼儿 yr 系统
  5369. yrxitong_search: {
  5370. pager: {
  5371. nextL: 'css;span.pageNext > a',
  5372. pageE: 'css;#containerFormsCenter .newsList > div',
  5373. replaceE: 'css;.pagenation',
  5374. scrollD: 2000
  5375. }
  5376. }, // 小鱼儿 yr 系统 - 搜索页
  5377. downg: {
  5378. host: 'www.downg.com',
  5379. functionS: ()=> {if (indexOF('/new/')) {curSite = DBSite.downg;}},
  5380. pager: {
  5381. nextL: 'css;a.nextpage',
  5382. pageE: 'css;.ApdList > ul.ApdLi',
  5383. replaceE: 'css;.pagination',
  5384. scrollD: 1500
  5385. }
  5386. }, // 绿软家园
  5387. sordum: {
  5388. host: 'www.sordum.org',
  5389. pager: {
  5390. nextL: 'css;a.next.page-numbers',
  5391. pageE: 'css;.article > article',
  5392. replaceE: 'css;nav.navigation.posts-navigation',
  5393. scrollD: 1500
  5394. }
  5395. }, // (下面这几个都是国外博客网站)
  5396. winaero: {
  5397. host: 'winaero.com',
  5398. functionS: ()=> {if (lp == '/' || indexOF('/category/')) curSite = DBSite.winaero;},
  5399. pager: {
  5400. nextL: 'css;a.next.page-numbers',
  5401. pageE: 'css;#main > article',
  5402. replaceE: 'css;.pagination',
  5403. scrollD: 1500
  5404. }
  5405. },
  5406. lrepacks: {
  5407. host: 'lrepacks.net',
  5408. functionS: ()=> {if (!indexOF('.html')) curSite = DBSite.lrepacks;},
  5409. pager: {
  5410. nextL: 'css;.page_next > a',
  5411. pageE: 'css;#main .post-list article',
  5412. replaceE: 'css;.page_nav',
  5413. scrollD: 1500
  5414. },
  5415. function: {
  5416. bF: pageElems => { // 插入前函数(调整 class)
  5417. pageElems.forEach(function (one) {
  5418. let now = one.querySelector('.slideUp, .elementFade');
  5419. if (now) now.className = now.className.replace('slideUp','slideUpRun').replace('elementFade','elementFadeRun');
  5420. });
  5421. return pageElems
  5422. }
  5423. }
  5424. },
  5425. dlandroid: {
  5426. host: 'dlandroid.com',
  5427. functionS: ()=> {if (indexOF('/cat/') || (lp === '/' && indexOF('?s=', 's'))) curSite = DBSite.dlandroid;},
  5428. pager: {
  5429. nextL: 'css;a.next.page-numbers',
  5430. pageE: 'css;div.post',
  5431. replaceE: 'css;.navigation',
  5432. scrollD: 1500
  5433. },
  5434. function: {
  5435. bF: src_bF,
  5436. bFp: [0, 'img[data-src]', 'data-src']
  5437. }
  5438. }, // DlAndroid
  5439. winhelponline: {
  5440. host: 'www.winhelponline.com',
  5441. functionS: ()=> {if (lp == '/blog/') {curSite = DBSite.winhelponline;}},
  5442. pager: {
  5443. nextL: 'css;span.prev > a',
  5444. pageE: 'css;#main > article',
  5445. replaceE: 'css;nav.paging-navigation',
  5446. scrollD: 2000
  5447. }
  5448. },
  5449. windowslatest: {
  5450. host: 'www.windowslatest.com',
  5451. pager: {
  5452. nextL: '//div[contains(@class, "page-nav")]/a[last()]',
  5453. pageE: 'css;.td-ss-main-content > div:not(.td-block-title-wrap):not(.page-nav)',
  5454. replaceE: 'css;.page-nav',
  5455. scrollD: 2000
  5456. }
  5457. },
  5458. thewindowsclub: {
  5459. host: 'www.thewindowsclub.com',
  5460. functionS: ()=> {curSite = DBSite.thewindowsclub; if (lp == '/') {curSite.pager.scrollD = 2000;}},
  5461. pager: {
  5462. nextL: 'css;li.pagination-next > a',
  5463. pageE: 'css;#genesis-content > article.post',
  5464. replaceE: 'css;.pagination',
  5465. scrollD: 1500
  5466. }
  5467. },
  5468. acs: {
  5469. host: ['pubs.acs.org','onlinelibrary.wiley.com'],
  5470. functionS: ()=> {if (indexOF('/doSearch')) {curSite = DBSite.acs;}},
  5471. pager: {
  5472. nextL: 'css;a.pagination__btn--next',
  5473. pageE: 'css;ul.items-results > *',
  5474. replaceE: 'css;.pagination',
  5475. scrollD: 3000
  5476. }
  5477. }, // Wiley Online Library + ACS (Publications)
  5478. libgen: {
  5479. host: /libgen/,
  5480. functionS: ()=> {if (lp == '/search.php') {curSite = DBSite.libgen;}},
  5481. pager: {
  5482. nextL: '//font/a[contains(text(), "►")]',
  5483. pageE: 'css;table[rules="rows"] > tbody > tr:nth-of-type(n+2), .paginator+script:not([src])',
  5484. insertP: ['css;table[rules="rows"] > tbody', 3],
  5485. replaceE: '//td[./font/a[contains(text(), "►")]]',
  5486. scriptT: 2,
  5487. scrollD: 2000
  5488. }
  5489. }, // Library Genesis
  5490. sciencedirect: {
  5491. host: 'www.sciencedirect.com',
  5492. functionS: ()=> {locationC = true; if (lp == '/search') {curSite = DBSite.sciencedirect; setTimeout(function(){insStyle('html, body {height: ' + (document.documentElement.scrollHeight || document.body.scrollHeight) + 'px;}')}, 2000)}},
  5493. style: 'footer {display: none !important;}',
  5494. iframe: true,
  5495. pager: {
  5496. type: 5,
  5497. nextL: 'css;a[data-aa-name="srp-next-page"]',
  5498. scrollD: 2000
  5499. }
  5500. }, // ScienceDirect
  5501. Z_Library: {
  5502. host: /(\dlib|b-ok\d?|booksc|z-lib)\./,
  5503. functionS: ()=> {if (indexOF('/s/')) {curSite = DBSite.Z_Library;}},
  5504. pager: {
  5505. nextL: '//div[@class="paginator"]//span/strong/parent::span/parent::td/following-sibling::td[1]//a',
  5506. pageE: 'id("searchResultBox")/div | //script[contains(string(), "pagerOptions")]',
  5507. insertP: ['css;#searchResultBox', 3],
  5508. replaceE: 'css;.paginator',
  5509. scriptT: 2,
  5510. scrollD: 2000
  5511. },
  5512. function: {
  5513. bF: src_bF,
  5514. bFp: [0, 'img[data-src]', 'data-src']
  5515. }
  5516. }, // Z-Library
  5517. pubmed: {
  5518. host: 'pubmed.ncbi.nlm.nih.gov',
  5519. pager: {
  5520. type: 2,
  5521. nextL: 'css;button.load-button.next-page',
  5522. nextText: 'Show more results',
  5523. scrollD: 1500
  5524. }
  5525. }, // PubMed
  5526. x_mol: {
  5527. host: 'www.x-mol.com',
  5528. functionS: ()=> {if (indexOF('/search/q') || indexOF('/paper/')) {curSite = DBSite.x_mol;}},
  5529. pager: {
  5530. nextL: ()=> getNextEP('css;.pagination li.active+li > a', 'pageIndex=', /pageIndex=\d+/),
  5531. pageE: 'css;.magazine-senior-search-results-list > ul > li, .magazine-model-content-new > ul > li',
  5532. insertP: ['css;.magazine-senior-search-results-list > ul, .magazine-model-content-new > ul', 3],
  5533. replaceE: 'css;.pagination',
  5534. scrollD: 2000
  5535. }
  5536. }, // X-MOL
  5537. cqvip: {
  5538. host: 'www.cqvip.com',
  5539. functionS: ()=> {if (indexOF('/search')) {curSite = DBSite.cqvip;}},
  5540. pager: {
  5541. type: 6,
  5542. nextL: '//ul[@class="pagenum"]//a[text()="下一页"]',
  5543. pageE: 'css;ul.prolist:last-child > li',
  5544. replaceE: 'css;ul.pagenum',
  5545. loadTime: 1000,
  5546. scrollD: 2000
  5547. }
  5548. }, // 维普网
  5549. ablesci: {
  5550. host: 'www.ablesci.com',
  5551. functionS: ()=> {if (indexOF('/detail') && GM_getValue('menu_thread')) {curSite = DBSite.ablesci_p;} else if (getCSS('ul.fly-list')) {curSite = DBSite.ablesci;}},
  5552. pager: {
  5553. nextL: 'css;li.next > a',
  5554. pageE: 'css;ul.fly-list > li',
  5555. replaceE: 'css;.pages',
  5556. scrollD: 2000
  5557. }
  5558. }, // 科研通
  5559. ablesci_p: {
  5560. pager: {
  5561. nextL: 'css;li.next > a',
  5562. pageE: 'css;ul#jieda > li',
  5563. replaceE: 'css;.pages',
  5564. scrollD: 2000
  5565. }
  5566. }, // 科研通 - 帖子内
  5567. coolkeyan: {
  5568. host: 'www.coolkeyan.com',
  5569. functionS: ()=> {if (location.hash.indexOf('/project/') > -1) curSite = DBSite.coolkeyan;},
  5570. style: '.q-img {height: auto !important;} .q-img__image {max-height: 1000px !important;} .row.q-my-sm.q-gutter-sm {display: none !important;}',
  5571. pager: {
  5572. type: 4,
  5573. nextL: coolkeyan_nextL,
  5574. insertP: ['//div[contains(@class, "q-img__image")][last()]', 4],
  5575. insertE: coolkeyan_insertE,
  5576. scrollD: 1500
  5577. }
  5578. }, // 酷科研
  5579. muchong: {
  5580. host: 'muchong.com',
  5581. functionS: ()=> {if (indexOF('/f-') || indexOF('search.php')) {
  5582. curSite = DBSite.muchong;
  5583. } else if (indexOF('/t-') && GM_getValue('menu_thread')) {
  5584. curSite = DBSite.muchong; curSite.pager.pageE = 'css;#maincontent > table > tbody:not(.header)'; curSite.pager.scrollD = 2000;
  5585. }},
  5586. style: 'tr.forum_head {display: none !important;}',
  5587. pager: {
  5588. nextL: '//div[contains(@class, "xmc_Pages")]//a[text()="下一页"]',
  5589. pageE: 'css;.forum_body table > tbody',
  5590. replaceE: 'css;.xmc_Pages',
  5591. scrollD: 1500
  5592. }
  5593. }, // 小木虫
  5594. google_scholar: {
  5595. host: 'scholar.google.com',
  5596. functionS: ()=> {if (lp == '/scholar') {curSite = DBSite.google_scholar;}},
  5597. pager: {
  5598. nextL: '//a[./span[contains(@class, "next")]]',
  5599. pageE: 'css;#gs_res_ccl_mid > *',
  5600. insertP: ['css;#gs_res_ccl_mid', 3],
  5601. replaceE: 'css;#gs_n',
  5602. scriptT: 1,
  5603. scrollD: 2000
  5604. }
  5605. }, // 谷歌学术
  5606. google_scholar_: {
  5607. host: 'sc.panda321.com',
  5608. pager: {
  5609. nextL: '//a[./span[contains(@class, "next")]]',
  5610. pageE: 'css;#gs_res_ccl_mid > *',
  5611. insertP: ['css;#gs_res_ccl_mid', 3],
  5612. replaceE: 'css;#gs_n',
  5613. scriptT: 1,
  5614. scrollD: 2000
  5615. },
  5616. function: {
  5617. bF: pageElems => {
  5618. getCSS('#gs_n').remove();
  5619. return pageElems
  5620. }
  5621. }
  5622. }, // 谷歌学术 - 其他镜像站
  5623. bing_academic: {
  5624. style: 'li.aca_algo_count {display: none !important;}',
  5625. pager: {
  5626. nextL: 'css;a.sb_pagN',
  5627. pageE: 'css;#b_results > li.aca_algo',
  5628. replaceE: 'css;#b_results .b_pag',
  5629. scrollD: 1000
  5630. }
  5631. }, // 必应学术
  5632. baidu_xueshu: {
  5633. host: 'xueshu.baidu.com',
  5634. functionS: ()=> {if (lp == '/s') {
  5635. curSite = DBSite.baidu_xueshu;
  5636. } else if (indexOF('journal/navigation')) {
  5637. curSite = DBSite.baidu_xueshu_journal;
  5638. } else if (indexOF('paper/show')) {
  5639. curSite = DBSite.baidu_xueshu_paper;
  5640. }},
  5641. pager: {
  5642. nextL: 'id("page")/a[./i[@class="c-icon-pager-next"]]',
  5643. pageE: 'css;#bdxs_result_lists > div.result',
  5644. replaceE: 'css;#page',
  5645. scrollD: 1000
  5646. }
  5647. }, // 百度学术
  5648. baidu_xueshu_journal: {
  5649. pager: {
  5650. nextL: 'css;a.res-page-next',
  5651. pageE: 'css;#journaldetail > div',
  5652. replaceE: 'css;.res-page',
  5653. scrollD: 1000
  5654. }
  5655. }, // 百度学术
  5656. baidu_xueshu_paper: {
  5657. pager: {
  5658. type: 2,
  5659. nextL: 'css;div:not([style*="display: none"]) > .more_btn',
  5660. nextText: '加载更多',
  5661. scrollD: 1000
  5662. }
  5663. }, // 百度学术
  5664. so_xueshu: {
  5665. host: 'xueshu.so.com',
  5666. functionS: ()=> {if (lp == '/s') {curSite = DBSite.so_xueshu;}},
  5667. pager: {
  5668. nextL: 'css;a#snext',
  5669. pageE: 'css;ul.list > li',
  5670. replaceE: 'css;#page',
  5671. scrollD: 1000
  5672. }
  5673. }, // 360 学术
  5674. wanfangdata: {
  5675. host: 's.wanfangdata.com.cn',
  5676. functionS: ()=> {locationC = true; curSite = DBSite.wanfangdata;},
  5677. style: '#zkFooter {display: none !important;}',
  5678. iframe: true,
  5679. pager: {
  5680. type: 5,
  5681. nextL: ()=> getNextEP('css;.pager.active+span.pager', 'p=', /p=\d+/),
  5682. scrollD: 2000
  5683. }
  5684. }, // 万方数据知识服务
  5685. nsfc: {
  5686. host: ['output.nsfc.gov.cn', 'kd.nsfc.gov.cn'],
  5687. functionS: ()=> {if (indexOF('/conclusionProject/')) curSite = DBSite.nsfc;},
  5688. style: '#pageNoUl {display: none !important;}',
  5689. pager: {
  5690. type: 4,
  5691. nextL: nsfc_nextL,
  5692. insertP: ['css;#pageNoUl', 1],
  5693. insertE: nsfc_insertE,
  5694. scrollD: 1500
  5695. }
  5696. }, // 国家自然科学基金
  5697. stackoverflow: {
  5698. host: 'stackoverflow.com',
  5699. functionS: ()=> {if (indexOF('/questions') && !indexOF(/\/questions\/\d+\//)) {
  5700. curSite = DBSite.stackoverflow;
  5701. } else if (lp == '/search') {
  5702. curSite = DBSite.stackoverflow_search;
  5703. } else if (lp == '/tags') {
  5704. curSite = DBSite.stackoverflow_tags;
  5705. } else if (lp == '/users') {
  5706. curSite = DBSite.stackoverflow_users;
  5707. }},
  5708. pager: {
  5709. nextL: 'css;a[rel="next"]',
  5710. pageE: 'css;#questions > div',
  5711. replaceE: 'css;.pager',
  5712. scrollD: 2000
  5713. }
  5714. }, // StackOverflow - Questions
  5715. stackoverflow_tags: {
  5716. pager: {
  5717. nextL: 'css;a[rel="next"]',
  5718. pageE: 'css;#tags-browser > div',
  5719. replaceE: 'css;.pager',
  5720. scrollD: 2000
  5721. }
  5722. }, // StackOverflow - Tags
  5723. stackoverflow_users: {
  5724. pager: {
  5725. nextL: 'css;a[rel="next"]',
  5726. pageE: 'css;#user-browser > div:first-child > div',
  5727. replaceE: 'css;.pager',
  5728. scrollD: 2000
  5729. }
  5730. }, // StackOverflow - Users
  5731. stackoverflow_search: {
  5732. pager: {
  5733. nextL: 'css;a[rel="next"]',
  5734. pageE: 'css;.js-search-results > div:first-child > div',
  5735. replaceE: 'css;.pager',
  5736. scrollD: 2000
  5737. }
  5738. }, // StackOverflow - Search
  5739. segmentfault: {
  5740. host: 'segmentfault.com',
  5741. functionS: ()=> {locationC = true;
  5742. if (indexOF('/questions')) {
  5743. curSite = DBSite.segmentfault;
  5744. } else if (lp == '/search') {
  5745. curSite = DBSite.segmentfault_search;
  5746. }},
  5747. pager: {
  5748. nextL: '//a[@class="page-link"][contains(text(), "下一页")]',
  5749. pageE: 'css;ul.list-group > li',
  5750. replaceE: 'css;ul.pagination',
  5751. scrollD: 1000
  5752. }
  5753. }, // SegmentFault - Questions
  5754. segmentfault_search: {
  5755. pager: {
  5756. nextL: 'css;a[rel="next"]',
  5757. pageE: 'css;.search-result > section',
  5758. replaceE: 'css;ul.pagination',
  5759. scrollD: 1000
  5760. }
  5761. }, // SegmentFault - Search
  5762. w3school_com_cn: {
  5763. host: 'www.w3school.com.cn',
  5764. functionS: ()=> {if (location.pathname.split('/').length > 2) {curSite = DBSite.w3school_com_cn;}},
  5765. style: '#maincontent h1:not(:nth-of-type(1)) {margin-top: 30px;}',
  5766. pager: {
  5767. type: 3,
  5768. nextL: ()=> { // 过滤部分非本页的参考手册
  5769. let next = getCSS('li.next > a[href]')
  5770. if (next && next.href.indexOf('/index.') === -1) return next.href;
  5771. curSite = {SiteTypeID: 0}; return ''
  5772. },
  5773. pageE: 'css;#maincontent > *:not([class*="prenextnav"]):not(#bpn):not(#tpn)',
  5774. insertP: ['id("bpn") | //div[contains(@class, "prenextnav")][last()]', 1],
  5775. replaceE: 'css;ul.prenext, #navsecond',
  5776. scrollE: 'id("bpn") | //div[contains(@class, "prenextnav")][last()]',
  5777. forceHTTPS: true,
  5778. scrollD: 600
  5779. }
  5780. }, // W3school
  5781. w3cschool_cn: {
  5782. host: 'www.w3cschool.cn',
  5783. functionS: ()=> {if (location.pathname.split('/').length > 2) {curSite = DBSite.w3cschool_cn;}},
  5784. style: '.widget-body, #rfbanner {display: none !important;}',
  5785. pager: {
  5786. nextL: 'css;.next-link > a',
  5787. pageE: 'css;#pro-mian-header, .content-bg',
  5788. replaceE: 'css;.content-links, .splitter-sidebar',
  5789. scrollD: 1500
  5790. }
  5791. }, // W3Cschool
  5792. runoob: {
  5793. host: 'www.runoob.com',
  5794. functionS: ()=> {if (location.pathname.split('/').length > 2 && getCSS('#leftcolumn')) {curSite = DBSite.runoob;}},
  5795. style: '#comments, #postcomments, #respond, #footer {display: none !important;} .article-intro h1:not(:nth-of-type(1)) {margin: 30px 0 10px 0;}',
  5796. pager: {
  5797. nextL: ()=> { // 过滤部分非本页的参考手册
  5798. let next = getCSS('#leftcolumn > a[style]~a[href]')
  5799. if (next && next.href.split('/').length === location.href.split('/').length && next.href.split('/')[3] === location.href.split('/')[3]) return next.href;
  5800. next.href = location.href; curSite = {SiteTypeID: 0}; return ''
  5801. },
  5802. pageE: 'css;#content > *, script[src*="assets/js/main.min.js"]',
  5803. insertP: ['css;#content', 3],
  5804. replaceE: 'css;.previous-next-links, #leftcolumn',
  5805. scriptT: 2,
  5806. forceHTTPS: true,
  5807. scrollD: 1000
  5808. }
  5809. }, // 菜鸟教程
  5810. cnblogs: {
  5811. host: ['www.cnblogs.com', 'zzk.cnblogs.com'],
  5812. functionS: ()=> {
  5813. if (location.hostname === 'zzk.cnblogs.com') {
  5814. curSite = DBSite.cnblogs_search;
  5815. } else if (getCSS('#post_list')) {
  5816. curSite = DBSite.cnblogs_list;
  5817. } else if (location.pathname.split('/').length === 3 && getCSS('.topicListFooter')) {
  5818. curSite = DBSite.cnblogs;
  5819. if (!getCSS('#homepage_top_pager')) {
  5820. getCSS('.forFlow').insertAdjacentHTML(getAddTo(2), '<div id="homepage_top_pager" class="topicListFooter"></div>');
  5821. getCSS('.forFlow').insertAdjacentHTML(getAddTo(3), '<div id="homepage_bottom_pager" class="topicListFooter"></div>');
  5822. }
  5823. }
  5824. },
  5825. pager: {
  5826. nextL: '//div[@class="topicListFooter"]//a[contains(text(), "下一页")]',
  5827. pageE: 'css;div.day',
  5828. replaceE: 'css;.topicListFooter',
  5829. scrollD: 1000
  5830. }
  5831. }, // 博客园 - 文章列表(个人)
  5832. cnblogs_list: {
  5833. pager: {
  5834. nextL: '//div[@class="pager"]//a[contains(text(), ">")]',
  5835. pageE: 'css;#post_list > article',
  5836. replaceE: 'css;.pager',
  5837. scrollD: 1000
  5838. }
  5839. }, // 博客园 - 文章列表
  5840. cnblogs_search: {
  5841. pager: {
  5842. nextL: '//div[@class="pager"]//a[contains(text(), ">")]',
  5843. pageE: 'css;div.searchItem',
  5844. replaceE: 'css;.pager',
  5845. scrollD: 1000
  5846. }
  5847. }, // 博客园 - 搜索页
  5848. gitee: {
  5849. host: 'gitee.com',
  5850. functionS: ()=> {
  5851. if (indexOF('/explore/')) {
  5852. curSite = DBSite.gitee;
  5853. } else if (indexOF(/\/issues$/)) {
  5854. curSite = DBSite.gitee_issues;
  5855. } else if (indexOF(/\/releases/)) {
  5856. curSite = DBSite.gitee_releases;
  5857. } else if (indexOF(/\/tags/)) {
  5858. curSite = DBSite.gitee_tags;
  5859. }
  5860. if (curSite.SiteTypeID > 0 && !curSite.pager.nextL) {
  5861. curSite.pager.type = 1;
  5862. curSite.pager.nextL = 'css;a[rel="next"]';
  5863. curSite.pager.replaceE = 'css;.pagination';
  5864. curSite.pager.scrollD = 2500;
  5865. }
  5866. },
  5867. pager: {
  5868. pageE: 'css;.items > .item',
  5869. }
  5870. }, // Gitee - Explore 列表
  5871. gitee_issues: {
  5872. pager: {
  5873. pageE: 'css;.issue-wrapper',
  5874. }
  5875. }, // Gitee - Issues 列表
  5876. gitee_releases: {
  5877. pager: {
  5878. pageE: 'css;.release-tag-item',
  5879. }
  5880. }, // Gitee - Releases 列表
  5881. gitee_tags: {
  5882. pager: {
  5883. pageE: 'css;.tag-item',
  5884. }
  5885. }, // Gitee - Tags 列表
  5886. gitee_search: {
  5887. host: 'search.gitee.com',
  5888. functionS: ()=> {if (location.search) curSite = DBSite.gitee_search;},
  5889. pager: {
  5890. nextL: 'css;li.next:not(.disabled) > a',
  5891. pageE: 'css;#hits-list > div',
  5892. replaceE: 'css;ul.pagination',
  5893. scrollD: 1000
  5894. }
  5895. }, // Gitee - Search 列表
  5896. github: {
  5897. host: ['github.com', 'hub.fastgit.org'],
  5898. functionS: ()=> {locationC = true;
  5899. if (lp == '/') {
  5900. curSite = DBSite.github;
  5901. } else if (indexOF('tab=stars', 's')) {
  5902. curSite = DBSite.github_star;
  5903. } else if (indexOF('tab=repositories', 's')) {
  5904. curSite = DBSite.github_repositories;
  5905. } else if (indexOF(/\/issues$/) || indexOF(/\/pulls$/)) {
  5906. curSite = DBSite.github_issues;
  5907. } else if (indexOF(/\/discussions$/) || indexOF('/discussions/categories')) {
  5908. curSite = DBSite.github_discussions;
  5909. } else if (indexOF(/\/releases$/)) {
  5910. curSite = DBSite.github_releases;
  5911. } else if (indexOF(/\/tags$/)) {
  5912. curSite = DBSite.github_tags;
  5913. } else if (indexOF('/commits')) {
  5914. curSite = DBSite.github_commits;
  5915. } else if (indexOF('/notifications')) {
  5916. curSite = DBSite.github_notifications;
  5917. } else if (indexOF('/search')) {
  5918. if (!location.search) return
  5919. if (!indexOF('type=', 's')) {
  5920. if (lp == '/search') {
  5921. curSite = DBSite.github_search_repositories;
  5922. } else {
  5923. curSite = DBSite.github_search_code;
  5924. }
  5925. } else {
  5926. curSite = DBSite['github_search_' + /type=[a-z]+/.exec(location.search.toLowerCase())[0].replace('type=','')];
  5927. }
  5928. if (curSite.SiteTypeID > 0 && !curSite.pager.nextL) {
  5929. curSite.pager.type = 1;
  5930. curSite.pager.nextL = 'css;a.next_page';
  5931. curSite.pager.replaceE = 'css;.pagination';
  5932. curSite.pager.scrollD = 3000;
  5933. }
  5934. }},
  5935. pager: {
  5936. type: 2,
  5937. nextL: 'css;.ajax-pagination-btn',
  5938. nextText: 'More',
  5939. scrollD: 2500
  5940. }
  5941. }, // Github - 首页
  5942. github_star: {
  5943. pager: {
  5944. nextL: '//div[@class="paginate-container"]//a[contains(text(), "Next")]',
  5945. pageE: 'css;#js-pjax-container .position-relative div[class^="col-lg-"] > div:not(.position-relative):not(.paginate-container)',
  5946. insertP: ['css;.paginate-container', 1],
  5947. replaceE: 'css;.paginate-container',
  5948. scrollD: 3000
  5949. }
  5950. }, // Github - 用户 Star 列表
  5951. github_repositories: {
  5952. pager: {
  5953. nextL: '//div[@class="paginate-container"]//a[contains(text(), "Next")]',
  5954. pageE: 'css;#user-repositories-list > ul > li',
  5955. replaceE: 'css;.paginate-container',
  5956. scrollD: 3000
  5957. }
  5958. }, // Github - 用户 项目 列表
  5959. github_issues: {
  5960. pager: {
  5961. nextL: 'css;a.next_page',
  5962. pageE: 'css;.js-navigation-container.js-active-navigation-container > div[id^="issue_"]',
  5963. replaceE: 'css;.pagination',
  5964. scrollD: 3000
  5965. }
  5966. }, // Github - Issues 列表 / PR 列表
  5967. github_discussions: {
  5968. pager: {
  5969. nextL: 'css;a.next_page',
  5970. pageE: 'css;ul[aria-labelledby="discussions-list"] > li',
  5971. replaceE: 'css;.pagination',
  5972. scrollD: 3000
  5973. }
  5974. }, // Github - Discussions 列表
  5975. github_releases: {
  5976. pager: {
  5977. nextL: 'css;a.next_page',
  5978. pageE: 'css;#repo-content-pjax-container > div[data-pjax] > div:not(.paginate-container)',
  5979. replaceE: 'css;.pagination',
  5980. scrollD: 3000
  5981. }
  5982. }, // Github - Releases 列表
  5983. github_tags: {
  5984. pager: {
  5985. nextL: '//div[@class="pagination"]/a[contains(text(), "Next")]',
  5986. pageE: 'css;.Box-body > div.Box-row',
  5987. replaceE: 'css;.pagination',
  5988. scrollD: 3000
  5989. }
  5990. }, // Github - Tags 列表
  5991. github_commits: {
  5992. pager: {
  5993. nextL: '//div[@class="paginate-container"]//a[contains(text(), "Older")]',
  5994. pageE: 'css;div.js-navigation-container > div',
  5995. replaceE: 'css;.paginate-container',
  5996. scrollD: 3000
  5997. }
  5998. }, // Github - Commits 列表
  5999. github_notifications: {
  6000. pager: {
  6001. nextL: 'css;nav.paginate-container > a[aria-label="Next"]',
  6002. pageE: 'css;li.notifications-list-item',
  6003. replaceE: 'css;nav.paginate-container, .js-notifications-list-paginator-counts',
  6004. scrollD: 3000
  6005. }
  6006. }, // Github - Notifications 列表
  6007. github_search_repositories: {
  6008. pager: {
  6009. pageE: 'css;ul.repo-list > li',
  6010. }
  6011. }, //Github - Search 列表
  6012. github_search_code: {
  6013. pager: {
  6014. pageE: 'css;.code-list-item',
  6015. }
  6016. }, // Github - Search 列表 - Code
  6017. github_search_commits: {
  6018. pager: {
  6019. pageE: 'css;#commit_search_results > div',
  6020. }
  6021. }, // Github - Search 列表 - Commit
  6022. github_search_issues: {
  6023. pager: {
  6024. pageE: 'css;.issue-list-item',
  6025. }
  6026. }, // Github - Search 列表 - Issues
  6027. github_search_discussions: {
  6028. pager: {
  6029. pageE: 'css;.discussion-list-item',
  6030. }
  6031. }, // Github - Search 列表 - Discussions
  6032. github_search_registrypackages: {
  6033. pager: {
  6034. pageE: 'css;#package_search_results > div',
  6035. }
  6036. }, // Github - Search 列表 - Package
  6037. github_search_marketplace: {
  6038. pager: {
  6039. pageE: 'css;#marketplace_search_results > div:first-child > div',
  6040. }
  6041. }, // Github - Search 列表 - Marketplace
  6042. github_search_topics: {
  6043. pager: {
  6044. pageE: 'css;.topic-list-item',
  6045. }
  6046. }, // Github - Search 列表 - Topics
  6047. github_search_wikis: {
  6048. pager: {
  6049. pageE: 'css;#wiki_search_results > div:first-child > div',
  6050. }
  6051. }, // Github - Search 列表 - wiki
  6052. github_search_users: {
  6053. pager: {
  6054. pageE: 'css;#user_search_results > div:first-child > div',
  6055. }
  6056. }, // Github - Search 列表 - user
  6057. oi_wiki: {
  6058. host: 'oi-wiki.org',
  6059. style: 'blockquote.page-copyright, h2#__comments, form#gitalk-form {display: none !important;} article.md-content__inner{min-height: 700px;}',
  6060. pager: {
  6061. nextL: 'css;li.md-nav__item.md-nav__item--active.md-nav__item--nested li.md-nav__item--active+li a',
  6062. pageE: 'css;article.md-content__inner',
  6063. insertP: ['css;article.md-content__inner', 6],
  6064. replaceE: 'css;.md-sidebar.md-sidebar--primary',
  6065. scrollD: 1300
  6066. }
  6067. }, // OI Wiki
  6068. dusaiphoto: {
  6069. host: 'www.dusaiphoto.com',
  6070. functionS: ()=> {if (location.pathname.indexOf('/article/') > -1) {curSite = DBSite.dusaiphoto;}},
  6071. style: 'h1.article-title {margin-top: 80px;}',
  6072. pager: {
  6073. nextL: 'css;a.hvr-bounce-to-left',
  6074. pageE: 'css;#main > .mt-4 >div > .mb-4, #article_body',
  6075. replaceE: 'css;.col-12.font-title, #sidebar',
  6076. scrollD: 1500
  6077. }
  6078. }, // dusaiphoto
  6079. guokr: {
  6080. host: 'www.guokr.com',
  6081. pager: {
  6082. type: 2,
  6083. nextL: 'css;div[class*="LoadMoreWrap"]',
  6084. interval: 1500,
  6085. scrollD: 1500
  6086. }
  6087. }, // 果壳网
  6088. landian: {
  6089. host: 'www.landian.vip',
  6090. functionS: ()=> {if (lp != '/' && !indexOF('/archives/') && !indexOF('/search/')) {curSite = DBSite.landian;}},
  6091. style: '.pagination {display: none !important;}',
  6092. pager: {
  6093. nextL: ()=> getNextUPN(/(?<=\/page\/)\d+/, /\/page\/\d+/, '/page/', '', '2', getCSS('.pagination > button.end').textContent),
  6094. pageE: 'css;.content li.color-border',
  6095. scrollD: 1500
  6096. }
  6097. }, // 蓝点网
  6098. kenengba: {
  6099. host: 'kenengba.com',
  6100. functionS: ()=> {if (lp == '/' || indexOF('/page/') || indexOF('/category/') || indexOF('/tag/')) {curSite = DBSite.kenengba;}},
  6101. pager: {
  6102. nextL: '//div[@class="pagebar"]/a[@href and text()=">>"]',
  6103. pageE: 'css;article.post',
  6104. replaceE: 'css;.pagebar',
  6105. scrollD: 3000
  6106. }
  6107. }, // 可能吧
  6108. expreview: {
  6109. host: 'www.expreview.com',
  6110. pager: {
  6111. type: 2,
  6112. nextL: 'css;#show_article_red_1SHOW',
  6113. interval: 1500,
  6114. scrollD: 1500
  6115. }
  6116. }, // 超能网
  6117. ithome: {
  6118. host: 'www.ithome.com',
  6119. pager: {
  6120. type: 2,
  6121. nextL: 'css;a.more',
  6122. interval: 1500,
  6123. scrollD: 1500
  6124. }
  6125. }, // IT之家
  6126. _36kr: {
  6127. host: ['36kr.com', 'www.36kr.com'],
  6128. functionS: ()=> {if (lp != '/' && !indexOF('/p/') && !indexOF('/newsflashes/')) {curSite = DBSite._36kr;}},
  6129. pager: {
  6130. type: 2,
  6131. nextL: 'css;.kr-loading-more-button.show',
  6132. nextText: '查看更多',
  6133. scrollD: 1500
  6134. }
  6135. }, // 36氪
  6136. _36kr_m: {
  6137. host: 'm.36kr.com',
  6138. pager: {
  6139. type: 2,
  6140. nextL: 'css;.kr-loading-more-button-default',
  6141. nextText: '查看更多',
  6142. scrollD: 1500
  6143. }
  6144. }, // 36氪 - 手机版
  6145. sciencealert: {
  6146. host: 'www.sciencealert.com',
  6147. pager: {
  6148. type: 2,
  6149. nextL: 'css;.load-more',
  6150. nextTextOf: 'LOAD MORE',
  6151. scrollD: 2000
  6152. }
  6153. }, // ScienceAlert
  6154. zhutix: {
  6155. host: 'zhutix.com',
  6156. functionS: ()=> {if (getCSS('#post-list')) {
  6157. curSite = DBSite.zhutix;
  6158. } else {
  6159. curSite = DBSite.zhutix_list;
  6160. }},
  6161. pager: {
  6162. nextL: '//li[@class="next-page"]/a | //div[@class="btn-pager"]/a[contains(text(), "❯")]',
  6163. pageE: 'css;#post-list > ul > li',
  6164. replaceE: 'css;.pagination, .b2-pagenav.post-nav',
  6165. scrollD: 1500
  6166. }
  6167. }, // 致美化
  6168. zhutix_list: {
  6169. pager: {
  6170. nextL: 'css;li.next-page a',
  6171. pageE: 'css;#primary-home > div:not(.pagination)',
  6172. replaceE: 'css;.pagination',
  6173. scrollD: 1500
  6174. }
  6175. }, // 致美化 - 文章列表
  6176. lanzou: {
  6177. host: /\.lanzou[a-z]\./,
  6178. hiddenPN: true,
  6179. pager: {
  6180. type: 2,
  6181. nextL: 'css;#filemore',
  6182. nextTextOf: '更多',
  6183. isHidden: true,
  6184. scrollD: 800
  6185. }
  6186. }, // 蓝奏云 - 分享链接列表
  6187. lanzou_: {
  6188. host: 'pc.woozooo.com',
  6189. iframe: true,
  6190. hiddenPN: true,
  6191. pager: {
  6192. type: 2,
  6193. nextL: 'css;#filemore > span[onclick]',
  6194. nextText: '显示更多文件',
  6195. isHidden: true,
  6196. scrollD: 800
  6197. }
  6198. }, // 蓝奏云 - 后台
  6199. alipanso: {
  6200. host: 'www.alipanso.com',
  6201. functionS: ()=> {if (lp == '/search.html') {curSite = DBSite.alipanso;}},
  6202. style: '.pager-wrap {display: none !important;}',
  6203. pager: {
  6204. nextL: ()=> getNextUP('page=', /page=\d+/),
  6205. pageE: 'css;#res_list > div',
  6206. scrollD: 2000
  6207. }
  6208. }, // 阿里盘搜
  6209. wikihow: {
  6210. host: ['www.wikihow.com', 'zh.wikihow.com'],
  6211. functionS: ()=> {if (indexOF('/Category:')) {
  6212. curSite = DBSite.wikihow;
  6213. } else if (indexOF('/wikiHowTo') && indexOF('?search=', 's')) {
  6214. curSite = DBSite.wikihow_search;
  6215. }},
  6216. pager: {
  6217. nextL: 'css;a.pag_next',
  6218. pageE: 'css;#cat_all > .cat_grid > div',
  6219. replaceE: 'css;#large_pagination',
  6220. scriptT: 3,
  6221. scrollD: 2000
  6222. }
  6223. }, // 指南
  6224. wikihow_search: {
  6225. pager: {
  6226. nextL: 'css;#searchresults_footer > a.buttonright',
  6227. pageE: 'css;#searchresults_list > a',
  6228. replaceE: 'css;#searchresults_footer',
  6229. scrollD: 3000
  6230. }
  6231. }, // 指南 - 搜索页
  6232. afreecatv: {
  6233. host: 'www.afreecatv.com',
  6234. pager: {
  6235. type: 2,
  6236. nextL: 'css;.btn-more > button',
  6237. interval: 2000,
  6238. scrollD: 1000
  6239. }
  6240. }, // 直播
  6241. greasyfork: {
  6242. host: 'greasyfork.org',
  6243. functionS: ()=> {if (indexOF(/\/scripts$/) || indexOF('/scripts/by-site/')) {
  6244. curSite = DBSite.greasyfork;
  6245. } else if (indexOF(/\/feedback$/)) {
  6246. curSite = DBSite.greasyfork_feedback;
  6247. } else if (indexOF('/discussions') && !indexOF(/\/\d+/)) {
  6248. curSite = DBSite.greasyfork_discussions;
  6249. }},
  6250. pager: {
  6251. nextL: 'css;a.next_page',
  6252. pageE: 'css;ol#browse-script-list > li',
  6253. replaceE: 'css;.pagination',
  6254. scrollD: 1300
  6255. }
  6256. }, // GreasyFork
  6257. greasyfork_feedback: {
  6258. pager: {
  6259. nextL: 'css;a.next_page',
  6260. pageE: 'css;.script-discussion-list > div',
  6261. replaceE: 'css;.pagination',
  6262. scrollD: 1800
  6263. }
  6264. }, // GreasyFork - 反馈页
  6265. greasyfork_discussions: {
  6266. pager: {
  6267. nextL: 'css;a.next_page',
  6268. pageE: 'css;.discussion-list > div',
  6269. replaceE: 'css;.pagination',
  6270. scrollD: 1300
  6271. }
  6272. }, // GreasyFork - 讨论页
  6273. userscript: {
  6274. host: 'www.userscript.zone',
  6275. functionS: ()=> {if (lp == '/search') {curSite = DBSite.userscript;}},
  6276. pager: {
  6277. nextL: ()=> getNextF('css;.next > form'),
  6278. pageE: 'css;.row.script',
  6279. replaceE: 'css;.pagination',
  6280. scrollD: 1000
  6281. }
  6282. }, // UserScript
  6283. userstyles: {
  6284. host: 'userstyles.world',
  6285. functionS: ()=> {if (lp == '/explore') {curSite = DBSite.userstyles;}},
  6286. pager: {
  6287. nextL: 'css;a.Pagination-button.next',
  6288. pageE: 'css;.card',
  6289. replaceE: 'css;.Pagination',
  6290. scrollD: 1500
  6291. }
  6292. }, // UserStyles
  6293. getquicker: {
  6294. host: 'getquicker.net',
  6295. functionS: ()=> {if (indexOF('/Share/')) {curSite = DBSite.getquicker;}},
  6296. pager: {
  6297. nextL: '//a[@class="page-link" and text()="下一页"]',
  6298. pageE: 'css;table.table > tbody > tr:not(:first-child), script[src^="/js/site.js"]',
  6299. insertP: ['css;table.table > tbody', 3],
  6300. replaceE: 'css;ul.pagination',
  6301. scriptT: 2,
  6302. scrollD: 1000
  6303. }
  6304. }, // Quicker
  6305. xposed: {
  6306. host: 'repo.xposed.info',
  6307. functionS: ()=> {if (lp == '/module-overview') {curSite = DBSite.xposed;}},
  6308. pager: {
  6309. nextL: 'css;li.pager-next > a',
  6310. pageE: 'css;.view-content > table > tbody > tr',
  6311. replaceE: 'css;ul.pager',
  6312. scrollD: 1500
  6313. }
  6314. }, // Xposed
  6315. bookmarkearth: {
  6316. host: 'www.bookmarkearth.com',
  6317. functionS: ()=> {if (lp == '/' || lp == '/page') {
  6318. curSite = DBSite.bookmarkearth;
  6319. } else if (lp == '/s/search') {
  6320. curSite = DBSite.bookmarkearth_search;
  6321. }},
  6322. pager: {
  6323. nextL: ()=> getNextUP('currentPage=', /currentPage=\d+/, '/page', '2', getCSS('ul.pager').dataset.totalpage),
  6324. pageE: 'css;.document-piece',
  6325. replaceE: 'css;ul.pager',
  6326. scrollD: 1000
  6327. }
  6328. }, // 书签地球
  6329. bookmarkearth_search: {
  6330. pager: {
  6331. nextL: ()=> getNextEP('css;a.cut-page-item.active+a.cut-page-item', 'currentPage=', /currentPage=\d+/),
  6332. pageE: 'css;.document-piece',
  6333. replaceE: 'css;.cut-page',
  6334. scrollD: 1000
  6335. }
  6336. }, // 书签地球 - 搜索页
  6337. smzdm: {
  6338. host: ['www.smzdm.com', 'search.smzdm.com'],
  6339. functionS: ()=> {if (location.hostname === 'search.smzdm.com' || indexOF('/fenlei/') || indexOF(/\/mall\/.+\/.+/)) {curSite = DBSite.smzdm;}},
  6340. pager: {
  6341. nextL: '//ul[@class="pagenation-list"]//a[contains(text() ,"下一页")] | //ul[@class="pagenation-list"]/li[contains(@class, "next-page")]/a',
  6342. pageE: 'css;#feed-main-list > li',
  6343. replaceE: 'css;ul.pagenation-list',
  6344. scrollD: 1500
  6345. }
  6346. }, // 什么值得买 - 分类/搜索页
  6347. meidebi: {
  6348. host: 'www.meidebi.com',
  6349. functionS: ()=> {if (indexOF('/fenlei/') || lp == '/Search') {
  6350. curSite = DBSite.meidebi;
  6351. }},
  6352. pager: {
  6353. nextL: 'css;a.next',
  6354. pageE: 'css;.share-list > ul > li',
  6355. replaceE: 'css;.h-pages',
  6356. scrollD: 1500
  6357. }
  6358. }, // 没得比 - 分类/搜索页
  6359. ruyile_xuexiao: {
  6360. host: 'www.ruyile.com',
  6361. functionS: ()=> {
  6362. if (lp == '/xuexiao/') {
  6363. curSite = DBSite.ruyile_xuexiao;
  6364. } else if (lp == '/data/') {
  6365. curSite = DBSite.ruyile_data;
  6366. } else if (lp == '/shijuan/') {
  6367. curSite = DBSite.ruyile_shijuan;
  6368. }},
  6369. pager: {
  6370. nextL: '//div[@class="fy"]/a[contains(text(), "下一页")]',
  6371. pageE: 'css;.xxlb > .sk',
  6372. insertP: ['css;.xxlb', 3],
  6373. replaceE: 'css;.fy',
  6374. scrollD: 1000
  6375. }
  6376. }, // 如意了教育 - 学校
  6377. ruyile_data: {
  6378. pager: {
  6379. nextL: '//div[@class="fy"]/a[contains(text(), "下一页")]',
  6380. pageE: 'css;.m1_z > .lbk',
  6381. insertP: ['css;.page', 1],
  6382. replaceE: 'css;.fy',
  6383. scrollD: 1000
  6384. }
  6385. }, // 如意了教育 - 数据
  6386. ruyile_shijuan: {
  6387. pager: {
  6388. nextL: '//div[@class="fy"]/a[contains(text(), "下一页")]',
  6389. pageE: 'css;.m1_z > .m2_lb',
  6390. insertP: ['css;.page', 1],
  6391. replaceE: 'css;.fy',
  6392. scrollD: 1000
  6393. }
  6394. }, // 如意了教育 - 试卷
  6395. koolearn: {
  6396. host: 'cet4.koolearn.com',
  6397. pager: {
  6398. nextL: 'id("page")/a[text()="下一页"]',
  6399. pageE: 'css;ul.xqy_entry_list > li,.xqy_core_text > p:not([style="text-align:center"])',
  6400. insertP: ['css;ul.xqy_entry_list,.xqy_core_text', 3],
  6401. replaceE: 'css;#page',
  6402. scrollD: 2500
  6403. }
  6404. }, // 新东方在线
  6405. che168: {
  6406. host: 'www.che168.com',
  6407. functionS: ()=> {
  6408. if (lp != '/' && !indexOF('/dealer/')) {
  6409. curSite = DBSite.che168;
  6410. }},
  6411. pager: {
  6412. nextL: 'css;a.page-item-next',
  6413. pageE: 'css;ul.viewlist_ul > li',
  6414. replaceE: 'css;.page',
  6415. scrollD: 2000
  6416. }
  6417. }, // 二手车之家
  6418. jiligamefun: {
  6419. host: 'www.jiligamefun.com',
  6420. functionS: ()=> {if (indexOF('/category/')) {curSite = DBSite.jiligamefun;}},
  6421. pager: {
  6422. nextL: 'css;a.poi-pager__item.poi-pager__item_next',
  6423. pageE: 'css;.inn-archive__container > article',
  6424. replaceE: 'css;.poi-pager',
  6425. scrollD: 1800
  6426. }
  6427. }, // 叽哩叽哩日报
  6428. wendangku: {
  6429. host: 'www.wendangku.net',
  6430. functionS: ()=> {if (indexOF('/doc/')) {curSite = DBSite.wendangku;}},
  6431. pager: {
  6432. nextL: 'css;a.next',
  6433. pageE: 'css;#contents > *:not(.pages)',
  6434. replaceE: 'css;.pages',
  6435. scrollD: 1800
  6436. }
  6437. }, // 文档库
  6438. oshwhub: {
  6439. host: 'www.oshwhub.com',
  6440. functionS: ()=> {if (lp == '/explore') {curSite = DBSite.oshwhub;}},
  6441. pager: {
  6442. nextL: 'css;a.current+a',
  6443. pageE: 'css;.each-project',
  6444. replaceE: 'css;.page',
  6445. scriptT: 0,
  6446. scrollD: 1200
  6447. }
  6448. }, // 立创开源硬件平台
  6449. netbian: {
  6450. host: 'pic.netbian.com',
  6451. style: 'li.nextpage {display: none !important;}',
  6452. pager: {
  6453. nextL: '//div[@class="page"]/a[contains(text(),"下一页")]',
  6454. pageE: 'css;.slist ul > li:not(.nextpage)',
  6455. replaceE: 'css;.page',
  6456. scrollD: 1000
  6457. }
  6458. }, // 彼岸图网
  6459. ioliu: {
  6460. host: 'bing.ioliu.cn',
  6461. functionS: ()=> {if (!indexOF('/photo/') && !indexOF('.html')) {curSite = DBSite.ioliu; document.head.appendChild(document.createElement('base')).target = '_blank';}},
  6462. style: '.progressive--not-loaded {filter: none !important;}',
  6463. pager: {
  6464. nextL: '//div[@class="page"]/a[contains(text(), "下一页")]',
  6465. pageE: 'css;body > .container > div.item',
  6466. replaceE: 'css;.page',
  6467. scrollD: 1000
  6468. }
  6469. }, // 必应壁纸
  6470. konachan: {
  6471. host: 'konachan.net',
  6472. functionS: ()=> {if (indexOF('/post')) {curSite = DBSite.konachan; document.head.appendChild(document.createElement('base')).target = '_blank';}},
  6473. style: 'html, body {min-height: 1000px;} .javascript-hide {display: inline-block !important;} ul#post-list-posts img, ul#post-list-posts .inner{width: auto !important; height: auto !important;} ul#post-list-posts li {width: 33% !important;} a.directlink {margin: 0 !important;}',
  6474. pager: {
  6475. nextL: 'css;a.next_page',
  6476. pageE: 'css;ul#post-list-posts > li',
  6477. replaceE: 'css;#paginator',
  6478. scrollD: 1000
  6479. }
  6480. }, // 动漫壁纸
  6481. nastol: {
  6482. host: 'www.nastol.com.ua',
  6483. pager: {
  6484. nextL: '//a[./span[@class="nav-next"]]',
  6485. pageE: 'css;#dle-content > div',
  6486. replaceE: 'css;.navigation',
  6487. scrollD: 1000
  6488. }
  6489. }, // 壁纸
  6490. hdqwalls: {
  6491. host: 'hdqwalls.com',
  6492. pager: {
  6493. nextL: 'css;a#next',
  6494. pageE: 'css;.wallpapers_container > div.wall-resp',
  6495. replaceE: 'css;ul.pagination',
  6496. scrollD: 1000
  6497. }
  6498. }, // 壁纸
  6499. xinpianchang: {
  6500. host: 'www.xinpianchang.com',
  6501. style: '.lazy-img {opacity: 1 !important;}',
  6502. pager: {
  6503. nextL: 'css;.page > a[title="下一页"]',
  6504. pageE: 'css;div[class*="-container"] div[class*="-con"] > ul > li, div[class*="-container"] div[class*="-con"] > div[class*="-wrap"] > ul > li',
  6505. insertP: ['css;div[class*="-container"] div[class*="-con"] > ul, div[class*="-container"] div[class*="-con"] > div[class*="-wrap"] > ul', 3],
  6506. replaceE: 'css;.page',
  6507. scrollD: 2000
  6508. },
  6509. function: {
  6510. bF: src_bF,
  6511. bFp: [0, 'img[_src]', '_src']
  6512. }
  6513. }, // 新片场
  6514. tujigu: {
  6515. host: ['www.tuji001.com', 'www.tujigu.net'],
  6516. functionS: ()=> {
  6517. if (indexOF('/a/')) {
  6518. curSite = DBSite.tujigu;
  6519. } else if (lp != '/' && !indexOF('/search/')) {
  6520. curSite = DBSite.tujigu_list;
  6521. }},
  6522. style: '.content img {display: block !important;}',
  6523. pager: {
  6524. nextL: 'id("pages")/a[contains(text(), "下一页")]',
  6525. pageE: 'css;.content > img',
  6526. replaceE: 'css;#pages',
  6527. scrollD: 2000
  6528. }
  6529. }, // tujigu - 图片页
  6530. tujigu_list: {
  6531. pager: {
  6532. nextL: 'id("pages")/a[contains(text(), "下一页")]',
  6533. pageE: 'css;.hezi > ul > li',
  6534. insertP: ['//div[@class="hezi"][last()]/ul', 3],
  6535. replaceE: 'css;#pages',
  6536. scrollD: 1000
  6537. }
  6538. }, // tujigu - 分类页
  6539. mvtui: {
  6540. host: 'mvtui.com',
  6541. functionS: ()=> {if (indexOF('.html')) {curSite = DBSite.mvtui;} else {curSite = DBSite.mvtui_list;}},
  6542. pager: {
  6543. nextL: 'css;.article-paging span.current+a',
  6544. pageE: 'css;.article-content > p',
  6545. replaceE: 'css;.article-paging',
  6546. scrollD: 3000
  6547. }
  6548. }, // mvtui - 图片页
  6549. mvtui_list: {
  6550. pager: {
  6551. nextL: 'css;li.next-page a',
  6552. pageE: 'css;#posts > div',
  6553. replaceE: 'css;.pagination',
  6554. scrollD: 1500
  6555. },
  6556. function: {
  6557. bF: src_bF,
  6558. bFp: [0, 'img[data-src]', 'data-src']
  6559. }
  6560. }, // mvtui - 分类页
  6561. mzitu: {
  6562. host: 'www.mzitu.com',
  6563. functionS: ()=> {if (indexOF(/\/\d+/)) {curSite = DBSite.mzitu;getCSS('.main-image a[href]').href = 'javascript:void(0);'} else {curSite = DBSite.mzitu_list;}},
  6564. pager: {
  6565. nextL: '//div[@class="pagenavi"]/a[contains(string(), "下一页")]',
  6566. pageE: 'css;.main-image img',
  6567. replaceE: 'css;.pagenavi',
  6568. scrollD: 1500
  6569. }
  6570. }, // mzitu - 图片页
  6571. mzitu_list: {
  6572. pager: {
  6573. nextL: 'css;.next.page-numbers',
  6574. pageE: 'css;.postlist > ul > li',
  6575. replaceE: 'css;.pagination',
  6576. scrollD: 1000
  6577. },
  6578. function: {
  6579. bF: src_bF,
  6580. bFp: [0, 'img[data-original]', 'data-original']
  6581. }
  6582. }, // mzitu - 分类/搜索页
  6583. xiurenji: {
  6584. host: /\.xiuren[a-z]+\./,
  6585. functionS: ()=> {insStyle('img[src$=".gif"]:not([src*="logo"]) {display: none !important;}');
  6586. if (indexOF('.html') && !indexOF('/index')) {
  6587. curSite = DBSite.xiurenji;
  6588. } else if (indexOF('search')) {
  6589. curSite = DBSite.xiurenji_search;
  6590. } else {
  6591. curSite = DBSite.xiurenji_list;
  6592. }},
  6593. pager: {
  6594. nextL: '//div[@class="page"]/a[text()="下页"]',
  6595. pageE: 'css;div.content > p > *',
  6596. replaceE: 'css;.page',
  6597. scrollD: 1500
  6598. }
  6599. }, // xiurenji - 图片页
  6600. xiurenji_list: {
  6601. pager: {
  6602. nextL: '//div[@class="page"]/a[text()="下页"]',
  6603. pageE: 'css;li.i_list',
  6604. replaceE: 'css;.page',
  6605. scrollD: 1000
  6606. }
  6607. }, // xiurenji - 分类页
  6608. xiurenji_search: {
  6609. pager: {
  6610. nextL: 'css;.page > a.current+a',
  6611. pageE: 'css;.node > *',
  6612. replaceE: 'css;.page',
  6613. scrollD: 700
  6614. }
  6615. }, // xiurenji - 搜索页
  6616. jpxgmn: {
  6617. host: 'www.jpxgyw.net',
  6618. functionS: ()=> {
  6619. if (indexOF('.html')) {
  6620. curSite = DBSite.jpxgmn;
  6621. } else if (lp != '/' && indexOF('/search/')) {
  6622. curSite = DBSite.jpxgmn; curSite.pager.pageE = 'css;.related_posts > ul';
  6623. }},
  6624. pager: {
  6625. nextL: 'css;.pagination a.current+a',
  6626. pageE: 'css;.article-content img',
  6627. replaceE: 'css;.pagination',
  6628. interval: 500,
  6629. scrollD: 2000
  6630. }
  6631. }, // jpxgmn
  6632. tvv: {
  6633. host: /\.tvv\.tw/,
  6634. functionS: ()=> {if (lp == '/' || indexOF('/page/') || indexOF('/category/')) {curSite = DBSite.tvv;}},
  6635. style: '.blog-masonry, .blog-masonry-4col {height: auto !important;} .blog-listing {position: relative !important;float: left !important;top: auto !important;left: auto !important;} .blog-title > a {white-space: nowrap;overflow: hidden;text-overflow: ellipsis;} .blog-image img {min-height: 300px;}',
  6636. pager: {
  6637. nextL: 'css;a.next',
  6638. pageE: 'css;.blog-listing',
  6639. replaceE: 'css;.pagination',
  6640. scrollD: 2000
  6641. }
  6642. }, // tvv
  6643. mm131: {
  6644. host: ['www.mm131.net', 'www.mmm131.com'],
  6645. functionS: ()=> {if (indexOF('.html')) {curSite = DBSite.mm131;} else {curSite = DBSite.mm131_list;}},
  6646. retry: 300,
  6647. pager: {
  6648. nextL: '//div[@class="content-page"]/a[contains(text(), "下一页")]',
  6649. pageE: 'css;.content-pic img',
  6650. replaceE: 'css;.content-page',
  6651. scrollD: 2000
  6652. }
  6653. }, // MM131 - 图片页
  6654. mm131_list: {
  6655. pager: {
  6656. nextL: '//dd[@class="page"]/a[contains(text(), "下一页")]',
  6657. pageE: 'css;dl.list-left > dd:not([class="page"])',
  6658. replaceE: 'css;.page',
  6659. scrollD: 1000
  6660. }
  6661. }, // MM131 - 分类页
  6662. mm131_m: {
  6663. host: 'm.mmm131.com',
  6664. functionS: ()=> {insStyle('.bannert, .bannerb, bannert_ios, .bannerb_ios {display: none !important;}'); if (lp == '/') {curSite = DBSite.mm131_m_;} else if (indexOF('.html')) {curSite = DBSite.mm131_m;} else {curSite = DBSite.mm131_m_list;}},
  6665. retry: true,
  6666. pager: {
  6667. nextL: '//div[@class="paging"]/a[text()="下一张" or text()="下一页"]',
  6668. pageE: 'css;.post-content img',
  6669. replaceE: 'css;.paging',
  6670. scrollD: 2000
  6671. }
  6672. }, // MM131 - 手机版 - 图片页
  6673. mm131_m_list: {
  6674. pager: {
  6675. nextL: 'css;#xbtn',
  6676. pageE: 'css;#content > article',
  6677. replaceE: 'css;#webpage',
  6678. scrollD: 2000
  6679. },
  6680. function: {
  6681. bF: src_bF,
  6682. bFp: [0, 'img[data-img]', 'data-img']
  6683. }
  6684. }, // MM131 - 手机版 - 分类页
  6685. mm131_m_: {
  6686. pager: {
  6687. type: 2,
  6688. nextL: 'css;#webpage>span[onclick]',
  6689. isHidden: true,
  6690. interval: 500,
  6691. scrollD: 2000
  6692. }
  6693. }, // MM131 - 手机版 - 首页
  6694. mrcong: {
  6695. host: 'mrcong.com',
  6696. functionS: ()=> {if (lp == '/' || indexOF('/tag/')) {curSite = DBSite.mrcong_list;} else {curSite = DBSite.mrcong;}},
  6697. pager: {
  6698. nextL: 'css;.post-page-numbers.current+a.post-page-numbers',
  6699. pageE: 'css;#fukie2 > p > img',
  6700. replaceE: 'css;.page-link',
  6701. scrollD: 3000
  6702. }
  6703. }, // MrCong - 图片页
  6704. mrcong_list: {
  6705. pager: {
  6706. type: 3,
  6707. nextL: 'css;.current+a.page',
  6708. pageE: 'css;article.item-list',
  6709. scrollE: 'css;.pagination',
  6710. replaceE: 'css;.pagination',
  6711. scrollD: 2000
  6712. }
  6713. }, // MrCong - 分类页
  6714. buondua: {
  6715. host: 'buondua.com',
  6716. functionS: ()=> {if (indexOF(/-photos-\d+/)) {curSite = DBSite.buondua;} else {curSite = DBSite.buondua_list;}},
  6717. pager: {
  6718. type: 3,
  6719. nextL: '//nav[@class="pagination"]//span[./a[contains(@class, "is-current")]]/following-sibling::span[1]/a',
  6720. pageE: 'css;.article-fulltext > p',
  6721. scrollE: 'css;nav.pagination',
  6722. replaceE: 'css;nav.pagination',
  6723. scrollD: 1500
  6724. },
  6725. function: {
  6726. bF: src_bF,
  6727. bFp: [0, 'img[data-src]', 'data-src']
  6728. }
  6729. }, // Buon Dua - 图片页
  6730. buondua_list: {
  6731. pager: {
  6732. type: 3,
  6733. nextL: 'css;.pagination-next',
  6734. pageE: 'css;.items-row.column, .collection-item.column',
  6735. scrollE: 'css;nav.pagination',
  6736. replaceE: 'css;nav.pagination',
  6737. scrollD: 1200
  6738. },
  6739. function: {
  6740. bF: src_bF,
  6741. bFp: [0, 'img[data-src]', 'data-src']
  6742. }
  6743. }, // Buon Dua - 分类页
  6744. fnvshen: {
  6745. host: 'www.fnvshen.com',
  6746. functionS: ()=> {
  6747. if (indexOF('/gallery/') || indexOF('/tag/')) {
  6748. curSite = DBSite.fnvshen_list;
  6749. } else if (indexOF('/g/')) {
  6750. curSite = DBSite.fnvshen;
  6751. } else if (indexOF(/\/article\/\d+\//)) {
  6752. curSite = DBSite.fnvshen_article;
  6753. } else if (indexOF('/article/')) {
  6754. curSite = DBSite.fnvshen_article_list;
  6755. }},
  6756. pager: {
  6757. nextL: 'css;#pages > span +a:not(.a1)',
  6758. pageE: 'css;#hgallery > img',
  6759. replaceE: 'css;#pages',
  6760. scrollD: 1500
  6761. }
  6762. }, // fnvshen - 图片页
  6763. fnvshen_list: {
  6764. style: '.yalayi_box {display: none !important; margin: -4px 0 !important;}',
  6765. pager: {
  6766. nextL: '//div[@class="pagesYY"]//a[contains(text(), "下一页")]',
  6767. pageE: 'css;#listdiv > ul > li',
  6768. replaceE: 'css;.pagesYY',
  6769. scrollD: 1000
  6770. },
  6771. function: {
  6772. bF: src_bF,
  6773. bFp: [0, 'img[data-original]', 'data-original']
  6774. }
  6775. }, // fnvshen - 分类页
  6776. fnvshen_article_list: {
  6777. pager: {
  6778. nextL: '//div[@class="pagesYY"]//a[contains(text(), "下一页")]',
  6779. pageE: 'css;li.other_girlli',
  6780. replaceE: 'css;.pagesYY',
  6781. scrollD: 1000
  6782. }
  6783. }, //fnvshen - 文章列表
  6784. fnvshen_article: {
  6785. pager: {
  6786. nextL: 'css;.pagesYY a.cur+a',
  6787. pageE: 'css;#articleDiv',
  6788. insertP: ['css;#articleDiv', 6],
  6789. replaceE: 'css;.pagesYY',
  6790. scrollD: 1000
  6791. }
  6792. }, // fnvshen - 文章内
  6793. nvshen: {
  6794. host: 'www.99nvshen.com',
  6795. functionS: ()=> {
  6796. if (indexOF('/galleryList/') || indexOF('/modelList/')) {
  6797. curSite = DBSite.nvshen; curSite.pager.pageE = 'css;.book-list > div.col-sm-4';
  6798. } else if (indexOF('/gallery/')) {
  6799. curSite = DBSite.nvshen; curSite.pager.interval = 1500; curSite.pager.scrollD = 2500;
  6800. }},
  6801. pager: {
  6802. nextL: 'css;ul.pagination a[aria-label="Next"]',
  6803. pageE: 'css;a.gallery-detail-img',
  6804. replaceE: 'css;ul.pagination',
  6805. scrollD: 1500
  6806. }
  6807. }, // nvshen
  6808. xrmn5: {
  6809. host: 'www.xrmn5.cc',
  6810. functionS: ()=> {if (indexOF(/\d+\.html/)) {
  6811. curSite = DBSite.xrmn5;
  6812. } else if (indexOF('/search')) {
  6813. curSite = DBSite.xrmn5_search;
  6814. } else {
  6815. curSite = DBSite.xrmn5_list;
  6816. }},
  6817. pager: {
  6818. nextL: '//div[contains(@class, "page")]//a[contains(text(), "下页")]',
  6819. pageE: 'css;.content_left > p > img',
  6820. replaceE: 'css;.page',
  6821. scrollD: 3000
  6822. }
  6823. }, // xrmn5 - 图片页
  6824. xrmn5_list: {
  6825. pager: {
  6826. nextL: '//div[contains(@class, "page")]//a[contains(text(), "下页")]',
  6827. pageE: 'css;ul.update_area_lists > li',
  6828. replaceE: 'css;.page',
  6829. scrollD: 2000
  6830. }
  6831. }, // xrmn5 - 分类页
  6832. xrmn5_search: {
  6833. pager: {
  6834. nextL: 'css;.page a.current+a',
  6835. pageE: 'css;div.sousuo',
  6836. replaceE: 'css;.page',
  6837. scrollD: 2000
  6838. }
  6839. }, // xrmn5 - 搜索页
  6840. jpmn8: {
  6841. host: 'www.jpmn8.com',
  6842. functionS: ()=> {if (indexOF(/\/\d+\.html/)) {curSite = DBSite.jpmn8;} else if (lp != '/') {curSite = DBSite.jpmn8_list;}},
  6843. style: 'img[onload] {min-height: 500px;}',
  6844. pager: {
  6845. nextL: '//div[@class="pagination1"]//a[text()="下一页"]',
  6846. pageE: 'css;img[onload]',
  6847. replaceE: 'css;.pagination1',
  6848. scrollD: 3000
  6849. }
  6850. }, // jpmn8 - 图片页
  6851. jpmn8_list: {
  6852. pager: {
  6853. nextL: '//div[@class="pagination1"]//a[text()="下一页"]',
  6854. pageE: 'css;article.excerpt',
  6855. replaceE: 'css;.pagination1',
  6856. scrollD: 1500
  6857. }
  6858. }, // jpmn8 - 分类页
  6859. ku66: {
  6860. host: 'www.ku66.net',
  6861. functionS: ()=> {if (/\/\d+\.html/.test(location.pathname)) {curSite = DBSite.ku66;} else {curSite = DBSite.ku66_list;}},
  6862. style: '.content img {min-height: 500px;}',
  6863. pager: {
  6864. nextL: '//div[@class="NewPages"]//a[text()="下一页"]',
  6865. pageE: 'css;.content > img',
  6866. insertP: ['css;.content', 3],
  6867. replaceE: 'css;.NewPages',
  6868. scrollD: 4000
  6869. }
  6870. }, // ku66 - 图片页
  6871. ku66_list: {
  6872. pager: {
  6873. nextL: '//div[@class="NewPages"]//a[text()="下一页"]',
  6874. pageE: 'css;.TypeList > ul > li',
  6875. insertP: ['css;.TypeList > ul', 3],
  6876. replaceE: 'css;.NewPages',
  6877. scrollD: 1000
  6878. }
  6879. }, // ku66 - 分类页
  6880. ku66_m: {
  6881. host: 'm.ku66.net',
  6882. functionS: ()=> {if (/\/\d+\.html/.test(location.pathname)) {curSite = DBSite.ku66_m;} else {curSite = DBSite.ku66_m_list;}},
  6883. style: '.ArticleImageBox img {min-height: 200px;}',
  6884. pager: {
  6885. nextL: '//div[@class="article_page"]//a[text()="下一页"]',
  6886. pageE: 'css;.ArticleImageBox > *',
  6887. replaceE: 'css;.article_page',
  6888. scrollD: 4000
  6889. }
  6890. }, // ku66 - 手机版 - 图片页
  6891. ku66_m_list: {
  6892. pager: {
  6893. nextL: '//div[@class="article_page"]//a[text()="下一页"]',
  6894. pageE: 'css;.PictureList > ul > li',
  6895. replaceE: 'css;.article_page',
  6896. scrollD: 1000
  6897. }
  6898. }, // ku66 - 手机版 - 分类页
  6899. ku137: {
  6900. host: 'www.ku137.net',
  6901. functionS: ()=> {if (indexOF(/\/\d+\.html/)) {curSite = DBSite.ku137;} else if (lp != '/') {curSite = DBSite.ku137_list;}},
  6902. style: '.Title9, .dibu1, .dibu2 {display: none !important;} .content img {min-height: 500px;}',
  6903. pager: {
  6904. nextL: '//div[@class="page"]/a[text()="下一页"]',
  6905. pageE: 'css;.content > img',
  6906. replaceE: 'css;.page',
  6907. scrollD: 3000
  6908. }
  6909. }, // ku137 - 图片页
  6910. ku137_list: {
  6911. pager: {
  6912. nextL: '//div[@class="page"]/a[text()="下一页"]',
  6913. pageE: 'css;.m-list > ul > li',
  6914. replaceE: 'css;.page',
  6915. scrollD: 1500
  6916. }
  6917. }, // ku137 - 分类页
  6918. ku137_m: {
  6919. host: 'm.ku137.net',
  6920. functionS: ()=> {if (indexOF(/\/\d+\.html/)) {curSite = DBSite.ku137_m;} else if (lp != '/') {curSite = DBSite.ku137_m_list;}},
  6921. style: '.ArticleImageBox img {min-height: 300px;}',
  6922. pager: {
  6923. nextL: '//div[@class="article_page"]//a[text()="下一页"]',
  6924. pageE: 'css;.ArticleImageBox > *',
  6925. replaceE: 'css;.article_page',
  6926. scrollD: 3000
  6927. }
  6928. }, // ku137 - 手机版 - 图片页
  6929. ku137_m_list: {
  6930. pager: {
  6931. nextL: '//div[@class="article_page"]//a[text()="下一页"]',
  6932. pageE: 'css;.PictureList > ul > li',
  6933. replaceE: 'css;.article_page',
  6934. scrollD: 1500
  6935. }
  6936. }, // ku137 - 手机版 - 分类页
  6937. mnttz: {
  6938. host: 'www.mnttz.com',
  6939. functionS: ()=> {if (indexOF(/\/\d+\.html/)) {curSite = DBSite.mnttz;} else {curSite = DBSite.mnttz_list;}},
  6940. style: 'img.content_img {min-height: 500px;}',
  6941. pager: {
  6942. nextL: 'css;.article-paging > span+a',
  6943. pageE: 'css;img.content_img',
  6944. replaceE: 'css;.article-paging',
  6945. scrollD: 3000
  6946. }
  6947. }, // mnttz - 图片页
  6948. mnttz_list: {
  6949. pager: {
  6950. nextL: 'css;li.next-page > a',
  6951. pageE: 'css;article.excerpt',
  6952. replaceE: 'css;.pagination',
  6953. scrollD: 1500
  6954. },
  6955. function: {
  6956. bF: src_bF,
  6957. bFp: [0, 'img[data-src]', 'data-src']
  6958. }
  6959. }, // mnttz - 分类页
  6960. kingdom: {
  6961. host: /kingdom-en\.com/,
  6962. functionS: ()=> {if (indexOF(/\/\d+\.html/)) {curSite = DBSite.kingdom;} else if (lp != '/') {curSite = DBSite.kingdom_list;}},
  6963. style: '.pic_center img {min-height: 300px;} .arcmain > .title, .footer, .index-list-title, .listmain_st {display: none !important;}',
  6964. pager: {
  6965. nextL: 'css;a.page_next',
  6966. pageE: 'css;.pic_center img',
  6967. replaceE: 'css;.pagenav',
  6968. scrollD: 4000
  6969. }
  6970. }, // kingdom - 图片页
  6971. kingdom_list: {
  6972. pager: {
  6973. nextL: 'css;a.page_next',
  6974. pageE: 'css;li.media',
  6975. replaceE: 'css;.pagination',
  6976. scrollD: 1000
  6977. },
  6978. function: {
  6979. bF: src_bF,
  6980. bFp: [0, 'img[data-src]', 'data-src']
  6981. }
  6982. }, // kingdom - 分类页
  6983. kissgoddess: {
  6984. host: /kissgoddess\./,
  6985. functionS: ()=> {if (indexOF('/album/') || indexOF('/category/')) curSite = DBSite.kissgoddess;},
  6986. style: '.td-gallery-content > img {min-height: 300px;}',
  6987. pager: {
  6988. nextL: 'css;a.a1:last-of-type',
  6989. pageE: 'css;.td-gallery-content > img, .td-category-span',
  6990. replaceE: 'css;#pages',
  6991. scrollD: 3000
  6992. },
  6993. function: {
  6994. bF: src_bF,
  6995. bFp: [0, 'img[data-original]', 'data-original']
  6996. }
  6997. }, // Kiss Goddess - 图片页
  6998. planetminecraft: {
  6999. host: 'www.planetminecraft.com',
  7000. functionS: ()=> {if (!indexOF('/forums/') && !indexOF('/posts/')) {curSite = DBSite.planetminecraft;}},
  7001. style: '.resource .r-preview>a img[loading=lazy]:not(.lazyloaded) {visibility: initial !important;}',
  7002. pager: {
  7003. nextL: 'css;a.pagination_next',
  7004. pageE: 'css;.resource_block > ul.resource_list > li',
  7005. replaceE: 'css;.pagination',
  7006. scrollD: 3000
  7007. }
  7008. }, // Planet Minecraft
  7009. cadtutor: {
  7010. host: 'www.cadtutor.net',
  7011. functionS: ()=> {
  7012. if (indexOF('/forum/forum/')) {
  7013. curSite = DBSite.cadtutor;
  7014. } else if (indexOF('/forum/topic/') && GM_getValue('menu_thread')) {
  7015. curSite = DBSite.cadtutor_post;
  7016. } else if (indexOF('/forum/search/')) {
  7017. curSite = DBSite.cadtutor_search;
  7018. }},
  7019. pager: {
  7020. nextL: 'css;a[rel="next"]',
  7021. pageE: 'css;ol.ipsDataList > li:not([data-rowid])~li',
  7022. replaceE: 'css;ul.ipsPagination',
  7023. scrollD: 2000
  7024. }
  7025. }, // CADTutor - 列表页
  7026. cadtutor_post: {
  7027. pager: {
  7028. nextL: 'css;a[rel="next"]',
  7029. pageE: 'css;#elPostFeed > form > *:not(input):not(.after-first-post)',
  7030. replaceE: 'css;ul.ipsPagination',
  7031. scrollD: 2000
  7032. }
  7033. }, // CADTutor - 帖子内
  7034. cadtutor_search: {
  7035. pager: {
  7036. nextL: 'css;a[rel="next"]',
  7037. pageE: 'css;ol.ipsStream > li',
  7038. replaceE: 'css;ul.ipsPagination',
  7039. scrollD: 2000
  7040. }
  7041. }, // CADTutor - 搜索页
  7042. theswamp: {
  7043. host: 'www.theswamp.org',
  7044. functionS: ()=> {
  7045. if (!location.search) return
  7046. if (indexOF('board=', 's')) {
  7047. curSite = DBSite.theswamp;
  7048. } else if (indexOF('topic=', 's') && GM_getValue('menu_thread')) {
  7049. curSite = DBSite.theswamp_post;
  7050. }},
  7051. pager: {
  7052. nextL: 'css;.pagelinks > strong+a',
  7053. pageE: 'css;#messageindex tbody > tr:not([class])',
  7054. replaceE: 'css;.pagelinks',
  7055. scrollD: 2000
  7056. }
  7057. }, // TheSwamp - 列表页
  7058. theswamp_post: {
  7059. pager: {
  7060. nextL: 'css;.pagelinks > strong+a',
  7061. pageE: 'css;#forumposts form > *',
  7062. replaceE: 'css;.pagelinks',
  7063. scrollD: 2000
  7064. }
  7065. } // TheSwamp - 帖子内
  7066. };
  7067. // 生成 SiteTypeID
  7068. DBSite = Object.assign(GM_getValue('menu_customRules'), DBSite)
  7069. setSiteTypeID();
  7070. // 用于脚本判断(针对部分特殊的网站)
  7071. SiteType = {
  7072. BAIDU_TIEBA: DBSite.baidu_tieba.SiteTypeID
  7073. };
  7074. }
  7075.  
  7076.  
  7077. // --------------------------------------------------------
  7078.  
  7079.  
  7080. // 自动无缝翻页
  7081. function pageLoading() {
  7082. if (curSite.SiteTypeID == 0) return
  7083. windowScroll(function (direction, e) {
  7084. // 下滑 且 未暂停翻页 且 SiteTypeID > 0 时,才准备翻页
  7085. if (direction != 'down' || !pausePage || curSite.SiteTypeID == 0) return
  7086. if (!curSite.pager.type) curSite.pager.type = 1
  7087. // 翻页模式 5 且为框架内时,要判断顶层是否通过页码暂停翻页了
  7088. if (curSite.pager.type == 5 && self != top && window.top.document.xiu_pausePage == false) return
  7089.  
  7090. let scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop,
  7091. scrollHeight = window.innerHeight || document.documentElement.clientHeight,
  7092. scrollD = curSite.pager.scrollD;
  7093. // <<<<< 翻页类型 3(依靠 [基准元素] 与 [浏览器可视区域底部] 之间的距离缩小来触发翻页)>>>>>
  7094. if (curSite.pager.type === 3) {
  7095. let scrollE = getOne(curSite.pager.scrollE);
  7096. //console.log(scrollE.offsetTop, scrollE.offsetTop - (scrollTop + scrollHeight), scrollD, scrollTop + scrollHeight, curSite.SiteTypeID)
  7097. if (scrollE.offsetTop - (scrollTop + scrollHeight) <= scrollD) {intervalPause(); checkURL(getPageElems);}
  7098.  
  7099. } else if (document.documentElement.scrollHeight <= scrollHeight + scrollTop + scrollD) {
  7100. // <<<<< 翻页类型 1(由脚本实现自动无缝翻页)>>>>>
  7101. if (curSite.pager.type === 1) {
  7102. intervalPause(); checkURL(getPageElems);
  7103.  
  7104. // <<<<< 翻页类型 2(网站自带了自动无缝翻页功能,只需要点击下一页按钮即可)>>>>>
  7105. } else if (curSite.pager.type === 2) {
  7106. let autopbn = getOne(curSite.pager.nextL);
  7107. if (!autopbn) return
  7108. if (curSite.pager.isHidden && isHidden(autopbn)) return // 如果 isHidden = true,那么需要判断元素是否隐藏
  7109. if (curSite.pager.nextText) {
  7110. // 按钮文本,当按钮文本 = 该文本时,才会点击按钮加载下一页
  7111. if (autopbn.innerText === curSite.pager.nextText) {autopbn.click(); pageNum.now = pageNum._now + 1;}
  7112. } else if (curSite.pager.nextTextOf) {
  7113. // 按钮文本的一部分,当按钮文本包含该文本时,才会点击按钮加载下一页
  7114. if (autopbn.innerText.indexOf(curSite.pager.nextTextOf) > -1) {autopbn.click(); pageNum.now = pageNum._now + 1;}
  7115. } else if (curSite.pager.nextHTML) {
  7116. // 按钮内元素,当按钮内元素 = 该元素内容时,才会点击按钮加载下一页
  7117. if (autopbn.innerHTML === curSite.pager.nextHTML) {autopbn.click(); pageNum.now = pageNum._now + 1;}
  7118. } else {
  7119. // 对于没有按钮文字变化的按钮,可以指定间隔时间(默认 300ms)
  7120. if (!curSite.pager.interval) curSite.pager.interval = 300;
  7121. intervalPause();
  7122. // 如果没有指定按钮文字就直接点击
  7123. autopbn.click(); pageNum.now = pageNum._now + 1;
  7124. }
  7125.  
  7126. // <<<<< 翻页类型 4(部分简单的动态加载类网站)>>>>>
  7127. } else if (curSite.pager.type === 4) {
  7128. // 为百度贴吧的发帖考虑,预留底部一小部分...
  7129. if (!(curSite.SiteTypeID === SiteType.BAIDU_TIEBA && document.documentElement.scrollHeight <= scrollHeight + scrollTop + 200)) {
  7130. intervalPause(); if (typeof curSite.pager.nextL == 'function') {curSite.pager.nextL();} else if (getNextE(curSite.pager.nextL)) {getPageElems_(curSite.pageUrl);}
  7131. }
  7132.  
  7133. // <<<<< 翻页类型 5(插入 iframe 方式来加载下一页)>>>>>
  7134. } else if (curSite.pager.type === 5) {
  7135. checkURL(insIframe);
  7136.  
  7137. // <<<<< 翻页类型 6(通过 iframe 获取下一页动态加载内容)>>>>>
  7138. } else if (curSite.pager.type === 6) {checkURL(insIframe_);}
  7139. }
  7140. });
  7141.  
  7142. function intervalPause() {
  7143. if (curSite.pager.interval) {
  7144. pausePage = false
  7145. setTimeout(function(){pausePage = true;}, curSite.pager.interval)
  7146. }
  7147. }
  7148. }
  7149.  
  7150. // 翻页类型 1/3
  7151. function getPageElems(url) {
  7152. GM_xmlhttpRequest({
  7153. url: url,
  7154. method: 'GET',
  7155. overrideMimeType: 'text/html; charset=' + document.charset,
  7156. headers: {
  7157. 'Referer': location.href,
  7158. 'User-Agent': navigator.userAgent
  7159. },
  7160. timeout: 10000,
  7161. onload: function (response) {
  7162. try {
  7163. //console.log('URL:' + url, '最终 URL:' + response.finalUrl, '返回内容:' + response.responseText)
  7164. processElems(createDocumentByString(response.responseText));
  7165. } catch (e) {
  7166. console.log(e);
  7167. }
  7168. }
  7169. });
  7170. }
  7171. // 翻页类型 4
  7172. function getPageElems_(url, type = '', method = 'GET', data = '', type2) {
  7173. let mimeType;
  7174. switch (type) {
  7175. case 'json':
  7176. mimeType = 'application/json; charset=' + document.charset; break;
  7177. case 'text':
  7178. mimeType = 'text/plain; charset=' + document.charset; break;
  7179. default:
  7180. mimeType = 'text/html; charset=' + document.charset;
  7181. }
  7182.  
  7183. GM_xmlhttpRequest({
  7184. url: url,
  7185. method: method,
  7186. data: data,
  7187. responseType: type,
  7188. overrideMimeType: mimeType,
  7189. headers: {
  7190. 'Referer': location.href,
  7191. 'Content-Type': (method === 'POST') ? 'application/x-www-form-urlencoded':'',
  7192. 'User-Agent': navigator.userAgent
  7193. },
  7194. timeout: 10000,
  7195. onload: function (response) {
  7196. try {
  7197. //console.log('最终 URL:' + response.finalUrl, '返回内容:' + response.responseText)
  7198. switch (type) {
  7199. case 'json':
  7200. curSite.pager.insertE(response.response, type2);
  7201. break;
  7202. case 'text':
  7203. curSite.pager.insertE(response.responseText, type2)
  7204. break;
  7205. default:
  7206. curSite.pager.insertE(createDocumentByString(response.responseText), type2)
  7207. }
  7208. } catch (e) {
  7209. console.log(e);
  7210. }
  7211. }
  7212. });
  7213. }
  7214. // 翻页类型 5(插入 iframe 方式加载下一页,无限套娃)
  7215. function insIframe(src) {
  7216. // 停用当前页面翻页
  7217. if (curSite.SiteTypeID == 0) return
  7218. curSite.SiteTypeID = 0;
  7219.  
  7220. // 创建 iframe
  7221. let iframe = document.createElement('iframe');
  7222. iframe.style = 'position: absolute; width: 100%; height: 100%; border: none;';
  7223. iframe.id = 'xiu_iframe';
  7224. iframe.src = src;
  7225.  
  7226. var beforeScrollTop = document.documentElement.scrollTop || document.body.scrollTop
  7227. // 当滚动条到底部时(即完全显示 iframe 框架),隐藏当前页面的滚动条
  7228. window.addEventListener('scroll', function () {
  7229. let scrollTop = document.documentElement.scrollTop || document.body.scrollTop,
  7230. clientHeight = document.documentElement.clientHeight || document.body.clientHeight,
  7231. scrollHeight = document.documentElement.scrollHeight || document.body.scrollHeight,
  7232. afterScrollTop = document.documentElement.scrollTop || document.body.scrollTop,
  7233. delta = afterScrollTop - beforeScrollTop;
  7234. if (delta == 0) return false;
  7235. beforeScrollTop = afterScrollTop;
  7236.  
  7237. //console.log(delta, (scrollTop + clientHeight + 10), scrollHeight, '1111')
  7238. if (delta > 0 && scrollTop + clientHeight + 10 >= scrollHeight && !getCSS('#xiu-scroll')) {
  7239. let newStyle = document.createElement('style'); newStyle.id = 'xiu-scroll';
  7240. newStyle.textContent = 'html::-webkit-scrollbar, body::-webkit-scrollbar {width: 0 !important;height: 0 !important;} html, body {scrollbar-width: none !important;}';
  7241. if (curSite.pager.style) newStyle.textContent += curSite.pager.style;
  7242. document.documentElement.appendChild(newStyle);
  7243. iframe.focus();
  7244. iframe.document.body.focus();
  7245. //iframe.document.body.click();
  7246. } else if (delta < 0 && getCSS('#xiu-scroll')) {
  7247. getCSS('#xiu-scroll').remove();
  7248. }
  7249. }, false);
  7250.  
  7251. // 加载完成后才继续
  7252. iframe.onload = function() {
  7253. // 添加历史记录
  7254. if (curSite.history !== false) addHistory(iframe.contentWindow.document, iframe.contentWindow.document.title);
  7255. // 当前页码 + 1
  7256. if (!curSite.hiddenPN) {
  7257. let autopageNumber = getCSS('#Autopage_number', window.top.document)
  7258. if (autopageNumber) {autopageNumber.textContent = parseInt(autopageNumber.textContent) + 1;}
  7259. }
  7260. }
  7261.  
  7262. // 插入 iframe
  7263. document.documentElement.appendChild(iframe);
  7264. }
  7265. // 翻页类型 6(通过 iframe 获取下一页动态加载内容,只有一个娃)
  7266. function insIframe_(src) {
  7267. // 暂停翻页
  7268. if (!pausePage) return
  7269. pausePage = false
  7270. //console.log(src)
  7271. // 如果不存在,则创建一个 iframe
  7272. let iframe = document.getElementById('xiu_iframe');
  7273. if (!iframe) {
  7274. iframe = document.createElement('iframe');
  7275. iframe.style = 'position: absolute; top: -9999px; left: -9999px; width: 100%; height: 100%; border: none; z-index: -999; /*visibility: hidden;*/';
  7276. iframe.id = 'xiu_iframe';
  7277. iframe.src = src;
  7278. }
  7279.  
  7280. // 加载完成后才继续
  7281. iframe.onload = function() {
  7282. //iframe.contentWindow.scrollTo(0, 999999); // 滚动到底部,以触发网页的滚动条相关加载事件
  7283. //iframe.contentWindow.scrollTo({top: 9999999, behavior: 'smooth'});
  7284. if (!curSite.pager.loadTime) curSite.pager.loadTime = 100; // 默认 100ms
  7285. //console.log(curSite.pager.loadTime, curSite.pager.loadTime/30)
  7286. //console.time('sort');
  7287. let time1 = 0 ,time2 = setInterval(function(){
  7288. let scrollHeight = (iframe.contentWindow.document.documentElement.scrollHeight || iframe.contentWindow.document.body.scrollHeight)/10
  7289. iframe.contentWindow.scrollTo(0, 999999);
  7290. iframe.contentWindow.scrollTo(0, scrollHeight*time1);
  7291. //console.log(time1, iframe.contentWindow.document.documentElement.scrollHeight || iframe.contentWindow.document.body.scrollHeight)
  7292. if (++time1 == 10) {
  7293. //console.timeEnd('sort');
  7294. clearInterval(time2);
  7295. processElems(iframe.contentWindow.document); // 插入/替换元素等
  7296. //console.log(iframe.contentWindow.document.documentElement.scrollHeight || iframe.contentWindow.document.body.scrollHeight)
  7297. pausePage = true; // 恢复翻页
  7298. }
  7299. }, curSite.pager.loadTime/10)
  7300. }
  7301.  
  7302. // 插入 iframe(如果已存在则直接改 src)
  7303. if (document.getElementById('xiu_iframe')) {
  7304. iframe.src = src;
  7305. } else {
  7306. document.documentElement.appendChild(iframe);
  7307. }
  7308. }
  7309.  
  7310.  
  7311. // XHR 后处理结果,插入、替换元素等(适用于翻页类型 1/3/6)
  7312. function processElems(response) {
  7313. if (!curSite.pager.insertP) {curSite.pager.insertP = [curSite.pager.pageE, 5]}
  7314. let pageElems = getAll(curSite.pager.pageE, response, response), toElement;
  7315. if (curSite.pager.insertP[1] === 5) { // 插入 pageE 列表最后一个元素的后面
  7316. toElement = getAll(curSite.pager.insertP[0]).pop();
  7317. } else {
  7318. toElement = getOne(curSite.pager.insertP[0]);
  7319. }
  7320. //console.log(curSite.pager.pageE, pageElems, curSite.pager.insertP, toElement)
  7321.  
  7322. if (pageElems.length > 0 && toElement) {
  7323. // 如果有插入前函数就执行函数
  7324. if (curSite.function && curSite.function.bF) {
  7325. if (curSite.function.bFp) { // 如果指定了参数
  7326. if (typeof(curSite.function.bF) == 'string') { // 如果是字符串,说明是自定义规则
  7327. //console.log(curSite.function.bF, curSite.function.bFp)
  7328. pageElems = window.autoPage[curSite.function.bF](pageElems, curSite.function.bFp);
  7329. } else {
  7330. pageElems = curSite.function.bF(pageElems, curSite.function.bFp);
  7331. }
  7332. } else {
  7333. //console.log(curSite.function.bF)
  7334. if (typeof(curSite.function.bF) == 'string') { // 如果是字符串,说明是自定义规则
  7335. pageElems = window.autoPage[curSite.function.bF](pageElems);
  7336. } else {
  7337. pageElems = curSite.function.bF(pageElems);
  7338. }
  7339. }
  7340. }
  7341.  
  7342. // 插入位置
  7343. let addTo = getAddTo(curSite.pager.insertP[1]);
  7344.  
  7345. // 插入新页面元素
  7346. if (curSite.pager.insertP[1] === 6) { // 插入到目标内部末尾(针对文本,比如小说网页)
  7347. let afterend = '';
  7348. if (curSite.pager.insertP6Br) afterend += '<br/><br/>'
  7349. pageElems.forEach(function (one) {afterend += one.innerHTML;});
  7350. toElement.insertAdjacentHTML(addTo, afterend);
  7351. } else {
  7352. if (curSite.pager.insertP[1] === 2 || curSite.pager.insertP[1] === 4 || curSite.pager.insertP[1] === 5) pageElems.reverse(); // 插入到 [元素内头部]、[目标本身后面] 时,需要反转顺序
  7353. pageElems.forEach(function (one) {toElement.insertAdjacentElement(addTo, one);});
  7354. }
  7355.  
  7356. // 当前页码 + 1
  7357. pageNum.now = pageNum._now + 1
  7358.  
  7359. // 添加历史记录
  7360. if (curSite.history !== false) addHistory(response);
  7361.  
  7362. // 替换待替换元素
  7363. if (curSite.pager.replaceE) replaceElems(response);
  7364.  
  7365. // 插入 <script> 标签
  7366. if (curSite.pager.scriptT || curSite.pager.scriptT == 0) {
  7367. switch (curSite.pager.scriptT) {
  7368. case 0: // 下一页的所有 <script> 标签
  7369. insScript('css;script', toElement, response); break;
  7370. case 1: // 下一页的所有 <script> 标签(不包括 src 链接)
  7371. insScript('css;script:not([src])', toElement, response); break;
  7372. case 2: // 下一页主体元素 (pageE) 的同级 <script> 标签
  7373. insScript(null, toElement, pageElems); break;
  7374. case 3: // 下一页主体元素 (pageE) 的子元素 <script> 标签
  7375. insScript('css;script:not([src])', toElement, pageElems); break;
  7376. }
  7377. }
  7378.  
  7379. // 如果有插入后函数就执行函数
  7380. if (curSite.function && curSite.function.aF) {
  7381. if (curSite.function.aFp) { // 如果指定了参数
  7382. curSite.function.aF(curSite.function.aFp);
  7383. } else {
  7384. if (typeof(curSite.function.aF) == 'string') { // 如果是字符串,说明是自定义规则
  7385. //console.log(curSite.function.aF)
  7386. if (window.autoPage[curSite.function.aF]) {
  7387. window.autoPage[curSite.function.aF]();
  7388. } else {
  7389. new Function (curSite.function.aF)();
  7390. }
  7391. } else {
  7392. curSite.function.aF();
  7393. }
  7394. }
  7395. }
  7396. } else { // 获取主体元素失败后,尝试重新获取
  7397. console.log(curSite.pager.pageE, pageElems, curSite.pager.insertP, toElement)
  7398. if (curSite.retry) {
  7399. console.warn('[自动无缝翻页] 获取主体元素失败,尝试重新获取...')
  7400. setTimeout(function(){curSite.pageUrl = '';}, curSite.retry)
  7401. } else { // 尝试替换元素看能不能继续翻页下去
  7402. if (curSite.pager.replaceE) {
  7403. if (replaceElems(response)) { // 如果替换成功
  7404. console.log('[自动无缝翻页] 获取主体元素失败,尝试替换元素成功!')
  7405. pageNum.now = pageNum._now + 1; // 当前页码 + 1
  7406. if (curSite.history !== false) addHistory(response); // 添加历史记录
  7407. } else {console.error('[自动无缝翻页] 获取主体元素失败,尝试替换元素失败...')}
  7408. }
  7409. }
  7410. }
  7411. }
  7412. // 通用型插入前函数(加载图片)
  7413. function src_bF(pageElems, css) {
  7414. pageElems.forEach(function (one) {
  7415. if (css[0] == 0) { // src 图片
  7416. if (one.tagName == 'IMG' && one.getAttribute(css[2])) one.src = one.getAttribute(css[2]);
  7417. one.querySelectorAll(css[1]).forEach(function (now) {
  7418. now.src = now.getAttribute(css[2]);
  7419. });
  7420. } else if (css[0] == 1) { // 背景图片
  7421. if (one.tagName == 'IMG' && one.getAttribute(css[2])) one.style.backgroundImage = 'url("' + one.getAttribute(css[2]) + '")';
  7422. one.querySelectorAll(css[1]).forEach(function (now) {
  7423. now.style.backgroundImage = 'url("' + now.getAttribute(css[2]) + '")';
  7424. });
  7425. }
  7426. });
  7427. return pageElems
  7428. }
  7429. // 文字型插入前函数(正则过滤)
  7430. function xs_bF(pageElems, reg) {
  7431. pageElems.forEach(function (one) {
  7432. one.innerHTML = one.innerHTML.replace(reg[0], reg[1])
  7433. });
  7434. return pageElems
  7435. }
  7436.  
  7437. // 通用型获取下一页地址(从 元素 中获取页码)
  7438. function getNextE(css) {
  7439. if (!css) css = curSite.pager.nextL;
  7440. let next = getOne(css);
  7441. if (next && next.nodeType === 1 && next.href && next.href.slice(0,4) === 'http' && next.href != curSite.pageUrl) {
  7442. if (curSite.pager.forceHTTPS && location.protocol === 'https:') {
  7443. curSite.pageUrl = next.href.replace(/^http:/,'https:');
  7444. } else {
  7445. curSite.pageUrl = next.href;
  7446. }
  7447. //console.log(curSite.pageUrl)
  7448. return true
  7449. }
  7450. return false
  7451. }
  7452. // 通用型获取下一页地址(从 元素 中获取页码,URL 替换 page= 参数)
  7453. function getNextEP(css, pf, reg) {
  7454. let nextNum = getOne(css), url = '';
  7455. if (nextNum && nextNum.textContent) {
  7456. nextNum = nextNum.textContent.replaceAll(' ','');
  7457. if (location.search) {
  7458. if (indexOF(pf, 's')) {
  7459. url = location.search.replace(reg, pf + nextNum);
  7460. } else {
  7461. url = location.search + '&' + pf + nextNum;
  7462. }
  7463. } else {
  7464. url = '?' + pf + nextNum;
  7465. }
  7466. url = location.origin + location.pathname + url;
  7467. }
  7468. return url
  7469. }
  7470. // 通用型获取下一页地址(从 元素 中获取页码,URL 替换 pathname 路径)
  7471. function getNextEPN(css, reg, a, b = '') {
  7472. let nextNum = getOne(css), url = '';
  7473. if (nextNum && nextNum.textContent) {
  7474. nextNum = nextNum.textContent.replaceAll(' ','');
  7475. if (location.pathname) {
  7476. if (indexOF(reg)) {
  7477. url = location.pathname.replace(reg, a + nextNum + b);
  7478. } else {
  7479. url = location.pathname + a + nextNum + b;
  7480. }
  7481. } else {
  7482. url = location.pathname + a + nextNum + b;
  7483. }
  7484. url = location.origin + url;
  7485. }
  7486. return url
  7487. }
  7488. // 通用型获取下一页地址(从 URL 中获取页码,URL 替换 pathname 路径)
  7489. function getNextUPN(reg1, reg, a, b = '', initP = '2', endP) {
  7490. let nextNum = reg1.exec(location.pathname);
  7491. if (nextNum) {
  7492. nextNum = String(parseInt(nextNum[0])+1);
  7493. if (endP && (parseInt(nextNum[0]) > parseInt(endP))) return ''
  7494. } else {
  7495. nextNum = initP;
  7496. if (endP && (parseInt(nextNum[0]) >= parseInt(endP))) return ''
  7497. }
  7498. let url = '';
  7499. if (location.pathname) {
  7500. if (indexOF(reg)) {
  7501. url = location.pathname.replace(reg, a + nextNum + b);
  7502. } else {
  7503. url = location.pathname + a + nextNum + b;
  7504. }
  7505. } else {
  7506. url = location.pathname + a + nextNum + b;
  7507. }
  7508. url = location.origin + url;
  7509. return url
  7510. }
  7511. // 通用型获取下一页地址(从 URL 中获取页码,URL 替换 page= 参数)
  7512. function getNextUP(pf, reg, lp = location.pathname, initP = '2', endP) {
  7513. let nextNum = getSearch(pf.replace('=',''));
  7514. if (nextNum) {
  7515. nextNum = String(parseInt(nextNum)+1);
  7516. if (endP && (parseInt(nextNum) > parseInt(endP))) return ''
  7517. } else {
  7518. nextNum = initP;
  7519. if (endP && (parseInt(nextNum) >= parseInt(endP))) return ''
  7520. }
  7521. let url = '';
  7522. if (location.search) {
  7523. if (indexOF(pf, 's')) {
  7524. url = location.search.replace(reg, pf + nextNum);
  7525. } else {
  7526. url = location.search + '&' + pf + nextNum;
  7527. }
  7528. } else {
  7529. url = '?' + pf + nextNum;
  7530. }
  7531. url = location.origin + lp + url;
  7532. return url
  7533. }
  7534. // 通用型获取下一页地址(从 form input 中获取,返回 GET URL)
  7535. function getNextF(css) {
  7536. let form = getOne(css), value = '';
  7537. if (form) {
  7538. form.querySelectorAll('input[name]').forEach(function(input) {value += input.name + '=' + input.value + '&';}) // 生成表单参数
  7539. value = encodeURI(value.replace(/&$/,'')); // 清理最后一个 & 符号
  7540. if (form.action && value) return (form.action + '?' + value)
  7541. }
  7542. return '';
  7543. }
  7544.  
  7545.  
  7546. // 检查 URL
  7547. function checkURL(func) {
  7548. if (typeof curSite.pager.nextL == 'function') {
  7549. let tempUrl = curSite.pager.nextL();
  7550. if (!tempUrl || (tempUrl && tempUrl.slice(0,4) != 'http') || tempUrl === curSite.pageUrl ) return;
  7551. curSite.pageUrl = tempUrl;
  7552. func(curSite.pageUrl);
  7553. } else if (curSite.pager.nextL && curSite.pager.nextL.search(/^js;/i) === 0) { // 自定义翻页规则中执行 JavaScript 代码的
  7554. let tempUrl = new Function (curSite.pager.nextL.slice(3))();
  7555. if (!tempUrl || (tempUrl && tempUrl.slice(0,4) != 'http') || tempUrl === curSite.pageUrl ) return;
  7556. curSite.pageUrl = tempUrl;
  7557. func(curSite.pageUrl);
  7558. } else if (getNextE()) {
  7559. func(curSite.pageUrl);
  7560. }
  7561. //console.log(curSite.pageUrl);
  7562. }
  7563. // 替换元素
  7564. function replaceElems(pageElems, o = curSite.pager.replaceE, r = curSite.pager.replaceE) {
  7565. let oriE = getAll(o),
  7566. repE = getAll(r, pageElems, pageElems);
  7567. //console.log(oriE, repE)
  7568. if (oriE.length != 0 && repE.length != 0 && oriE.length === repE.length) {
  7569. for (let i = 0; i < oriE.length; i++) {
  7570. oriE[i].outerHTML = repE[i].outerHTML;
  7571. }
  7572. return true
  7573. }
  7574. return false
  7575. }
  7576. // 添加历史记录
  7577. function addHistory(pageElems, title, url) {
  7578. if (!curSite.pageUrl) return
  7579. // 对于自带类似功能 或者 覆盖了 history 原生函数的网站,则跳过不再添加历史记录
  7580. if (window.top.history.toString() !== '[object History]') return
  7581.  
  7582. //console.log(pageElems.querySelector('title'), curSite.pageUrl)
  7583. title = title || pageElems.querySelector('title').textContent || window.top.document.title;
  7584. url = url || curSite.pageUrl;
  7585. window.top.document.title = title;
  7586. window.top.document.xiu_nowUrl = curSite.pageUrl;
  7587. window.top.history.pushState('xiu_history', title, url);
  7588. }
  7589. // 插入 <Script>
  7590. function insScript(selector, toElement = document.body, contextNode = document) {
  7591. let scriptElems = contextNode;
  7592. if (selector) {
  7593. if (contextNode instanceof Array) {
  7594. scriptElems = []; contextNode.forEach(function (one) {scriptElems = scriptElems.concat(getAll(selector, one, one));})
  7595. } else {
  7596. scriptElems = getAll(selector, contextNode, contextNode);
  7597. }
  7598. }
  7599. scriptElems.forEach(function (one) {
  7600. if (one.tagName === 'SCRIPT') {
  7601. if (one.src) {
  7602. toElement.appendChild(document.createElement('script')).src = one.src;
  7603. } else {
  7604. toElement.appendChild(document.createElement('script')).textContent = one.textContent;
  7605. }
  7606. }
  7607. });
  7608. }
  7609. // 插入 <Style>
  7610. function insStyle(style) {
  7611. document.documentElement.appendChild(document.createElement('style')).textContent = style;
  7612. }
  7613.  
  7614.  
  7615. // 获取元素(CSS/Xpath)来自:https://github.com/machsix/Super-preloader
  7616. function getCSS(css, contextNode = document) {
  7617. return contextNode.querySelector(css);
  7618. }
  7619. function getAllCSS(css, contextNode = document) {
  7620. return [].slice.call(contextNode.querySelectorAll(css));
  7621. }
  7622. function getXpath(xpath, contextNode, doc = document) {
  7623. contextNode = contextNode || doc;
  7624. try {
  7625. const result = doc.evaluate(xpath, contextNode, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
  7626. // 应该总是返回一个元素节点
  7627. return result.singleNodeValue && result.singleNodeValue.nodeType === 1 && result.singleNodeValue;
  7628. } catch (err) {
  7629. throw new Error(`无效 Xpath: ${xpath}`);
  7630. }
  7631. }
  7632. function getAllXpath(xpath, contextNode, doc = document) {
  7633. contextNode = contextNode || doc;
  7634. const result = [];
  7635. try {
  7636. const query = doc.evaluate(xpath, contextNode, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
  7637. for (let i = 0; i < query.snapshotLength; i++) {
  7638. const node = query.snapshotItem(i);
  7639. // 如果是 Element 节点
  7640. if (node.nodeType === 1) result.push(node);
  7641. }
  7642. } catch (err) {
  7643. throw new Error(`无效 Xpath: ${xpath}`);
  7644. }
  7645. return result;
  7646. }
  7647. function getOne(selector, contextNode = undefined, doc = document) {
  7648. if (!selector) return;
  7649. contextNode = contextNode || doc;
  7650. if (selector.search(/^css;/i) === 0) {
  7651. return getCSS(selector.slice(4), contextNode);
  7652. } else {
  7653. return getXpath(selector, contextNode, doc);
  7654. }
  7655. }
  7656. function getAll(selector, contextNode = undefined, doc = document) {
  7657. if (!selector) return [];
  7658. contextNode = contextNode || doc;
  7659. if (selector.search(/^css;/i) === 0) {
  7660. return getAllCSS(selector.slice(4), contextNode);
  7661. } else {
  7662. return getAllXpath(selector, contextNode, doc);
  7663. }
  7664. }
  7665. function createDocumentByString(e) {
  7666. if (e) {
  7667. if ('HTML' !== document.documentElement.nodeName) return (new DOMParser).parseFromString(e, 'application/xhtml+xml');
  7668. var t;
  7669. try { t = (new DOMParser).parseFromString(e, 'text/html');} catch (e) {}
  7670. if (t) return t;
  7671. if (document.implementation.createHTMLDocument) {
  7672. t = document.implementation.createHTMLDocument('ADocument');
  7673. } else {
  7674. 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) {}
  7675. }
  7676. if (t) {
  7677. var r = document.createRange(),
  7678. n = r.createContextualFragment(e);
  7679. r.selectNodeContents(document.body);
  7680. t.body.appendChild(n);
  7681. 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);
  7682. return t;
  7683. }
  7684. } else console.error('没有找到要转成 DOM 的字符串');
  7685. }
  7686.  
  7687.  
  7688. // 强制新标签页打开链接(翻页模式 5/6)
  7689. function forceTarget() {
  7690. document.body.addEventListener('click', function(e) {
  7691. if (e.target.tagName === 'A') {
  7692. forceTarget_(e.target, e);
  7693. } else {
  7694. let path = e.path || e.composedPath();
  7695. for (let i = 1; i < path.length - 3; i++) {
  7696. //console.log(path[i])
  7697. if (path[i].tagName === 'A') {
  7698. forceTarget_(path[i], e);
  7699. break;
  7700. }
  7701. }
  7702. }
  7703. });
  7704.  
  7705. function forceTarget_(target, e){
  7706. if (target.href && target.target != '_blank' && !(target.getAttribute('onclick')) && target.href.slice(0,4) == 'http' && target.getAttribute('href').slice(0,1) != '#') {
  7707. e.preventDefault(); // 阻止默认打开链接事件
  7708. //console.log(target.href);
  7709. //window.top.location.href = target.href;
  7710. window.GM_openInTab(target.href, {active: true,insert: true,setParent: true});
  7711. }
  7712. }
  7713. //document.head.appendChild(document.createElement('base')).target = '_top';
  7714. }
  7715. // 判断元素是否隐藏(隐藏返回 true)
  7716. function isHidden(el){
  7717. return (el.offsetParent === null);
  7718. }
  7719. // 判断是否为手机版(是则返回 true)
  7720. function isMobile(){
  7721. return (/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|MicroMessenger|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(navigator.userAgent) || (window.screen.width < 500 && window.screen.height < 800));
  7722. }
  7723. // 判断 URL 是否存在指定文本
  7724. function indexOF(e, l = 'p', low = false){
  7725. switch (l) {
  7726. case 'h':
  7727. l = location.href; break;
  7728. case 'p':
  7729. l = location.pathname; break;
  7730. case 's':
  7731. l = location.search; break;
  7732. }
  7733. //console.log(l,e,l.indexOf(e))
  7734. if (low) {e = e.toLowerCase(); l = l.toLowerCase();} // 全部转为小写
  7735. if (e instanceof RegExp) {
  7736. if (e.test(l)) return true
  7737. } else {
  7738. if (l.indexOf(e) > -1) return true
  7739. }
  7740. return false
  7741. }
  7742. // 获取 Search 指定参数
  7743. function getSearch(variable) {
  7744. let query = window.location.search.substring(1),
  7745. vars = query.split('&');
  7746. for (var i=0;i<vars.length;i++) {
  7747. var pair = vars[i].split('=');
  7748. if(pair[0] == variable){return pair[1];}
  7749. }
  7750. return '';
  7751. }
  7752. // 启用/禁用 (当前网站)
  7753. function menu_disable(type) {
  7754. switch(type) {
  7755. case 'check':
  7756. return check(); break;
  7757. case 'add':
  7758. add(); break;
  7759. case 'del':
  7760. del(); break;
  7761. }
  7762.  
  7763. function check() { // 存在返回真,不存在返回假
  7764. if (GM_getValue('menu_disable').indexOf(location.hostname) == -1) return false // 不存在返回假
  7765. return true
  7766. }
  7767.  
  7768. function add() {
  7769. if (check()) return
  7770. let list = GM_getValue('menu_disable'); // 读取网站列表
  7771. list.push(location.hostname); // 追加网站域名
  7772. GM_setValue('menu_disable', list); // 写入配置
  7773. location.reload(); // 刷新网页
  7774. }
  7775.  
  7776. function del() {
  7777. if (!check()) return
  7778. let list = GM_getValue('menu_disable'), // 读取网站列表
  7779. index = list.indexOf(location.hostname);
  7780. list.splice(index, 1); // 删除网站域名
  7781. GM_setValue('menu_disable', list); // 写入配置
  7782. location.reload(); // 刷新网页
  7783. }
  7784. }
  7785. // 左键双击网页空白处暂停翻页
  7786. function pausePageEvent() {
  7787. if (!GM_getValue('menu_pause_page')) return
  7788. if (curSite.SiteTypeID === 0) return
  7789. if (curSite.pager && curSite.pager.type == 5) window.top.document.xiu_pausePage = pausePage
  7790. document.body.addEventListener('dblclick', function () {
  7791. if (pausePage) {GM_notification({text: `❌ 已暂停本页 [自动无缝翻页]\n (再次双击可恢复)`, timeout: 2000});} else {GM_notification({text: `✅ 已恢复本页 [自动无缝翻页]\n (再次双击可暂停)`, timeout: 2000});}
  7792. pausePage = !pausePage;
  7793. if (curSite.pager && curSite.pager.type == 5) window.top.document.xiu_pausePage = pausePage
  7794. });
  7795. }
  7796. // 自定义翻页规则
  7797. function customRules() {
  7798. if (getCSS('#Autopage_customRules')) return
  7799.  
  7800. let customRules = JSON.stringify(GM_getValue('menu_customRules', {}), null, '\t');
  7801. if (customRules == '{}') customRules = '{\n\t\n}'; // 引导用户插入位置
  7802. let _html = `<div id="Autopage_customRules" style="left: 0 !important; right: 0 !important; top: 0 !important; bottom: 0 !important; width: 100% !important; height: 100% !important; margin: auto !important; padding: 25px 10px 10px 10px !important; position: fixed !important; opacity: 0.9 !important; z-index: 99999 !important; background-color: #eee !important; color: #222 !important; font-size: 14px !important; overflow: scroll !important;">
  7803. <h3><strong>自定义翻页规则(优先于脚本内置规则)-【把规则插入默认的 { } 中间】</strong></h3>
  7804. <details>
  7805. <summary><kbd><strong>「 点击展开 查看示例 」(把常用规则都放在一起了,方便需要的时候可复制一份修改使用)</strong></kbd></summary>
  7806. <ul style="list-style: disc !important; margin-left: 35px !important;">
  7807. <li>翻页规则为 JSON 格式,因此大家需要先去<strong>了解一下 JSON 的基本格式</strong>。</li>
  7808. <li>具体的翻页规则说明、示例,为了方便更新及补充,我都写到 <strong><a href="https://github.com/XIU2/UserScript/issues/176" target="_blank">Github</a> 及 <a href="https://greasyfork.org/scripts/419215" target="_blank">Greasyfork</a></strong> 里面了。</li>
  7809. <li>该功能只适用于<strong>简单的网站</strong>,当然这类网站占<strong>大多数</strong>,我写的数百规则里大部分都是这类网站。</li>
  7810. <li>脚本会自动格式化规则,因此<strong>无需手动缩进、换行</strong>,只需把规则<strong>插入默认的 { } 中间</strong>即可。</li>
  7811. </ul>
  7812. <p style="color: #ff3535 !important;">注意:不要完全照搬脚本内置规则,因为和标准 JSON 格式等有所差别,具体请参考下面示例。</p>
  7813. <pre>
  7814. "aaa": {
  7815. "host": "aaa",
  7816. "functionS": "if (location.pathname == '/s') {return true;}",
  7817. "style": ".aaaa {display: none !important;}",
  7818. "pager": {
  7819. "type": 1,
  7820. "nextL": "id('page')//a[contains(text(),'下一页')]",
  7821. "pageE": "css;aaa",
  7822. "insertP": ["css;.bbb", 3],
  7823. "replaceE": "css;.page",
  7824. "scriptT": 2,
  7825. "interval": 500,
  7826. "scrollD": 1500
  7827. },
  7828. "function": {
  7829. "bF": "src_bF",
  7830. "bFp": [0, "img[data-src]", "data-src"],
  7831. "aF": "document.body.appendChild(document.createElement('script')).textContent = 'xxx'"
  7832. }
  7833. },
  7834. "bbb": {
  7835. "host": "/\.bbb\.com/",
  7836. "functionS": "if (location.pathname.indexOf('/s') > -1) {return true;}",
  7837. "pager": {
  7838. "type": 2,
  7839. "nextL": "css;#autopbn",
  7840. "nextText": "下一页",
  7841. "nextTextOf": "下一页",
  7842. "interval": 1000,
  7843. "scrollD": 1500
  7844. }
  7845. }
  7846. </pre>
  7847. </details>
  7848.  
  7849. <textarea id="Autopage_customRules_textarea" style="min-width:95% !important; min-height:75% !important; display: block !important; margin: 10px 0 10px 0; white-space:nowrap !important; overflow:scroll !important; resize: auto !important;" placeholder="留空等于默认的 {},请把规则插入 {} 之间">${customRules}</textarea>
  7850. <button id="Autopage_customRules_save">保存并刷新</button><button id="Autopage_customRules_cancel">取消</button>
  7851. </div>`
  7852. document.documentElement.insertAdjacentHTML('beforeend', _html);
  7853. document.documentElement.style.overflow = document.body.style.overflow = 'hidden';
  7854. // 点击事件
  7855. getCSS('#Autopage_customRules_save').onclick = function () {
  7856. customRules = getCSS('#Autopage_customRules_textarea').value;
  7857. //console.log(customRules)
  7858. if (!customRules) customRules = '{}'
  7859. try {
  7860. customRules = JSON.parse(customRules)
  7861. //console.log(customRules)
  7862. GM_setValue('menu_customRules', customRules)
  7863. location.reload();
  7864. } catch (e) {
  7865. console.error('自定义规则存在格式错误:\n' + e + '\n\n注意事项:\n规则中冒号 : 左右的内容都需要加上双引号 " 而不能用单引号 \',如果内容中含有双引号则需要对双引号转义(即 \" 这样)或者改用单引号')
  7866. window.alert('自定义规则存在格式错误:\n' + e + '\n\n注意事项:\n规则中冒号 : 左右的内容都需要加上双引号 " 而不能用单引号 \',如果内容中含有双引号则需要对双引号转义(即 \" 这样)或者改用单引号');
  7867. }
  7868. }
  7869. getCSS('#Autopage_customRules_cancel').onclick = function () {document.documentElement.style.overflow = document.body.style.overflow = ''; getCSS('#Autopage_customRules').remove();}
  7870. }
  7871. // 显示页码
  7872. function pageNumber(type) {
  7873. if (curSite.SiteTypeID === 0 || curSite.hiddenPN || (curSite.pager && curSite.pager.type == 5 && self != top)) {if (getCSS('#Autopage_number')) {getCSS('#Autopage_number').style.display = 'none';}; return}
  7874. let status = getCSS('#Autopage_number');
  7875. switch (type) {
  7876. case 'add':
  7877. add(); break;
  7878. case 'del':
  7879. del(); break;
  7880. case 'set':
  7881. set(); break;
  7882. }
  7883.  
  7884. function add(){
  7885. if (status) {
  7886. if (status.style.display === 'none') {status.style.display = 'flex';}
  7887. return
  7888. }
  7889. // 插入网页
  7890. let _style = `<style>#Autopage_number {top: calc(75vh) !important;left: 0 !important;width: 32px;height: 32px;padding: 6px !important;display: flex;position: fixed !important;opacity: 0.3;transition: .2s;z-index: 9999 !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;font-size: medium;} #Autopage_number:hover {opacity: 0.8;transform: translateX(0);}</style>`,
  7891. _html = `<div id="Autopage_number" title="1. 此处数字为 [当前页码] (可在脚本菜单中关闭)&#10;&#10;2. 鼠标左键点击此处 [临时暂停本页自动无缝翻页](再次点击可恢复)">${pageNum._now}</div>`
  7892. document.documentElement.insertAdjacentHTML('beforeend', _style + _html);
  7893. // 解决 远景论坛 会清理掉前面插入的 CSS 样式的问题
  7894. if (location.hostname === 'bbs.pcbeta.com') {setTimeout(function(){document.documentElement.insertAdjacentHTML('beforeend', _style);}, 500);}
  7895. if (curSite.pager && curSite.pager.type == 5) window.top.document.xiu_pausePage = pausePage
  7896. // 点击事件(临时暂停翻页)
  7897. getCSS('#Autopage_number').onclick = function () {
  7898. if (pausePage) {this.style = 'color: #FF5722 !important; font-style: italic !important;';} else {this.style = '';}
  7899. pausePage = !pausePage;
  7900. if (curSite.pager && curSite.pager.type == 5) window.top.document.xiu_pausePage = pausePage
  7901. };
  7902. status = getCSS('#Autopage_number');
  7903. set();
  7904. }
  7905. // 监听储存当前页码的对象值的变化
  7906. function set(){
  7907. Object.defineProperty(pageNum, 'now', {
  7908. set: function(value) {
  7909. this._now = value;
  7910. if (status) status.textContent = value;
  7911. }
  7912. });
  7913. }
  7914. function del(){
  7915. if (!status) return
  7916. status.style.display = 'none';
  7917. }
  7918. }
  7919. // 菜单开关
  7920. function menu_switch(menu_status, Name, Tips) {
  7921. if (menu_status === true){
  7922. GM_setValue(Name, false);
  7923. } else {
  7924. GM_setValue(Name, true);
  7925. }
  7926. if (Name === 'menu_page_number') {
  7927. if (menu_status === true){pageNumber('del');} else {pageNumber('add');}
  7928. registerMenuCommand(); // 重新注册脚本菜单
  7929. } else {
  7930. location.reload();}
  7931. };
  7932. // 生成 SiteTypeID
  7933. function setSiteTypeID() {
  7934. let num = 0
  7935. for (let val in DBSite) {
  7936. DBSite[val].SiteTypeID = num = num + 1;
  7937. }
  7938. }
  7939. // 获取 Cookie
  7940. function getCookie(name) {
  7941. if (!name) return ''
  7942. let arr = document.cookie.split(';');
  7943. name += '='
  7944. for (let i=0; i<arr.length; i++) {
  7945. let now = arr[i].trim();
  7946. if (now.indexOf(name) == 0) return now.substring(name.length, now.length);
  7947. }
  7948. return '';
  7949. }
  7950. // 插入位置
  7951. function getAddTo(num) {
  7952. switch (num) {
  7953. case 1:
  7954. return 'beforebegin'; break;
  7955. case 2:
  7956. return 'afterbegin'; break;
  7957. case 3:
  7958. case 6:
  7959. return 'beforeend'; break;
  7960. case 4:
  7961. case 5:
  7962. return 'afterend'; break;
  7963. }
  7964. }
  7965. // 滚动条事件
  7966. function windowScroll(fn1) {
  7967. var beforeScrollTop = document.documentElement.scrollTop || document.body.scrollTop,
  7968. fn = fn1 || function () {};
  7969. setTimeout(function () { // 延时 1 秒执行,避免刚载入到页面就触发翻页事件
  7970. window.addEventListener('scroll', function (e) {
  7971. var afterScrollTop = document.documentElement.scrollTop || document.body.scrollTop,
  7972. delta = afterScrollTop - beforeScrollTop;
  7973. if (delta == 0) return false;
  7974. fn(delta > 0 ? 'down' : 'up', e);
  7975. beforeScrollTop = afterScrollTop;
  7976. }, false);
  7977. }, 1000)
  7978. }
  7979. // 自定义 urlchange 事件(用来监听 URL 变化)
  7980. function addUrlChangeEvent() {
  7981. history.pushState = ( f => function pushState(){
  7982. var ret = f.apply(this, arguments);
  7983. window.dispatchEvent(new Event('pushstate'));
  7984. window.dispatchEvent(new Event('urlchange'));
  7985. return ret;
  7986. })(history.pushState);
  7987.  
  7988. history.replaceState = ( f => function replaceState(){
  7989. var ret = f.apply(this, arguments);
  7990. window.dispatchEvent(new Event('replacestate'));
  7991. window.dispatchEvent(new Event('urlchange'));
  7992. return ret;
  7993. })(history.replaceState);
  7994.  
  7995. window.addEventListener('popstate',()=>{
  7996. window.dispatchEvent(new Event('urlchange'))
  7997. });
  7998. }
  7999. })();