自动无缝翻页

无缝拼接下一页内容(瀑布流,追求小而美),目前支持:【所有「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-22 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name 自动无缝翻页
  3. // @name:zh-CN 自动无缝翻页
  4. // @name:zh-TW 自動無縫翻頁
  5. // @name:en AutoPager
  6. // @version 4.8.8
  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.  
  1180. // 如果是 数组
  1181. if (Array.isArray(DBSite[now].host)) {
  1182.  
  1183. for (let i of DBSite[now].host) { // 遍历 数组
  1184. if ((i instanceof RegExp && i.test(location.hostname)) || (typeof i === 'string' && i === location.hostname)) {
  1185.  
  1186. if (self != top) {if (!DBSite[now].iframe) break end;} // 如果当前位于 iframe 框架下,就需要判断是否需要继续执行
  1187. if (DBSite[now].functionS) {
  1188. if (typeof DBSite[now].functionS == 'function') {
  1189. DBSite[now].functionS();
  1190. } else { // 自定义翻页规则时
  1191. if (new Function (DBSite[now].functionS)() === true) curSite = DBSite[now];
  1192. }
  1193. } else {
  1194. curSite = DBSite[now];
  1195. }
  1196. support = true; break; // 如果找到了就退出循环
  1197. }
  1198. }
  1199.  
  1200. // 如果是 正则/字符串
  1201. } else if ((DBSite[now].host instanceof RegExp && DBSite[now].host.test(location.hostname)) || (typeof DBSite[now].host === 'string' && DBSite[now].host === location.hostname)) {
  1202.  
  1203. if (self != top) {if (!DBSite[now].iframe) break;} // 如果当前位于 iframe 框架下,就需要判断是否需要继续执行
  1204. if (DBSite[now].functionS) {
  1205. if (typeof DBSite[now].functionS == 'function') {
  1206. DBSite[now].functionS();
  1207. } else { // 自定义翻页规则时
  1208. if (new Function (DBSite[now].functionS)() === true) curSite = DBSite[now];
  1209. }
  1210. } else {
  1211. curSite = DBSite[now];
  1212. }
  1213. support = true; break; // 如果找到了就退出循环
  1214. }
  1215.  
  1216. }
  1217.  
  1218. if (support) {
  1219. console.info('[自动无缝翻页] - 独立规则 网站'); return 1;
  1220. } else if (self != top) {
  1221. return -1;
  1222. } 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)) {
  1223. console.info('[自动无缝翻页] - <Discuz!> 论坛'); return 2;
  1224. } else if (getCSS('#flarum-loading')) {
  1225. console.info('[自动无缝翻页] - <Flarum> 论坛'); return 3;
  1226. } else if (getCSS('body#phpbb')) {
  1227. console.info('[自动无缝翻页] - <phpBB> 论坛'); return 4;
  1228. } else if (getXpath('//footer//a[contains(string(), "Xiuno")] | //link[contains(@href, "xiuno")] | //script[contains(@src, "xiuno")]')) {
  1229. console.info('[自动无缝翻页] - <Xiuno> 论坛'); return 5;
  1230. } else if (typeof XF != 'undefined') {
  1231. console.info('[自动无缝翻页] - <XenForo> 论坛'); return 6;
  1232. } else if (getCSS('head meta[name="generator" i][content="nexusphp" i]') || getXpath('id("footer")[contains(string(), "NexusPHP")]')) {
  1233. console.info('[自动无缝翻页] - <NexusPHP> 论坛'); return 7;
  1234. } else if (getCSS('link[href*="themes/dux" i], script[src*="themes/dux" i]')) {
  1235. console.info('[自动无缝翻页] - 使用 WordPress <DUX> 主题的网站'); return 100;
  1236. } else if (getCSS('link[href*="themes/xiu" i], script[src*="themes/xiu" i]')) {
  1237. console.info('[自动无缝翻页] - 使用 WordPress <XIU> 主题的网站'); return 101;
  1238. } else if (getCSS('link[href*="themes/d8" i], script[src*="themes/d8" i]')) {
  1239. console.info('[自动无缝翻页] - 使用 WordPress <D8> 主题的网站'); return 102;
  1240. } else if (getCSS('link[href*="themes/begin" i], script[src*="themes/begin" i], img[src*="themes/begin" i]')) {
  1241. console.info('[自动无缝翻页] - 使用 WordPress <Begin> 主题的网站'); return 103;
  1242. } else if (getCSS('link[href*="/wp-content/" i], script[src*="/wp-content/" i]')) {
  1243. if (getCSS('article.post') && getCSS('nav.navigation')) {
  1244. if (getCSS('.nav-previous a')) {
  1245. console.info('[自动无缝翻页] - 使用 WordPress <nav-previous 旧文章式> 主题的网站'); return 104;
  1246. } else if (getXpath('//nav[contains(@class, "navigation")]//a[contains(text(), "下一页") or contains(text(), ">")]')) {
  1247. console.info('[自动无缝翻页] - 使用 WordPress <nav-navigation> 下一页式> 主题的网站'); return 105;
  1248. }
  1249. }
  1250. } 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(), "下一页")]')) {
  1251. console.info('[自动无缝翻页] - <笔趣阁> 模板的小说网站'); return 200;
  1252. }
  1253. return 0;
  1254. }
  1255. // 判断网站类型
  1256. function webTypeIf() {
  1257. if (webType != 1) {
  1258. switch (webType) {
  1259. case 2: // < 所有 Discuz!论坛 >
  1260. discuz_(); break;
  1261. case 3: // < 所有 Flarum 论坛 >
  1262. DBSite.flarum.functionS(); break;
  1263. case 4: // < 所有 phpBB 论坛 >
  1264. DBSite.phpbb.functionS(); break;
  1265. case 5: // < 所有 Xiuno 论坛 >
  1266. DBSite.xiuno.functionS(); break;
  1267. case 6: // < 所有 XenForo 论坛 >
  1268. DBSite.xenforo.functionS(); break;
  1269. case 7: // < 所有 NexusPHP 论坛 >
  1270. DBSite.nexusphp.functionS(); break;
  1271. case 100: // < 所有使用 WordPress DUX 主题的网站 >
  1272. DBSite.dux.functionS(); if (location.hostname === 'apphot.cc') {curSite.pager.scrollD = 2500;}; break;
  1273. case 101: // < 所有使用 WordPress XIU 主题的网站 >
  1274. DBSite.dux.functionS(); curSite.function = {bF: src_bF, bFp: [0, 'img.thumb[data-original]', 'data-original']}; break;
  1275. case 102: // < 所有使用 WordPress D8 主题的网站 >
  1276. DBSite.dux.functionS(); delete curSite.function; break;
  1277. case 103: // < 所有使用 WordPress Begin 主题的网站 >
  1278. DBSite.begin.functionS(); break;
  1279. case 104: // < 所有使用 WordPress nav-previous 旧文章式 主题的网站 >
  1280. DBSite.wp_nav_navigation.functionS(); break;
  1281. case 105: // < 所有使用 WordPress nav-navigation 下一页式 主题的网站 >
  1282. DBSite.wp_nav_navigation.functionS('//nav[contains(@class, "navigation")]//a[contains(text(), "下一页") or contains(text(), ">")]'); break;
  1283. case 200: // < 所有使用 笔趣阁 模板的小说网站 >
  1284. DBSite.biquge.functionS(); break;
  1285. }
  1286. }
  1287. }
  1288. // 网站规则
  1289. function setDBSite() {
  1290. /*
  1291. functionS: 匹配该网站域名时要执行的函数(一般用于根据 URL 分配相应翻页规则)
  1292. locationC: 对于使用 pjax 技术的网站,需要监听 URL 变化来重新判断翻页规则(需要放在 functionS 中)
  1293.  
  1294. hiddenPN: 不显示脚本左下角的页码
  1295. history: 添加历史记录 并 修改当前 URL(默认开启,对于不支持的网站要设置为 false)
  1296. style: 要插入网页的 CSS Style 样式
  1297. retry: 允许获取失败后重试
  1298.  
  1299. pager: {
  1300. type: 翻页模式
  1301. 1 = 由脚本实现自动无缝翻页(适用于:静态加载内容网站,常规模式)
  1302.  
  1303. 2 = 只需要点击下一页按钮(适用于:网站自带了 自动无缝翻页 功能)
  1304. nextText: 按钮文本,当按钮文本 = 该文本时,才会点击按钮加载下一页(避免一瞬间加载太多次下一页,下同)
  1305. nextTextOf: 按钮文本的一部分,当按钮文本包含该文本时,才会点击按钮加载下一页
  1306. nextHTML: 按钮内元素,当按钮内元素 = 该元素内容时,才会点击按钮加载下一页
  1307. interval: 点击间隔时间,对于没有按钮文字变化的按钮,可以手动指定间隔时间(单位 ms,默认 300,当指定上面三个时,会忽略 interval)
  1308. isHidden: 只有下一页按钮可见时(没有被隐藏),才会点击
  1309.  
  1310. 3 = 依靠 [基准元素] 与 [浏览器可视区域底部] 之间的距离缩小来触发翻页(适用于:主体元素下方内容太多 且 高度不固定时)
  1311. scrollE: 作为基准线的元素(一般为底部页码元素)
  1312. scrollD: 基准元素 - 可视区域底部
  1313.  
  1314. 4 = 动态加载类网站(适用于:简单的动态加载内容网站)
  1315. insertE: 用来插入元素的函数
  1316.  
  1317. 5 = 插入 iframe 方式来加载下一页,无限套娃(适用于:部分动态加载内容的网站,需要允许 iframe 且支持通过 GET/POST 直接打开下一页)
  1318. style: 加载 iframe 前要插入的 CSS Style 样式(比如为了悬浮的样式与下一页的重叠,隐藏网页底部间距提高阅读连续性)
  1319. iframe: 这个必须加到 pager{} 外面(这样才会在该域名的 iframe 框架下运行脚本)
  1320. forceTarget: 强制新标签页打开链接(适用于一些使用 pjax 技术的链接)
  1321.  
  1322. 6 = 通过 iframe 获取下一页动态加载内容插入本页,只有一个娃(适用于:部分动态加载内容的网站,与上面不同的是,该模式适合简单的网页,没有复杂事件什么的)
  1323. loadTime: 预留的网页加载时间,确保网页内容加载完成
  1324. forceTarget: 强制新标签页打开链接
  1325.  
  1326. nextL: 下一页链接所在元素
  1327. pageE: 要从下一页获取的元素
  1328. insertP: 下一页元素插入本页的位置(数组第一个是基准元素,第二个是基准元素的前后具体位置)
  1329. 1 = 插入基准元素自身的前面
  1330. 2 = 插入基准元素内,第一个子元素前面
  1331. 3 = 插入基准元素内,最后一个子元素后面
  1332. 4 = 插入基准元素自身的后面
  1333. 5 = 插入 pageE 列表最后一个元素的后面(该 insertP 可以直接省略不写,等同于 ['pageE', 5] )
  1334. 6 = 插入该元素自身内部末尾(针对小说网站等文本类的),附带参数 insertP6Br: true, 用来中间插入换行
  1335. // 小技巧:当基准元素是下一页主体元素的父元素时(或者说要将下一页元素插入到本页同元素最后一个后面时)是可以省略不写 insertP
  1336. 例如:当 pageE: 'css;ul>li' 且 insertP: ['css;ul', 3] 时,实际等同于 ['css;ul>li', 5]
  1337. 当 pageE: 'css;.item' 且 insertP: ['css;.item', 4] 时,实际等同于 ['css;.item', 5]
  1338. 当 pageE: 'css;.item' 且 insertP: ['css;.page', 1] 时,实际等同于 ['css;.item', 5]
  1339. 注意:如 pageE 中选择了多类元素,则不能省略 insertP(比如包含 `,` 与 `|` 符号)
  1340.  
  1341. replaceE: 要替换为下一页内容的元素(比如页码)
  1342. scrollD: 翻页动作触发点([滚动条] 与 [网页底部] 之间的距离),数值越大,越早开始翻页,一般是访问网页速度越慢,该值就需要越大
  1343.  
  1344. scriptT: 单独插入 <script> 标签
  1345. 0 = 下一页的所有 <script> 标签
  1346. 1 = 下一页的所有 <script> 标签(不包括 src 链接)
  1347. 2 = 下一页主体元素 (pageE) 的同级 <script> 标签
  1348. 3 = 下一页主体元素 (pageE) 的子元素 <script> 标签
  1349.  
  1350. interval: 翻页后间隔时间(单位 ms)
  1351. forceHTTPS: 下一页链接强制 HTTPS
  1352. },
  1353. function: {
  1354. bF = 插入前执行函数
  1355. bFp = 参数
  1356. aF = 插入后执行函数
  1357. aFp = 参数
  1358. }
  1359. */ //<<< 规则简单说明 >>>
  1360. DBSite = {
  1361. discuz_forum: {
  1362. pager: {
  1363. type: 2,
  1364. nextL: 'css;#autopbn',
  1365. nextTextOf: '下一页',
  1366. scrollD: 1500
  1367. }
  1368. }, // Discuz! 论坛 - 帖子列表(自带无缝加载下一页按钮的)
  1369. discuz_guide: {
  1370. pager: {
  1371. nextL: 'css;a.nxt:not([href^="javascript"]) ,a.next:not([href^="javascript"])',
  1372. pageE: 'id("threadlist")//table[./tbody[contains(@id, "normalthread_")]]/tbody[not(@id="separatorline")]',
  1373. replaceE: 'css;.pg, .pages',
  1374. scrollD: 1500
  1375. }
  1376. }, // Discuz! 论坛 - 导读页 及 帖子列表(不带无缝加载下一页按钮的)
  1377. discuz_waterfall: {
  1378. pager: {
  1379. nextL: 'css;a.nxt:not([href^="javascript"]) ,a.next:not([href^="javascript"])',
  1380. pageE: 'css;#waterfall > li',
  1381. replaceE: 'css;.pg, .pages',
  1382. scrollD: 1500
  1383. }
  1384. }, // Discuz! 论坛 - 图片模式的帖子列表(不带无缝加载下一页按钮的)
  1385. discuz_thread: {
  1386. style: '.pgbtn {display: none;}',
  1387. pager: {
  1388. nextL: 'css;a.nxt:not([href^="javascript"]) ,a.next:not([href^="javascript"])',
  1389. pageE: 'css;#postlist > div[id^="post_"]',
  1390. 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"))]]',
  1391. scrollD: 1500
  1392. },
  1393. function: {
  1394. bF: src_bF,
  1395. bFp: [0, 'img[file]', 'file']
  1396. }
  1397. }, // Discuz! 论坛 - 帖子内
  1398. discuz_search: {
  1399. pager: {
  1400. nextL: 'css;a.nxt:not([href^="javascript"]) ,a.next:not([href^="javascript"])',
  1401. pageE: 'css;#threadlist > ul',
  1402. replaceE: 'css;.pg, .pages',
  1403. scrollD: 1500
  1404. }
  1405. }, // Discuz! 论坛 - 搜索页
  1406. discuz_youspace: {
  1407. pager: {
  1408. nextL: 'css;a.nxt:not([href^="javascript"]) ,a.next:not([href^="javascript"])',
  1409. pageE: 'css;form:not([action^="search.php?"]) tbody > tr:not(.th)',
  1410. replaceE: 'css;.pg, .pages',
  1411. scrollD: 1500
  1412. }
  1413. }, // Discuz! 论坛 - 回复页、主题页(别人的)
  1414. discuz_collection: {
  1415. pager: {
  1416. nextL: 'css;a.nxt:not([href^="javascript"]) ,a.next:not([href^="javascript"])',
  1417. pageE: 'css;#ct .bm_c table > tbody',
  1418. replaceE: 'css;.pg, .pages',
  1419. scrollD: 1500
  1420. }
  1421. }, // Discuz! 论坛 - 淘帖页
  1422. discuz_m: {
  1423. pager: {
  1424. nextL: '//a[@class="nxt" or @class="next"] | //div[@class="page"]/a[text()="下一页" or contains(text(), ">")]',
  1425. replaceE: 'css;.pg, .page',
  1426. scrollD: 1000
  1427. }
  1428. }, // Discuz! 论坛 - 触屏手机版
  1429. discuz_m_forum: {
  1430. pager: {
  1431. type: 2,
  1432. nextL: 'css;a.loadmore',
  1433. interval: 500,
  1434. scrollD: 1000
  1435. }
  1436. }, // Discuz! 论坛 - 触屏手机版 - 帖子列表(自带无缝加载下一页按钮的)
  1437. flarum: {
  1438. functionS: ()=> {locationC = true;if (!indexOF('/d/')) {curSite = DBSite.flarum;}},
  1439. pager: {
  1440. type: 2,
  1441. nextL: 'css;.DiscussionList-loadMore > button',
  1442. isHidden: true,
  1443. scrollD: 1500
  1444. }
  1445. }, // Flarum 论坛
  1446. phpbb: {
  1447. functionS: ()=> {if (indexOF('/viewforum.php')) {
  1448. curSite = DBSite.phpbb;
  1449. } else if (indexOF('/viewtopic.php') && GM_getValue('menu_thread')) {
  1450. curSite = DBSite.phpbb_post;
  1451. } else if (indexOF('/search.php')) {
  1452. curSite = DBSite.phpbb_search;
  1453. }},
  1454. pager: {
  1455. nextL: 'css;.pagination li.next a[rel="next"], .topic-actions .pagination strong~a',
  1456. pageE: 'css;.forumbg:not(.announcement) ul.topiclist.topics > li',
  1457. replaceE: 'css;.action-bar .pagination, .topic-actions .pagination',
  1458. scrollD: 2000
  1459. }
  1460. }, // phpBB 论坛 - 帖子列表
  1461. phpbb_post: {
  1462. pager: {
  1463. nextL: 'css;.pagination li.next a[rel="next"], .topic-actions .pagination strong~a',
  1464. pageE: 'css;div.post[id], div.post[id]+hr',
  1465. replaceE: 'css;.action-bar .pagination, .topic-actions .pagination',
  1466. scrollD: 2000
  1467. }
  1468. }, // phpBB 论坛 - 帖子内
  1469. phpbb_search: {
  1470. pager: {
  1471. nextL: 'css;.pagination li.next a[rel="next"], .topic-actions .pagination strong~a',
  1472. pageE: 'css;div.search.post',
  1473. replaceE: 'css;.action-bar .pagination, .pagination',
  1474. scrollD: 2000
  1475. }
  1476. }, // phpBB 论坛 - 搜索页
  1477. xenforo: {
  1478. functionS: ()=> {if (indexOF(/\/(forums|f)\//)) {
  1479. curSite = DBSite.xenforo;
  1480. } else if (indexOF(/\/(threads|t)\//) && GM_getValue('menu_thread')) {
  1481. curSite = DBSite.xenforo_post;
  1482. } else if (indexOF('/search/')) {
  1483. curSite = DBSite.xenforo_search;
  1484. }},
  1485. pager: {
  1486. nextL: 'css;a.pageNav-jump--next',
  1487. pageE: 'css;.structItemContainer-group.js-threadList > div',
  1488. replaceE: 'css;nav.pageNavWrapper',
  1489. scrollD: 2500
  1490. }
  1491. }, // XenForo 论坛 - 帖子列表
  1492. xenforo_post: {
  1493. pager: {
  1494. nextL: 'css;a.pageNav-jump--next',
  1495. pageE: 'css;.block-body.js-replyNewMessageContainer > article',
  1496. replaceE: 'css;nav.pageNavWrapper',
  1497. scrollD: 2500
  1498. }
  1499. }, // XenForo 论坛 - 帖子内
  1500. xenforo_search: {
  1501. pager: {
  1502. nextL: 'css;a.pageNav-jump--next',
  1503. pageE: 'css;ol.block-body > li',
  1504. replaceE: 'css;nav.pageNavWrapper',
  1505. scrollD: 2500
  1506. }
  1507. }, // XenForo 论坛 - 搜索页
  1508. xiuno: {
  1509. functionS: ()=> {if (lp == '/' || indexOF(/\/(index|forum)/)) {curSite = DBSite.xiuno;} else if (indexOF('/thread') && GM_getValue('menu_thread')) {curSite = DBSite.xiuno_post;}},
  1510. pager: {
  1511. nextL: '//li[@class="page-item"]/a[text()="▶"]',
  1512. pageE: 'css;ul.threadlist > li',
  1513. replaceE: 'css;ul.pagination',
  1514. scrollD: 1500
  1515. }
  1516. }, // Xiuno 论坛 - 帖子列表
  1517. xiuno_post: {
  1518. pager: {
  1519. nextL: '//li[@class="page-item"]/a[text()="▶"]',
  1520. pageE: 'css;li.post[data-pid]:not(.newpost)',
  1521. replaceE: 'css;ul.pagination',
  1522. scrollD: 1500
  1523. }
  1524. }, // Xiuno 论坛 - 帖子内
  1525. nexusphp: {
  1526. functionS: ()=> {
  1527. if (lp == '/torrents.php' || getCSS('table.torrents')) {
  1528. curSite = DBSite.nexusphp;
  1529. } else if (lp == '/subtitles.php') {
  1530. curSite = DBSite.nexusphp;
  1531. curSite.pager.pageE = 'css;#outer > table.main~table > tbody > tr:not(:first-of-type)'
  1532. } else if (lp == '/forums.php' && indexOF('action=viewforum', 's')) {
  1533. curSite = DBSite.nexusphp;
  1534. curSite.pager.pageE = 'css;#outer > table.main+table > tbody > tr:not(:first-of-type):not(:last-of-type)'
  1535. } else if (lp == '/forums.php' && indexOF('action=viewtopic', 's') && GM_getValue('menu_thread')) {
  1536. curSite = DBSite.nexusphp;
  1537. curSite.pager.pageE = 'css;td.text > div, td.text > div+table.main'
  1538. }},
  1539. pager: {
  1540. nextL: '//a[./b[contains(text(), "下一页") or contains(text(), ">>")]]',
  1541. pageE: 'css;table.torrents > tbody > tr:not(:first-of-type)',
  1542. replaceE: '//p[@align][./font[@class="gray"]]',
  1543. scrollD: 1500
  1544. }
  1545. }, // NexusPHP 论坛
  1546. dux: {
  1547. host: 'www.puresys.net',
  1548. functionS: ()=> {if (!indexOF('.html')) curSite = DBSite.dux;},
  1549. pager: {
  1550. nextL: 'css;li.next-page > a',
  1551. pageE: 'css;.content > article',
  1552. replaceE: 'css;.content > .pagination',
  1553. scrollD: 1500
  1554. },
  1555. function: {
  1556. bF: src_bF,
  1557. bFp: [0, 'img.thumb[data-src]', 'data-src']
  1558. }
  1559. }, // WordPress 的 DUX、XIU、D8 主题
  1560. begin: {
  1561. functionS: ()=> {if (location.search.slice(0,3) === '?s=') {curSite = DBSite.begin_search;} else if (!indexOF('.html')) {curSite = DBSite.begin;}},
  1562. pager: {
  1563. type: 2,
  1564. nextL: 'css;div[id^="ias_trigger_"]',
  1565. interval: 500,
  1566. scrollD: 1500
  1567. }
  1568. }, // WordPress 的 Begin 主题
  1569. begin_search: {
  1570. pager: {
  1571. nextL: 'css;a.next',
  1572. pageE: 'css;#main > ul > li',
  1573. replaceE: 'css;nav.pagination',
  1574. scrollD: 1500
  1575. }
  1576. }, // WordPress 的 Begin 主题 - 搜索页
  1577. wp_nav_navigation: {
  1578. 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;}},
  1579. pager: {
  1580. nextL: 'css;.nav-previous a',
  1581. pageE: 'css;article.post',
  1582. replaceE: 'css;nav.navigation',
  1583. scrollD: 1500
  1584. }
  1585. }, // Wordpress 的 nav.navigation 规则
  1586. biquge: {
  1587. functionS: ()=> {if (indexOF(/\d+\/\d+\.html/)) {curSite = DBSite.biquge;}},
  1588. style: 'img, .posterror {display: none !important;}',
  1589. pager: {
  1590. nextL: '//a[contains(text(), "下一章") or contains(text(), "下一页")]',
  1591. pageE: 'css;#content, .content, #chaptercontent, .chaptercontent, #BookText',
  1592. insertP: ['css;#content, .content, #chaptercontent, .chaptercontent, #BookText', 6],
  1593. insertP6Br: true,
  1594. replaceE: '//*[./a[contains(text(), "下一章") or contains(text(), "下一页")]]',
  1595. scrollD: 1500
  1596. }
  1597. }, // 笔趣阁 模板的小说网站
  1598. baidu: {
  1599. host: 'www.baidu.com',
  1600. functionS: ()=> {locationC = true; if (lp == '/s') {curSite = DBSite.baidu;} else if (location.pathname.slice(location.pathname.length - 2,location.pathname.length) == '/s') {location.hostname = 'm.baidu.com';}},
  1601. style: '.new-pmd .c-img-border {position: initial !important;} .op-bk-polysemy-video__wrap.c-gap-bottom {display: none !important;}',
  1602. pager: {
  1603. nextL: 'id("page")//a[contains(text(),"下一页")]',
  1604. pageE: 'css;#content_left > *',
  1605. replaceE: 'css;#page',
  1606. scrollD: 2000
  1607. }
  1608. }, // 百度 搜索
  1609. baidu_m: {
  1610. host: 'm.baidu.com',
  1611. functionS: ()=> {if (location.pathname.slice(location.pathname.length - 2,location.pathname.length) == '/s') curSite = DBSite.baidu_m;},
  1612. style: 'div.result[tpl="recommend_list"], #page-copyright {display: none !important;}',
  1613. pager: {
  1614. nextL: 'css;a[class^="new-nextpage"]',
  1615. pageE: 'css;#results > *',
  1616. replaceE: 'css;#page-controller',
  1617. scrollD: 2000
  1618. }
  1619. }, // 百度 搜索 - 手机版
  1620. google: {
  1621. host: /^www\.google\./,
  1622. functionS: ()=> {if (lp == '/search' && !indexOF('tbm=isch', 's')) {
  1623. curSite = DBSite.google;
  1624. } else if (lp == '/scholar') {
  1625. curSite = DBSite.google_scholar;
  1626. }},
  1627. pager: {
  1628. nextL: 'css;#pnnext',
  1629. pageE: 'id("search")/* | //style[not(contains(text(), "table,div,span,p{display:none}"))]',
  1630. insertP: ['css;#search', 3],
  1631. replaceE: 'id("navcnt") | id("rcnt")//div[@role="navigation"]',
  1632. scriptT: 0,
  1633. scrollD: 3000
  1634. },
  1635. function: {
  1636. bF: google_bF
  1637. }
  1638. }, // 谷歌 搜索
  1639. bing: {
  1640. host: ['www.bing.com','cn.bing.com'],
  1641. functionS: ()=> {if (lp == '/search') {
  1642. curSite = DBSite.bing;
  1643. curSite.function = {bF: bing_bF}
  1644. } else if (lp == '/academic/search') {
  1645. curSite = DBSite.bing_academic;
  1646. }},
  1647. style: '.b_imagePair.square_mp > .inner {display: none !important;}',
  1648. pager: {
  1649. nextL: 'css;a.sb_pagN, a.sb_halfnext, a.sb_fullnpl',
  1650. pageE: 'css;#b_results > li:not(.b_msg):not([class="b_ans"]):not(.b_pag):not(#mfa_root)',
  1651. replaceE: 'css;#b_results > .b_pag',
  1652. scrollD: 2000
  1653. }
  1654. }, // 必应 搜索
  1655. sogou: {
  1656. host: 'www.sogou.com',
  1657. functionS: ()=> {if (location.pathname != '/') {curSite = DBSite.sogou;}},
  1658. pager: {
  1659. nextL: 'css;#sogou_next',
  1660. pageE: 'css;.results > *',
  1661. replaceE: 'css;#pagebar_container',
  1662. scriptT: 3,
  1663. scrollD: 2000
  1664. }
  1665. }, // 搜狗 搜索
  1666. sogou_weixin: {
  1667. host: 'weixin.sogou.com',
  1668. functionS: ()=> {if (lp == '/') {
  1669. curSite = DBSite.sogou_weixin;
  1670. } else if (lp == '/weixin') {
  1671. curSite = DBSite.sogou_weixin_search;
  1672. }},
  1673. pager: {
  1674. type: 2,
  1675. nextL: 'css;#look-more',
  1676. interval: 1000,
  1677. scrollD: 1000
  1678. }
  1679. }, // 搜狗微信 - 首页
  1680. sogou_weixin_search: {
  1681. pager: {
  1682. nextL: 'css;#sogou_next',
  1683. pageE: 'css;ul[class*="news-list"] > li',
  1684. replaceE: 'css;#pagebar_container',
  1685. scrollD: 1200
  1686. }
  1687. }, // 搜狗微信 - 搜索
  1688. toutiao: {
  1689. host: ['www.toutiao.com', 'so.toutiao.com'],
  1690. functionS: ()=> {if (location.hostname != 'www.toutiao.com' && lp == '/search') curSite = DBSite.toutiao;},
  1691. pager: {
  1692. nextL: '//div[contains(@class, "-pagination")]/a[string()="下一页"]',
  1693. pageE: 'css;div[class*="-result-list"] > .result-content[data-i]',
  1694. replaceE: 'css;div[class*="-pagination"]',
  1695. scrollD: 2000
  1696. },
  1697. function: {
  1698. bF: pageElems => { // 插入前函数(过滤相关搜索)
  1699. if (getXpath('//div[contains(@class,"-header") and string()="相关搜索"]', pageElems[pageElems.length - 1])) pageElems[pageElems.length - 1].style.display = 'none';
  1700. return pageElems
  1701. }
  1702. }
  1703. }, // 头条 搜索
  1704. so: {
  1705. host: 'www.so.com',
  1706. functionS: ()=> {if (location.pathname != '/') {curSite = DBSite.so; insStyle('img {opacity: 1 !important;}')}},
  1707. pager: {
  1708. nextL: 'css;a#snext',
  1709. pageE: 'css;ul.result > li, style:not(src)',
  1710. insertP: ['css;ul.result', 3],
  1711. replaceE: 'css;#page',
  1712. scrollD: 2000
  1713. },
  1714. function: {
  1715. bF: src_bF,
  1716. bFp: [0, 'img[data-isrc]', 'data-isrc']
  1717. }
  1718. }, // 360 搜索
  1719. duckduckgo: {
  1720. host: 'duckduckgo.com',
  1721. functionS: ()=> {
  1722. if (getCookie('av') != '1') {
  1723. document.cookie='av=1; expires=Thu, 18 Dec 2031 12:00:00 GMT; path=/'; // 写入 Cookie 强制开启自带的无缝翻页功能
  1724. location.reload(); // 刷新网页
  1725. }
  1726. },
  1727. history: false
  1728. }, // DuckDuckGo 搜索
  1729. startpage: {
  1730. host: ['startpage.com', 'www.startpage.com'],
  1731. functionS: ()=> {if (indexOF('/search')) {curSite = DBSite.startpage;}},
  1732. pager: {
  1733. nextL: ()=> getNextF('//div[contains(@class, "pagination ")]/form[./button[@class="pagination__next-prev-button next"]]'),
  1734. pageE: 'css;section.w-gl--desktop > div',
  1735. replaceE: 'css;.pagination',
  1736. scrollD: 2000
  1737. }
  1738. }, // Startpage 搜索
  1739. yandex: {
  1740. host: ['yandex.com', 'yandex.ru', 'yandex.ua', 'yandex.by', 'yandex.kz', 'yandex.uz', 'yandex.com.tr'],
  1741. functionS: ()=> {if (lp == '/search/') {curSite = DBSite.yandex;} else if (lp == '/video/search') {curSite = DBSite.yandex_video;}},
  1742. pager: {
  1743. nextL: 'css;a.pager__item_kind_next',
  1744. pageE: 'css;#search-result > *, style',
  1745. insertP: ['css;#search-result', 3],
  1746. replaceE: 'css;.pager',
  1747. scrollD: 1500
  1748. }
  1749. }, // Yandex 搜索
  1750. yandex_video: {
  1751. hiddenPN: true,
  1752. pager: {
  1753. type: 2,
  1754. nextL: 'css;button.more__button',
  1755. interval: 1000,
  1756. scrollD: 1000
  1757. }
  1758. }, // Yandex 搜索 - 视频
  1759. yahoo: {
  1760. host: 'search.yahoo.com',
  1761. functionS: ()=> {if (indexOF('/search')) {curSite = DBSite.yahoo;}},
  1762. pager: {
  1763. nextL: 'css;.pagination a.next',
  1764. pageE: 'css;#web ol > li',
  1765. replaceE: 'css;.pagination',
  1766. scrollD: 2000
  1767. }
  1768. }, // Yahoo 搜索
  1769. yahoo_jp: {
  1770. host: 'search.yahoo.co.jp',
  1771. functionS: ()=> {if (indexOF('/search')) {curSite = DBSite.yahoo_jp;}},
  1772. pager: {
  1773. nextL: 'css;.Pagenation__next > a',
  1774. pageE: 'css;.Contents__innerGroupBody > div',
  1775. replaceE: 'css;.Pagenation',
  1776. scrollD: 2000
  1777. }
  1778. }, // Yahoo 搜索 (JP)
  1779. qwant: {
  1780. host: 'www.qwant.com',
  1781. functionS: ()=> {locationC = true; if (indexOF('q=', 's') && indexOF('t=web', 's')) {curSite = DBSite.qwant;}},
  1782. pager: {
  1783. type: 2,
  1784. nextL: 'css;button[data-testid="buttonShowMore"]',
  1785. interval: 500,
  1786. scrollD: 2000
  1787. }
  1788. }, // Qwant 搜索
  1789. ecosia: {
  1790. host: 'www.ecosia.org',
  1791. functionS: ()=> {if (lp == '/search') {curSite = DBSite.ecosia;}},
  1792. pager: {
  1793. nextL: 'css;nav.pagination a[aria-label="Next page"]',
  1794. pageE: 'css;section.mainline > div:not(.related-queries)',
  1795. replaceE: 'css;nav.pagination',
  1796. scrollD: 1500
  1797. }
  1798. }, // Ecosia 搜索
  1799. magi: {
  1800. host: 'magi.com',
  1801. functionS: ()=> {if (lp == '/search') {curSite = DBSite.magi;}},
  1802. pager: {
  1803. type: 2,
  1804. nextL: 'css;.card[data-type="next"]',
  1805. nextText: '加载更多',
  1806. scrollD: 1500
  1807. }
  1808. }, // Magi 搜索
  1809. ask: {
  1810. host: ['ask.com', 'www.ask.com'],
  1811. functionS: ()=> {if (lp == '/web') {curSite = DBSite.ask;}},
  1812. style: '.PartialSearchResults-heading {display: none !important;}',
  1813. pager: {
  1814. nextL: 'css;li.PartialWebPagination-next > a',
  1815. pageE: 'css;.PartialSearchResults.mid',
  1816. replaceE: 'css;.PartialWebPagination',
  1817. scrollD: 2000
  1818. }
  1819. }, // ASK 搜索
  1820. fsou: {
  1821. host: 'fsou.cc',
  1822. functionS: ()=> {
  1823. if (lp == '/search') {
  1824. if (window.screen.width < 780) {
  1825. curSite = DBSite.fsou_m;
  1826. } else {
  1827. curSite = DBSite.fsou;
  1828. }
  1829. }
  1830. },
  1831. retry: 1000,
  1832. pager: {
  1833. type: 6,
  1834. nextL: ()=> getNextEP('css;.turn-page-num-wrap.selected', 'pageIndex=', /pageIndex=\d+/),
  1835. pageE: 'css;.organic-results > div',
  1836. replaceE: 'css;.bottom-pagination',
  1837. loadTime: 1000,
  1838. scrollD: 3000
  1839. }
  1840. }, // F 搜
  1841. fsou_m: {
  1842. pager: {
  1843. type: 2,
  1844. nextL: 'css;.next-page-container',
  1845. scrollD: 1500
  1846. }
  1847. }, // F 搜 - 手机版
  1848. baidu_tieba: {
  1849. host: ['tieba.baidu.com', 'jump2.bdimg.com'],
  1850. functionS: ()=> {if (location.hostname == 'jump2.bdimg.com') location.hostname = 'tieba.baidu.com';
  1851. if (lp == '/f') {
  1852. baidu_tieba_1(); // 右侧悬浮发帖按钮点击事件(解决自动翻页导致无法发帖的问题)
  1853. curSite = DBSite.baidu_tieba;
  1854. } else if (indexOF('/p/') && GM_getValue('menu_thread')) {
  1855. curSite = DBSite.baidu_tieba_post;
  1856. } else if (lp == '/f/search/res') {
  1857. curSite = DBSite.baidu_tieba_search;
  1858. }},
  1859. style: 'img.j_retract {margin-top: 0 !important;margin-bottom: 0 !important;}', // 修复帖子列表中预览图片,在切换下一个/上一个图片时,多出来的图片上下边距
  1860. history: false,
  1861. iframe: true,
  1862. pager: {
  1863. type: 4,
  1864. nextL: ()=> {if (getNextE('css;a.next.pagination-item')) getPageElems_(curSite.pageUrl + '&pagelets=frs-list%2Fpagelet%2Fthread&pagelets_stamp=' + new Date().getTime());},
  1865. pageE: 'css;#thread_list > li',
  1866. insertP: ['css;#thread_list', 3],
  1867. insertE: baidu_tieba_insertE,
  1868. replaceE: 'css;#frs_list_pager',
  1869. interval: 2000,
  1870. scrollD: 2500
  1871. },
  1872. function: {
  1873. bF: src_bF,
  1874. bFp: [0, 'img[data-original]', 'data-original']
  1875. }
  1876. }, // 百度贴吧 - 帖子列表
  1877. baidu_tieba_post: {
  1878. forceTarget: true,
  1879. 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 元素
  1880. pager: {
  1881. type: 5,
  1882. nextL: '//li[contains(@class,"pb_list_pager")]/a[text()="下一页"]',
  1883. style: 'ul.tbui_aside_float_bar, .core_title_wrap_bright.tbui_follow_fixed.core_title_absolute_bright {display: none !important;}',
  1884. scrollD: 1500
  1885. }
  1886. }, // 百度贴吧 - 帖子内
  1887. baidu_tieba_search: {
  1888. pager: {
  1889. nextL: 'css;a.next',
  1890. pageE: 'css;.s_post_list > div',
  1891. replaceE: 'css;.pager',
  1892. scrollD: 1000
  1893. }
  1894. }, // 百度贴吧 - 搜索页
  1895. douban_subject_comments: {
  1896. host: 'movie.douban.com',
  1897. functionS: ()=> {if (indexOF('/subject/') && indexOF('/comments')) {
  1898. curSite = DBSite.douban_subject_comments;
  1899. } else if (indexOF('/subject/') && indexOF('/reviews')) {
  1900. curSite = DBSite.douban_subject_reviews;
  1901. } else if(indexOF('/subject/') && indexOF('/episode') || indexOF('/subject/') && indexOF('/tv_discuss')) {
  1902. curSite = DBSite.douban_subject_episode;
  1903. } else if(indexOF('/people/') && indexOF('/collect')) {
  1904. curSite = DBSite.douban_people_collect;
  1905. } else if(indexOF('/celebrity/') && indexOF('/movies')) {
  1906. curSite = DBSite.douban_celebrity_movies;
  1907. }},
  1908. pager: {
  1909. nextL: 'css;a.next',
  1910. pageE: 'css;#comments > .comment-item',
  1911. replaceE: 'css;#paginator',
  1912. scrollD: 1500
  1913. }
  1914. }, // 豆瓣 - 短评
  1915. douban_subject_reviews: {
  1916. pager: {
  1917. nextL: 'css;link[rel="next"]',
  1918. pageE: 'css;.review-list > div',
  1919. replaceE: 'css;.paginator',
  1920. scrollD: 1500
  1921. }
  1922. }, // 豆瓣 - 影评
  1923. douban_subject_episode: {
  1924. pager: {
  1925. nextL: 'css;link[rel="next"]',
  1926. pageE: 'css;#comments > div',
  1927. replaceE: 'css;.paginator',
  1928. scrollD: 1500
  1929. }
  1930. }, // 豆瓣 - 剧评
  1931. douban_people_collect: {
  1932. pager: {
  1933. nextL: 'css;link[rel="next"]',
  1934. pageE: 'css;.grid-view > div',
  1935. replaceE: 'css;.paginator',
  1936. scrollD: 1500
  1937. }
  1938. }, // 豆瓣 - 看过的电影
  1939. douban_celebrity_movies: {
  1940. pager: {
  1941. nextL: 'css;link[rel="next"]',
  1942. pageE: 'css;.grid_view > ul > li',
  1943. replaceE: 'css;.paginator',
  1944. scrollD: 1500
  1945. }
  1946. }, // 豆瓣 - 作品
  1947. douban_group: {
  1948. host: 'www.douban.com',
  1949. functionS: ()=> {if (indexOF('/group/topic/') && GM_getValue('menu_thread')) {
  1950. curSite = DBSite.douban_group_topic;
  1951. } else if (indexOF('/group/explore')) {
  1952. curSite = DBSite.douban_group_explore;
  1953. } else if (indexOF('/group/') && indexOF('/discussion')) {
  1954. curSite = DBSite.douban_group;
  1955. }},
  1956. pager: {
  1957. nextL: 'css;span.next > a',
  1958. pageE: 'css;table.olt > tbody > tr:not(.th)',
  1959. replaceE: 'css;.paginator',
  1960. scrollD: 1500
  1961. }
  1962. }, // 豆瓣 - 小组
  1963. douban_group_explore: {
  1964. pager: {
  1965. nextL: 'css;span.next > a',
  1966. pageE: 'css;#content .article > div > .channel-item',
  1967. replaceE: 'css;.paginator',
  1968. scrollD: 1500
  1969. }
  1970. }, // 豆瓣 - 小组讨论精选
  1971. douban_group_topic: {
  1972. pager: {
  1973. nextL: 'css;span.next > a',
  1974. pageE: 'css;#comments > li',
  1975. replaceE: 'css;.paginator',
  1976. scrollD: 1500
  1977. }
  1978. }, // 豆瓣 - 小组帖子内
  1979. zhihu: {
  1980. host: 'www.zhihu.com',
  1981. functionS: ()=> {locationC = true; if (indexOF(/\/people\/.+\/.+/) || indexOF('/collection/')) {curSite = DBSite.zhihu; if (self != top) insStyle('#ProfileHeader {display: none !important;}')}},
  1982. forceTarget: true,
  1983. iframe: true,
  1984. pager: {
  1985. type: 5,
  1986. nextL: ()=> {
  1987. let next = getCSS('.Pagination .PaginationButton--current+button:not(.PaginationButton-next)');
  1988. if (next) return (location.origin + location.pathname + '?page=' + next.textContent)
  1989. },
  1990. scrollD: 2000
  1991. }
  1992. }, // 知乎 - 用户主页、收藏夹
  1993. weibo_comment: {
  1994. host: 'weibo.com',
  1995. pager: {
  1996. type: 2,
  1997. nextL: 'css;a[action-type="click_more_comment"]',
  1998. nextText: '查看更多c',
  1999. scrollD: 1000
  2000. }
  2001. }, // 微博评论
  2002. tianya: {
  2003. host: 'bbs.tianya.cn',
  2004. functionS: ()=> {if (indexOF('/list')) {
  2005. curSite = DBSite.tianya;
  2006. } else if (indexOF('/post') && GM_getValue('menu_thread')) {
  2007. curSite = DBSite.tianya_post;
  2008. }},
  2009. pager: {
  2010. nextL: '//div[contains(@class, "pages")]/div[@class="links"]/a[text()="下一页"]',
  2011. pageE: 'css;.tab-bbs-list > tbody:not(:first-of-type)',
  2012. replaceE: '//div[contains(@class, "pages")]',
  2013. scrollD: 1500
  2014. }
  2015. }, // 天涯社区
  2016. tianya_post: {
  2017. pager: {
  2018. nextL: 'css;a.js-keyboard-next',
  2019. pageE: 'css;.atl-main > div[class="atl-item"]',
  2020. replaceE: 'css;.atl-pages > form',
  2021. scrollD: 2000
  2022. }
  2023. }, // 天涯社区 - 帖子内
  2024. hupu: {
  2025. host: 'bbs.hupu.com',
  2026. functionS: ()=> {if (indexOF('.html')) {
  2027. if (GM_getValue('menu_thread')) curSite = DBSite.hupu_post;
  2028. } else if (lp != '/' && !indexOF('/all-')) {
  2029. curSite = DBSite.hupu;
  2030. }},
  2031. pager: {
  2032. 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 ''}},
  2033. pageE: 'css;li.bbs-sl-web-post-body',
  2034. replaceE: 'css;ul.hupu-rc-pagination',
  2035. scrollD: 1500
  2036. }
  2037. }, // 虎扑社区
  2038. hupu_post: {
  2039. pager: {
  2040. nextL: 'css;li.hupu-rc-pagination-next > a',
  2041. pageE: 'css;.post-reply-list ',
  2042. replaceE: 'css;ul.hupu-rc-pagination',
  2043. scrollD: 2000
  2044. }
  2045. }, // 虎扑社区 - 帖子内
  2046. nga_thread: {
  2047. host: ['bbs.nga.cn', 'ngabbs.com', 'nga.178.com', 'g.nga.cn'],
  2048. iframe: true,
  2049. functionS: ()=> {locationC = true;
  2050. if (lp == '/thread.php') {
  2051. curSite = DBSite.nga_thread;
  2052. } else if (lp == '/read.php' && GM_getValue('menu_thread')) {
  2053. curSite = DBSite.nga_read;
  2054. }},
  2055. pager: {
  2056. nextL: 'css;#pagebbtm a[title="下一页"]',
  2057. pageE: 'css;#topicrows > tbody, #topicrows > script',
  2058. insertP: ['css;#topicrows', 3],
  2059. replaceE: 'css;div[name="pageball"]',
  2060. scriptT: 2,
  2061. scrollD: 1000
  2062. },
  2063. function: {
  2064. aF: ()=> {document.body.appendChild(document.createElement('script')).textContent = 'commonui.topicArg.loadAll();';}
  2065. }
  2066. }, // NGA - 各版块帖子列表
  2067. nga_read: {
  2068. history: false,
  2069. retry: 1000,
  2070. pager: {
  2071. nextL: 'css;#pagebbtm a[title*="下一页"]',
  2072. pageE: 'id("m_posts_c")/table | id("m_posts_c")/script | //script[contains(text(), "commonui.userInfo.setAll")]',
  2073. insertP: ['css;#m_posts_c', 3],
  2074. replaceE: 'css;div[name="pageball"]',
  2075. scriptT: 2,
  2076. scrollD: 1000
  2077. }
  2078. }, // NGA - 帖子内
  2079. v2ex_recent: {
  2080. host: ['v2ex.com', 'www.v2ex.com'],
  2081. functionS: ()=> {if (lp == '/') {
  2082. v2ex_aF('#Main a.topic-link:not([target])');
  2083. } else if (lp == '/recent') {
  2084. curSite = DBSite.v2ex_recent;
  2085. v2ex_aF('#Main a.topic-link:not([target])');
  2086. } else if (lp == '/notifications') {
  2087. curSite = DBSite.v2ex_notifications;
  2088. v2ex_aF('#Main a[href^="/t/"]:not([target])');
  2089. } else if (lp == '/balance') {
  2090. curSite = DBSite.v2ex_balance;
  2091. } else if (indexOF('/go/')) {
  2092. curSite = DBSite.v2ex_go;
  2093. v2ex_aF('#Main a.topic-link:not([target])');
  2094. } else if (indexOF('/replies')) {
  2095. curSite = DBSite.v2ex_replies;
  2096. v2ex_aF('#Main a[href^="/t/"]:not([target])');
  2097. }},
  2098. pager: {
  2099. nextL: 'css;a.page_current+a.page_normal',
  2100. pageE: 'css;.cell.item',
  2101. replaceE: 'css;#Main > .box > .cell[style]:not(.item) > table',
  2102. scrollD: 1500
  2103. },
  2104. function: {
  2105. aF: v2ex_aF,
  2106. aFp: '#Main a.topic-link:not([target])'
  2107. }
  2108. }, // V2EX - 最近主题页
  2109. v2ex_notifications: {
  2110. pager: {
  2111. nextL: 'css;a.page_current+a.page_normal',
  2112. pageE: 'css;#notifications > div',
  2113. replaceE: 'css;#Main > .box > .cell[style] > table',
  2114. scrollD: 1500
  2115. },
  2116. function: {
  2117. aF: v2ex_aF,
  2118. aFp: '#Main a[href^="/t/"]:not([target])'
  2119. }
  2120. }, // V2EX - 提醒消息页
  2121. v2ex_replies: {
  2122. pager: {
  2123. nextL: 'css;a.page_current+a.page_normal',
  2124. 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]',
  2125. insertP: ['//div[@id="Main"]//div[@class="box"]//div[@class="cell"][last()]', 1],
  2126. replaceE: 'css;#Main > .box > .cell[style] > table',
  2127. scrollD: 1500
  2128. },
  2129. function: {
  2130. aF: v2ex_aF,
  2131. aFp: '#Main a[href^="/t/"]:not([target])'
  2132. }
  2133. }, // V2EX - 用户回复页
  2134. v2ex_go: {
  2135. pager: {
  2136. nextL: 'css;a.page_current+a.page_normal',
  2137. pageE: 'css;#TopicsNode > div',
  2138. replaceE: 'css;#Main > .box > .cell[style] > table',
  2139. scrollD: 1500
  2140. },
  2141. function: {
  2142. aF: v2ex_aF,
  2143. aFp: '#Main a.topic-link:not([target])'
  2144. }
  2145. }, // V2EX - 分类主题页
  2146. v2ex_balance: {
  2147. pager: {
  2148. nextL: 'css;a.page_current+a.page_normal',
  2149. pageE: 'css;#Main .box > div:not(.cell) > table > tbody > tr:not(:first-child)',
  2150. replaceE: 'css;#Main > .box > .cell[style] > table',
  2151. scrollD: 1000
  2152. }
  2153. }, // V2EX - 账户余额页
  2154. jandan: {
  2155. host: 'jandan.net',
  2156. functionS: ()=> {if (lp == '/' || indexOF('/page/')) {
  2157. curSite = DBSite.jandan;
  2158. } else if (lp == '/dzh') {
  2159. curSite = DBSite.jandan_dzh;
  2160. } else {
  2161. curSite = DBSite.jandan_comment;
  2162. }},
  2163. style: '#nav_prev, #nav_next, .post.f:not(.list-post) {display: none !important;}',
  2164. history: false,
  2165. pager: {
  2166. nextL: '//div[@class="wp-pagenavi"]/a[contains(text(), "下一页") or contains(text(), "更多文章")]',
  2167. pageE: 'css;#content > .list-post',
  2168. replaceE: 'css;.wp-pagenavi',
  2169. scrollD: 1500
  2170. },
  2171. function: {
  2172. bF: src_bF,
  2173. bFp: [0, 'img[data-original]', 'data-original']
  2174. }
  2175. }, // 煎蛋网
  2176. jandan_comment: {
  2177. style: '#nav_prev, #nav_next {display: none !important;} .jandan-vote a.tucao-btn23:link {color: #c8c7cc !important;} .jandan-tucao {background-color: #fafaf9 !important;}',
  2178. pager: {
  2179. nextL: 'css;a.previous-comment-page',
  2180. pageE: 'css;ol.commentlist > li[id^="comment-"], script[src^="//cdn.jandan.net/static/min/"]',
  2181. insertP: ['css;ol.commentlist', 3],
  2182. replaceE: 'css;.cp-pagenavi',
  2183. scriptT: 2,
  2184. scrollD: 1500
  2185. },
  2186. function: {
  2187. bF: pageElems => { // 插入前函数(修改当前网页中的 吐槽 等按钮,避免重复添加点击事件)
  2188. getAllCSS('a.tucao-btn').forEach(function (now) {now.className = now.className.replace('tucao-btn', 'tucao-btn23');});
  2189. getAllCSS('a.comment-like.like').forEach(function (now) {now.className = now.className.replace('comment-like', 'comment-like23');});
  2190. getAllCSS('a.comment-unlike.unlike').forEach(function (now) {now.className = now.className.replace('comment-unlike', 'comment-unlike23');});
  2191. return pageElems
  2192. }
  2193. }
  2194. }, // 煎蛋网
  2195. jandan_dzh: {
  2196. history: false,
  2197. pager: {
  2198. type: 2,
  2199. nextL: 'css;.show_more',
  2200. interval: 1500,
  2201. scrollD: 1500
  2202. }
  2203. }, // 煎蛋网 - 大杂烩
  2204. qiushibaike: {
  2205. host: 'www.qiushibaike.com',
  2206. functionS: ()=> {insStyle('.qrcode-wrap, .qrcode-wrap-img, .index-side-left-AD1 {display: none !important;}');
  2207. if (lp == '/') {
  2208. curSite = DBSite.qiushibaike;
  2209. } else if (!indexOF('/article/')) {
  2210. curSite = DBSite.qiushibaike_;
  2211. }},
  2212. pager: {
  2213. nextL: '//ul[@class="pagination"]//a[./span[@class="next"]]',
  2214. pageE: 'css;.recommend-article > ul > li',
  2215. replaceE: 'css;ul.pagination',
  2216. scrollD: 1500
  2217. }
  2218. }, // 糗事百科
  2219. qiushibaike_: {
  2220. pager: {
  2221. nextL: '//ul[@class="pagination"]//a[./span[@class="next"]]',
  2222. pageE: 'css;[id^="qiushi_tag_"]',
  2223. replaceE: 'css;ul.pagination',
  2224. scrollD: 1500
  2225. }
  2226. }, // 糗事百科 - 分类页
  2227. lkong: {
  2228. host: 'www.lkong.com',
  2229. functionS: ()=> {locationC = true; if (indexOF('/forum/')) {
  2230. curSite = DBSite.lkong;
  2231. } else if (indexOF('/thread/') && GM_getValue('menu_thread')) {
  2232. curSite = DBSite.lkong;
  2233. curSite.pager.pageE = '//div[@class="main-content"]/parent::div | //head/style[@data-emotion-css]';
  2234. curSite.pager.insertP = ['//div[@class="main-content"][1]/parent::div/parent::div', 3];
  2235. }},
  2236. history: false,
  2237. pager: {
  2238. nextL: ()=> { // 获取下一页地址
  2239. let next = getCSS('li.ant-pagination-next'), page;
  2240. if (next && next.getAttribute('aria-disabled') === 'false') {
  2241. page = getCSS('li.ant-pagination-item-active[title]');
  2242. if (page && page.title) {return (location.origin + location.pathname + '?page=' + ++page.title);}
  2243. }
  2244. return '';
  2245. },
  2246. pageE: '//div[@class="main-title"]/parent::div/parent::div | //head/style[@data-emotion-css]',
  2247. insertP: ['//div[@class="main-title"][1]/parent::div/parent::div/parent::div', 3],
  2248. replaceE: 'css;ul.ant-pagination',
  2249. interval: 500,
  2250. scrollD: 1200
  2251. }
  2252. }, // 龙的天空
  2253. pediy_forum: {
  2254. host: 'bbs.pediy.com',
  2255. functionS: ()=> {if (indexOF('/forum-')) {
  2256. curSite = DBSite.pediy_forum;
  2257. } else if (indexOF('/thread-') && GM_getValue('menu_thread')) {
  2258. curSite = DBSite.pediy_thread;
  2259. }},
  2260. pager: {
  2261. nextL: '//a[@class="page-link" and text()="▶"]',
  2262. pageE: 'css;table.threadlist > tbody > tr',
  2263. replaceE: 'css;ul.pagination',
  2264. scrollD: 1500
  2265. }
  2266. }, // 看雪论坛 - 各版块帖子列表
  2267. pediy_thread: {
  2268. pager: {
  2269. nextL: '//a[@class="page-link" and text()="▶"]',
  2270. pageE: 'css;table.postlist > tbody > tr[data-pid]',
  2271. replaceE: 'css;ul.pagination',
  2272. scrollD: 1500
  2273. }
  2274. }, // 看雪论坛 - 帖子内
  2275. bangumitv: {
  2276. host: 'bangumi.tv',
  2277. functionS: ()=> {
  2278. if (indexOF('/browser') || indexOF('/subject_search')) {
  2279. curSite = DBSite.bangumitv;
  2280. } else if (indexOF('/forum')) {
  2281. curSite = DBSite.bangumitv_forum;
  2282. }},
  2283. pager: {
  2284. nextL: '//div[@class="page_inner"]/a[text()="››"]',
  2285. pageE: 'css;ul#browserItemList > li',
  2286. replaceE: 'css;.page_inner',
  2287. scrollD: 1500
  2288. }
  2289. }, // 番组计划
  2290. bangumitv_forum: {
  2291. pager: {
  2292. nextL: '//div[@class="page_inner"]/a[text()="››"]',
  2293. pageE: 'css;.topic_list > tbody:last-of-type > tr.topic',
  2294. replaceE: 'css;.page_inner',
  2295. scrollD: 1500
  2296. }
  2297. }, // 番组计划 - 小组帖子列表
  2298. dongchedi: {
  2299. host: 'www.dongchedi.com',
  2300. functionS: ()=> {locationC = true;
  2301. if (indexOF('/community/')) {
  2302. curSite = DBSite.dongchedi;
  2303. }},
  2304. pager: {
  2305. nextL: 'css;li.pagination-item.is-active+li > a',
  2306. pageE: 'css;.data-wrapper > section.community-card, style',
  2307. insertP: ['css;.data-wrapper', 3],
  2308. replaceE: '//ul[./li[contains(@class, "pagination-item")]]',
  2309. scrollD: 2000
  2310. },
  2311. function: {
  2312. bF: pageElems => {
  2313. pageElems.forEach(function (one) {
  2314. one.querySelectorAll('.g-load-img-wrap, .tw-absolute.tw-cursor-pointer, .avatar').forEach(function (now) {
  2315. getCSS('noscript+img', now).src = getCSS('noscript > img', now).src;
  2316. });
  2317. });
  2318. return pageElems
  2319. }
  2320. }
  2321. }, // 懂车帝论坛
  2322. kdslife: {
  2323. host: 'club.kdslife.com',
  2324. functionS: ()=> {
  2325. if (indexOF('/f_')) {
  2326. curSite = DBSite.kdslife;
  2327. } else if (indexOF('/t_')) {
  2328. curSite = DBSite.kdslife_t;
  2329. }},
  2330. pager: {
  2331. nextL: '//div[@class="fr i3_r"]/a[text()="后一页"]',
  2332. pageE: 'css;ul.main_List > li.i2:not(.h_bg)',
  2333. replaceE: 'css;ul.main_List > li.i3',
  2334. scrollD: 1000
  2335. }
  2336. }, // 宽带山论坛
  2337. kdslife_t: {
  2338. pager: {
  2339. nextL: '//div[@class="pages"]/a[text()=">>"]',
  2340. pageE: 'css;#reply_list_panel > *, script[src*="ui/js/kds.js"]',
  2341. insertP: ['css;#reply_list_panel', 3],
  2342. replaceE: 'css;.pages',
  2343. scriptT: 2,
  2344. scrollD: 1000
  2345. }
  2346. }, // 宽带山论坛 - 帖子内
  2347. libaclub: {
  2348. host: 'www.libaclub.com',
  2349. functionS: ()=> {
  2350. if (lp == '/' || indexOF('/date_')) {
  2351. curSite = DBSite.libaclub;
  2352. } else if (indexOF('/f_')) {
  2353. curSite = DBSite.libaclub_f;
  2354. } else if (indexOF('/t_') || indexOF('/reply_')) {
  2355. curSite = DBSite.libaclub_t;
  2356. } else if (indexOF('/prt_')) {
  2357. curSite = DBSite.libaclub_prt;
  2358. } else if (lp == '/facade.php') {
  2359. curSite = DBSite.libaclub_search;
  2360. }},
  2361. style: 'li.ui-list-merchant-ad, .ui-nav-appImage {display: none !important;}',
  2362. pager: {
  2363. nextL: '//div[@class="ui-crumbs-more"]/a[@class="fn-link"][1]',
  2364. pageE: 'css;ul.ui-list > li:not(.ui-list-item-head):not(.ui-list-merchant-ad)',
  2365. replaceE: 'css;div.ui-crumbs-more',
  2366. scrollD: 1200
  2367. }
  2368. }, // 篱笆网论坛
  2369. libaclub_f: {
  2370. style: 'li.ui-list-merchant-ad, .ui-nav-appImage {display: none !important;}',
  2371. pager: {
  2372. nextL: 'css;a.ui-paging-next',
  2373. pageE: 'css;ul.ui-list > li:not(.ui-list-item-head):not(.ui-list-merchant-ad)',
  2374. replaceE: 'css;div.ui-paging',
  2375. scrollD: 1200
  2376. }
  2377. }, // 篱笆网论坛 - 各版块帖子列表
  2378. libaclub_t: {
  2379. style: 'li.ui-list-merchant-ad, .ui-nav-appImage {display: none !important;}',
  2380. pager: {
  2381. nextL: 'css;a.ui-paging-next',
  2382. pageE: 'css;.ui-box-content > div.ui-topic, .ui-box-content > a[name]',
  2383. insertP: ['css;.ui-box-content', 3],
  2384. replaceE: 'css;div.ui-paging',
  2385. scrollD: 1500
  2386. }
  2387. }, // 篱笆网论坛 - 帖子内
  2388. libaclub_prt: {
  2389. style: 'li.ui-list-merchant-ad, .ui-nav-appImage {display: none !important;}',
  2390. pager: {
  2391. nextL: 'css;a.ui-paging-next',
  2392. pageE: 'css;ul.ui-list > li',
  2393. replaceE: 'css;div.ui-paging',
  2394. scrollD: 2000
  2395. }
  2396. }, // 篱笆网论坛 - 帖子内 - 打印版
  2397. libaclub_search: {
  2398. style: 'li.ui-list-merchant-ad, .ui-nav-appImage {display: none !important;}',
  2399. pager: {
  2400. nextL: '//div[@class="ui-page"]/a[contains(text(), "下一页")]',
  2401. pageE: 'css;.ui-box-main > ul.ui-list > li',
  2402. replaceE: 'css;div.ui-page',
  2403. scrollD: 1200
  2404. }
  2405. }, // 篱笆网论坛 - 搜索页
  2406. taoguba: {
  2407. host: 'www.taoguba.com.cn',
  2408. functionS: ()=> {insStyle('#joinTGB {display: none !important;}')
  2409. if (indexOF('/Article/') && GM_getValue('menu_thread')) {
  2410. curSite = DBSite.taoguba_t;
  2411. } else if (indexOF('/shenghuoba/')) {
  2412. curSite = DBSite.taoguba_;
  2413. } else if (indexOF(/\/bbs|zongban|dianzan|jinghua\//)) {
  2414. curSite = DBSite.taoguba;
  2415. }},
  2416. history: false,
  2417. pager: {
  2418. nextL: ()=> {
  2419. let next = getXpath('//div[contains(@class, "t_page01")]/a[contains(text(), "下一页")]'), next_ = '/';
  2420. if (next) {
  2421. next = next.getAttribute('onclick').replace('gotoPage(','').replace(')','').split(',');
  2422. if (indexOF(/\/dianzan|jinghua\//)) next_ = '-';
  2423. if (parseInt(next[0]) <= parseInt(next[2])) {return (`${location.origin}/${location.pathname.split('/')[1]}/${next[0]}${next_}${next[1]}`)}
  2424. }
  2425. return '';
  2426. },
  2427. pageE: 'css;.p_list > .p_list01[class*="user_"]',
  2428. replaceE: 'css;.t_page',
  2429. scrollD: 1000
  2430. }
  2431. }, // 淘股吧论坛
  2432. taoguba_: {
  2433. history: false,
  2434. pager: {
  2435. nextL: ()=> {
  2436. let next = getCSS('#N_go_pageBtn'), next_ = location.pathname.split('/')[2].split('-')[0];
  2437. if (next && (parseInt(next.dataset.now) + 1 <= parseInt(next.dataset.total))) {
  2438. if (!next_) next_ = 'H';
  2439. return (`${location.origin}/shenghuoba/${next_}-${parseInt(next.dataset.now) + 1}`)
  2440. }
  2441. return '';
  2442. },
  2443. pageE: 'css;.lifeContent-topicList-item',
  2444. replaceE: 'css;.N_sortPage ',
  2445. scrollD: 1000
  2446. }
  2447. }, // 淘股吧论坛 - 生活圈
  2448. taoguba_t: {
  2449. history: false,
  2450. pager: {
  2451. nextL: ()=> {
  2452. let next = getXpath('//div[contains(@class, "t_page01")]/a[contains(text(), "下一页")]');
  2453. if (next) {
  2454. next = next.getAttribute('onclick').replace('gotoPageTopic(','').replace(')','').split(',');
  2455. if (parseInt(next[0]) <= parseInt(next[1])) {return (`${location.origin}/Article/${getCSS("#looktopicID").value}/${next[0]}`)}
  2456. }
  2457. return '';
  2458. },
  2459. pageE: 'css;div[id^="reply_"]',
  2460. replaceE: 'css;.t_page',
  2461. scrollD: 1000
  2462. },
  2463. function: {
  2464. bF: src_bF,
  2465. bFp: [0, 'img[data-original]', 'data-original']
  2466. }
  2467. }, // 淘股吧论坛 - 帖子内
  2468. lowendtalk: {
  2469. host: 'lowendtalk.com',
  2470. pager: {
  2471. nextL: 'css;a.Next',
  2472. pageE: 'css;ul.DataList > li',
  2473. replaceE: 'css;.Pager',
  2474. scrollD: 1500
  2475. }
  2476. }, // LowEndTalk
  2477. lieyou: {
  2478. host: 'bbs.lieyou888.com',
  2479. functionS: ()=> {if (indexOF('/forum')) {curSite = DBSite.lieyou;}},
  2480. pager: {
  2481. nextL: '//div[contains(@class, "_pageNav")]/a[text()="下一页"]',
  2482. pageE: 'css;ul.gb-bbs-list > li',
  2483. replaceE: 'css;._pageNav',
  2484. scrollD: 1000
  2485. },
  2486. function: {
  2487. bF: src_bF,
  2488. bFp: [0, 'img[original]', 'original']
  2489. }
  2490. }, // 芥子空间论坛
  2491. xcar_forumdisplay: {
  2492. host: 'www.xcar.com.cn',
  2493. functionS: ()=> {if (lp == '/bbs/forumdisplay.php') {curSite = DBSite.xcar_forumdisplay}},
  2494. pager: {
  2495. nextL: 'css;a.page_down',
  2496. pageE: 'css;.table-section > dl:not(.table_head)',
  2497. replaceE: 'css;.forumList_page',
  2498. scrollD: 2000
  2499. }
  2500. }, // 爱卡汽车网论坛 - 各版块帖子列表
  2501. flyert_forumdisplay: {
  2502. host: 'www.flyert.com',
  2503. functionS: ()=> {if (indexOF('/forum-') || indexOF('mod=forumdisplay', 's')) {
  2504. curSite = DBSite.flyert_forumdisplay;
  2505. } else if (indexOF('/forum') || indexOF('mod=viewthread', 's')) {
  2506. if (GM_getValue('menu_thread')) {curSite = DBSite.flyert_viewthread;}
  2507. }},
  2508. pager: {
  2509. nextL: 'css;a.nxt:not([href*="javascript"])',
  2510. pageE: 'css;#threadlist table > tbody[id^="normalthread_"]',
  2511. replaceE: 'css;.pg',
  2512. scrollD: 2500
  2513. }
  2514. }, // 飞客网论坛 - 各版块帖子列表
  2515. flyert_viewthread: {
  2516. pager: {
  2517. nextL: 'css;a.nxt:not([href*="javascript"])',
  2518. pageE: 'css;#postlist > .comiis_viewbox',
  2519. replaceE: 'css;.comiis_pgs > .pg',
  2520. scrollD: 3000
  2521. }
  2522. }, // 飞客网论坛 - 帖子内
  2523. cnprint: {
  2524. host: 'www.cnprint.org',
  2525. functionS: ()=> {if (indexOF('/forum/')) {curSite = DBSite.cnprint;} else if (indexOF('/thread/') && GM_getValue('menu_thread')) {curSite = DBSite.cnprint_thread;}},
  2526. pager: {
  2527. nextL: 'css;a[rel="next"]',
  2528. pageE: 'css;tbody[id*="threadbits_forum"] > tr',
  2529. replaceE: 'css;.pagenav',
  2530. scrollD: 2500
  2531. }
  2532. }, // CPC 中文印刷社区
  2533. cnprint_thread: {
  2534. pager: {
  2535. nextL: 'css;a[rel="next"]',
  2536. pageE: 'css;#posts > div:not([id])',
  2537. replaceE: 'css;.pagenav',
  2538. scrollD: 2000
  2539. }
  2540. }, // CPC 中文印刷社区 - 帖子内
  2541. discusshk: {
  2542. host: /.+\.discuss\.com\.hk/,
  2543. functionS: ()=> {if (lp == '/forumdisplay.php') {curSite = DBSite.discusshk;} else if (lp == '/viewthread.php' && GM_getValue('menu_thread')) {curSite = DBSite.discusshk_thread;}},
  2544. pager: {
  2545. nextL: 'css;.pagination a.next',
  2546. pageE: 'css;tbody[id^="normalthread_"]',
  2547. replaceE: 'css;.pagination',
  2548. scrollD: 2000
  2549. }
  2550. }, // 中国香港社区
  2551. discusshk_thread: {
  2552. style: '.viewthread.mt-0:not(:first-of-type) .viewthread__head {display: none !important;}',
  2553. pager: {
  2554. nextL: 'css;.pagination a.next',
  2555. pageE: 'css;.viewthread',
  2556. replaceE: 'css;.pagination',
  2557. scrollD: 2000
  2558. }
  2559. }, // 中国香港论坛 - 帖子内
  2560. tgfcer: {
  2561. host: 'bbs.tgfcer.com',
  2562. 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;}},
  2563. pager: {
  2564. nextL: 'css;.pages a.next',
  2565. pageE: 'css;tbody[id^="normalthread_"]',
  2566. replaceE: 'css;.pages',
  2567. scrollD: 2000
  2568. }
  2569. }, // TGFC Lifestyle
  2570. tgfcer_thread: {
  2571. style: '.viewthread:not(:first-of-type) h1 {display: none !important;}',
  2572. pager: {
  2573. nextL: 'css;.pages a.next',
  2574. pageE: 'css;.viewthread',
  2575. replaceE: 'css;.pages',
  2576. scrollD: 2000
  2577. }
  2578. }, // TGFC Lifestyle - 帖子内
  2579. south: {
  2580. host: /((www|bbs)\.)?(soul|north|south|white|level|summer|spring|snow)-plus\.(net|org)/,
  2581. functionS: ()=> {
  2582. if (lp == '/thread.php' || lp == '/search.php') {
  2583. curSite = DBSite.south;
  2584. } else if (lp == '/thread_new.php') {
  2585. 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;}';
  2586. } else if (GM_getValue('menu_thread') && lp == '/read.php') {
  2587. curSite = DBSite.south; curSite.pager.pageE = 'css;form[name=delatc] > *:not(input)';
  2588. } else if (lp == '/u.php' && (indexOF('action-topic-', 's') || indexOF('action-post-', 's'))) {
  2589. curSite = DBSite.south; curSite.pager.pageE = 'css;#u-contentmain table tr';
  2590. }},
  2591. pager: {
  2592. nextL: '//div[@class="pages"]/ul/li[./b]/following-sibling::li[1][not(@class)]/a[not(text()="»")]',
  2593. pageE: 'css;tr.tr3',
  2594. replaceE: 'css;.pages',
  2595. scrollD: 1500
  2596. }
  2597. }, // South Plus (南+)
  2598. goddessfantasy: {
  2599. host: 'www.goddessfantasy.net',
  2600. functionS: ()=> {
  2601. if (indexOF('board=', 's')) {
  2602. curSite = DBSite.goddessfantasy;
  2603. } else if (indexOF('topic=', 's')) {
  2604. if (GM_getValue('menu_thread')) curSite = DBSite.goddessfantasy; curSite.pager.pageE = 'css;#quickModForm > *';
  2605. }},
  2606. pager: {
  2607. nextL: '//div[contains(@class,"pagelinks")]/a[@class="navPages" and text()="»"]',
  2608. pageE: 'css;.table_grid > tbody > tr',
  2609. replaceE: 'css;.pagelinks',
  2610. scrollD: 1500
  2611. }
  2612. }, // 纯美苹果园
  2613. adnmb3: {
  2614. host: ['adnmb3.com', 'www.tnmb.org'],
  2615. functionS: ()=> {
  2616. if (indexOF('/m/f/')) {
  2617. curSite = DBSite.adnmb3_mf;
  2618. } else if (indexOF('/m/t/')) {
  2619. if (GM_getValue('menu_thread')) curSite = DBSite.adnmb3_mt;
  2620. } else if (indexOF(/\/(f|Forum)\//)) {
  2621. curSite = DBSite.adnmb3;
  2622. } else if (indexOF('/t/')) {
  2623. if (GM_getValue('menu_thread')) curSite = DBSite.adnmb3_t;
  2624. }},
  2625. pager: {
  2626. nextL: '//ul[contains(@class, "pagination")]//a[text()="下一页"]',
  2627. pageE: 'css;.h-threads-list > *, script[src$="/h.desktop.js"]',
  2628. insertP: ['css;.h-threads-list', 3],
  2629. replaceE: '//ul[contains(@class, "pagination")]',
  2630. scriptT: 2,
  2631. scrollD: 2500
  2632. }
  2633. }, // A 岛
  2634. adnmb3_t: {
  2635. pager: {
  2636. nextL: '//ul[contains(@class, "pagination")]//a[text()="下一页"]',
  2637. pageE: 'css;.h-threads-list > .h-threads-item > .h-threads-item-replys, script[src$="/h.desktop.js"]',
  2638. insertP: ['css;.h-threads-list > .h-threads-item', 3],
  2639. replaceE: '//ul[contains(@class, "pagination")]',
  2640. scriptT: 2,
  2641. scrollD: 2500
  2642. }
  2643. }, // A 岛 - 帖子内
  2644. adnmb3_mf: {
  2645. pager: {
  2646. nextL: '//li[contains(@class, "pagination-next")]//a[text()="下一页"]',
  2647. 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"]',
  2648. insertP: ['css;#h-threads-pagination', 1],
  2649. replaceE: 'css;#h-threads-pagination',
  2650. scriptT: 2,
  2651. scrollD: 2500
  2652. }
  2653. }, // A 岛 - 帖子列表(手机版)
  2654. adnmb3_mt: {
  2655. pager: {
  2656. nextL: '//li[contains(@class, "pagination-next")]//a[text()="下一页"]',
  2657. pageE: 'css;.h-threads-replylist > div, script[src$="/h.mobile.js"]',
  2658. insertP: ['css;.h-threads-replylist', 3],
  2659. replaceE: 'css;#h-threads-pagination',
  2660. scriptT: 2,
  2661. scrollD: 2500
  2662. }
  2663. }, // A 岛 - 帖子内(手机版)
  2664. pixiv: {
  2665. host: 'www.pixiv.net',
  2666. functionS: ()=> {locationC = true;
  2667. if (lp == '/') {
  2668. forceTarget();
  2669. } else if (indexOF('/tags/')/* && self == top*/) {
  2670. curSite = DBSite.pixiv;
  2671. } else if (indexOF('/users/') && indexOF(/\/(artworks|illustrations|manga)/)) {
  2672. curSite = DBSite.pixiv_user;
  2673. } else if (indexOF('/artworks/')) {
  2674. setTimeout(function(){getXpath('//button[contains(string(), "查看全部") or contains(string(), "See all") or contains(string(), "すべて見る") or contains(string(), "모두 보기")]').click();}, 1000)
  2675. }
  2676. },
  2677. forceTarget: true,
  2678. 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;}',
  2679. iframe: true,
  2680. pager: {
  2681. type: 5,
  2682. nextL: 'css;a[aria-disabled="false"][class*="filterProps-Styled-Component"][href]:last-child',
  2683. /*pageE: '//ul[contains(@class, "-1 ")]/li',
  2684. insertP: ['//ul[contains(@class, "-1 ")]', 3],
  2685. replaceE: '//nav[./a[@aria-disabled="false"][contains(@class, "filterProps-Styled-Component")]]',*/
  2686. scrollD: 2000
  2687. }
  2688. }, // Pixiv - 分类页
  2689. pixiv_user: {
  2690. forceTarget: true,
  2691. 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;}',
  2692. pager: {
  2693. type: 5,
  2694. nextL: 'css;a[aria-disabled="false"][class*="filterProps-Styled-Component"][href]:last-child',
  2695. /*pageE: '//ul[contains(@class, "-1 ")]/li',
  2696. insertP: ['//ul[contains(@class, "-1 ")]', 3],
  2697. replaceE: '//nav[./a[@aria-disabled="false"][contains(@class, "filterProps-Styled-Component")]]',*/
  2698. scrollD: 2000
  2699. }
  2700. }, // Pixiv - 用户作品页
  2701. vilipix: {
  2702. host: 'www.vilipix.com',
  2703. functionS: ()=> {locationC = true; if (lp == '/') {forceTarget();} else if (indexOF(/\/(tags|user|new|ranking)/)) {curSite = DBSite.vilipix;}},
  2704. forceTarget: true,
  2705. pager: {
  2706. type: 6,
  2707. nextL: ()=> {let next = getCSS('li.number.active+li.number'); if (next) return (location.origin + location.pathname + '?p=' + next.textContent)},
  2708. pageE: 'css;ul.illust-content > li',
  2709. replaceE: 'css;ul.el-pager',
  2710. loadTime: 800,
  2711. scrollD: 2000
  2712. }
  2713. }, // Vilipix
  2714. pixivision: {
  2715. host: 'www.pixivision.net',
  2716. functionS: ()=> {if (!indexOF('/a/')) curSite = DBSite.pixivision;},
  2717. pager: {
  2718. nextL: 'css;a.next',
  2719. pageE: 'css;li.article-card-container',
  2720. replaceE: 'css;._pager',
  2721. scrollD: 2000
  2722. }
  2723. }, // Pixivision
  2724. _58pic: {
  2725. host: 'www.58pic.com',
  2726. functionS: ()=> {insStyle('.qt-model-t.login-model {display: none !important;}');
  2727. if (indexOF(/\/(tupian|piccate)\//)) {
  2728. curSite = DBSite._58pic;
  2729. 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;}')
  2730. } else if (indexOF('/c/')) {
  2731. curSite = DBSite._58pic_c;
  2732. }},
  2733. style: '.qtw-card.place-box, .card-lazy, .is-line .is-back {display: none !important;}',
  2734. pager: {
  2735. nextL: '//div[contains(@class,"page-box")]//a[text()="下一页"]',
  2736. pageE: 'css;.card-grid-box:not(.favorites-box) > div',
  2737. replaceE: 'css;.page-box',
  2738. scrollD: 2500
  2739. },
  2740. function: {
  2741. bF: "src_bF",
  2742. bFp: [0, 'img[data-original]', 'data-original']
  2743. }
  2744. }, // 千图网 - 分类/搜索页
  2745. _58pic_c: {
  2746. pager: {
  2747. nextL: '//div[contains(@class,"page-box")]//a[text()="下一页"]',
  2748. pageE: 'css;.list-box > .qtw-card',
  2749. replaceE: 'css;.page-box',
  2750. scrollD: 4000
  2751. },
  2752. function: {
  2753. bF: src_bF,
  2754. bFp: [0, 'img[data-original]', 'data-original']
  2755. }
  2756. }, // 千图网 - 专题/收藏夹
  2757. _588ku: {
  2758. host: '588ku.com',
  2759. style: '.listlogin-box.listloginBox, .CLdialogV1, .editIndexEntry, .globalRSideB {display: none !important;}',
  2760. pager: {
  2761. nextL: '//ul[contains(@class, "page-list")]//a[text()="下一页"]',
  2762. pageE: 'css;.data-box .dataList, .data-box .data-list',
  2763. insertP: ['css;.data-box .dataList, .data-box .data-list', 3],
  2764. replaceE: 'css;ul.page-list',
  2765. scrollD: 2000
  2766. },
  2767. function: {
  2768. bF: src_bF,
  2769. bFp: [0, 'img[data-original]', 'data-original']
  2770. }
  2771. }, // 千库网
  2772. nipic: {
  2773. host: ['www.nipic.com', 'soso.nipic.com'],
  2774. style: 'li.search-works-item {display: none !important;}',
  2775. pager: {
  2776. nextL: '//a[@title="下一页" or text()="下一页"][not(contains(@class, "search-works-nextpage"))]',
  2777. pageE: 'css;ul#img-list-outer > li',
  2778. replaceE: 'css;.common-page-box, .common-seo-page-box',
  2779. scrollD: 2000
  2780. },
  2781. function: {
  2782. bF: src_bF,
  2783. bFp: [0, 'img[data-original]', 'data-original']
  2784. }
  2785. }, // 昵图网
  2786. ztupic: {
  2787. host: 'www.ztupic.com',
  2788. functionS: ()=> {if (lp != '/' && !indexOF('/sucai/')) {curSite = DBSite.ztupic;}},
  2789. pager: {
  2790. nextL: 'css;a.page-link[rel="next"]',
  2791. pageE: 'css;.floor_item',
  2792. replaceE: 'css;ul.pagination',
  2793. scrollD: 2000
  2794. },
  2795. function: {
  2796. bF: src_bF,
  2797. bFp: [0, 'img[data-src]', 'data-src']
  2798. }
  2799. }, // 众图网
  2800. ooopic: {
  2801. host: ['www.ooopic.com', 'so.ooopic.com', 'weili.ooopic.com'],
  2802. functionS: ()=> {if (lp != '/' && !indexOF('/weili_')) {curSite = DBSite.ooopic;}},
  2803. style: '.overWidth.clearfix.masonry {height: auto !important;} .pic-list, .video-list {position: relative !important;float: left !important;top: auto !important;left: auto !important;}',
  2804. pager: {
  2805. nextL: 'css;a.next_page, a.so-next',
  2806. pageE: 'css;.overWidth.clearfix.masonry > div',
  2807. replaceE: 'css;.page',
  2808. scrollD: 2000
  2809. },
  2810. function: {
  2811. bF: src_bF,
  2812. bFp: [0, 'img[data-original]', 'data-original']
  2813. }
  2814. }, // 我图网
  2815. ibaotu: {
  2816. host: 'ibaotu.com',
  2817. 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'}}},
  2818. style: '.searchAdver {display: none !important;}',
  2819. pager: {
  2820. nextL: 'css;a.next',
  2821. pageE: 'css;.pr-container[pr-data-title]:not(.searchAdver)',
  2822. replaceE: 'css;.pagelist',
  2823. scrollD: 2000
  2824. },
  2825. function: {
  2826. bF: src_bF,
  2827. bFp: [0, 'img[data-url]', 'data-url']
  2828. }
  2829. }, // 包图网
  2830. pixabay: {
  2831. host: 'pixabay.com',
  2832. pager: {
  2833. nextL: '//a[text()="›"]',
  2834. pageE: 'css;[class^="results"] > [class^="container"] > div',
  2835. replaceE: '//a[text()="›"]',
  2836. scrollD: 2000
  2837. },
  2838. function: {
  2839. bF: src_bF,
  2840. bFp: [0, 'img[data-lazy-src]', 'data-lazy-src']
  2841. }
  2842. }, // Pixabay
  2843. logosc: {
  2844. host: 'www.logosc.cn',
  2845. functionS: ()=> {if (indexOF('/so/')) {curSite = DBSite.logosc;}},
  2846. pager: {
  2847. type: 2,
  2848. nextL: 'css;button.so-pablo-button',
  2849. interval: 1500,
  2850. scrollD: 1500
  2851. }
  2852. }, // 搜图神器 (免费无版权)
  2853. sccnn: {
  2854. host: 'www.sccnn.com',
  2855. pager: {
  2856. nextL: '//ul[@class="listpage"]//a[text()=">"]',
  2857. pageE: 'css;td[valign="TOP"]:not([width]) tr[valign="Middle"]',
  2858. replaceE: 'css;ul.listpage',
  2859. scrollD: 1000
  2860. }
  2861. }, // 素材中国
  2862. sccnn_so: {
  2863. host: 'so.sccnn.com',
  2864. pager: {
  2865. nextL: 'css;font[color="Red"]+a.F16',
  2866. pageE: '//tr[@valign="Top"][1]/preceding-sibling::tr',
  2867. replaceE: '//tr[@valign="Top"][last()]',
  2868. scrollD: 1000
  2869. }
  2870. }, // 素材中国 - 搜索页
  2871. pngss: {
  2872. host: 'pngss.com',
  2873. functionS: ()=> {if (lp == '/search') curSite = DBSite.pngss;},
  2874. pager: {
  2875. nextL: 'css;.page a[rel="next"]',
  2876. pageE: 'css;ul.list-ul > li',
  2877. replaceE: 'css;.page',
  2878. scrollD: 1200
  2879. },
  2880. function: {
  2881. bF: src_bF,
  2882. bFp: [0, 'img[data-original]', 'data-original']
  2883. }
  2884. }, // PNG 搜索网
  2885. iconfont: {
  2886. host: 'www.iconfont.cn',
  2887. functionS: ()=> {locationC = true; if (indexOF('/search/')) curSite = DBSite.iconfont;},
  2888. forceTarget: true,
  2889. style: '.footer, header .bind-tips, .block-pagination-wrap {display: none !important;}',
  2890. iframe: true,
  2891. pager: {
  2892. type: 5,
  2893. nextL: ()=> getNextEP('css;li.active+li:not(.disabled) > a', 'page=', /page=\d+/),
  2894. scrollD: 1000
  2895. }
  2896. }, // iconfont
  2897. iconarchive: {
  2898. host: 'iconarchive.com',
  2899. functionS: ()=> {if (indexOF(/\/(tag|search|category)/)) curSite = DBSite.iconarchive;},
  2900. pager: {
  2901. nextL: 'css;a.next',
  2902. pageE: 'css;.icondetail',
  2903. replaceE: 'css;.pagination',
  2904. scrollD: 2000
  2905. }
  2906. }, // IconArchive
  2907. puxiang: {
  2908. host: 'www.puxiang.com',
  2909. functionS: ()=> {if (lp == '/search/favorite') {
  2910. curSite = DBSite.puxiang_collect;
  2911. } else if (lp == '/search/puxiang' || lp == '/list' || lp == '/galleries' || lp == '/articles') {
  2912. curSite = DBSite.puxiang;
  2913. } else if (lp == '/') {
  2914. curSite = DBSite.puxiang; curSite.pager.scrollD = 4000;
  2915. }},
  2916. pager: {
  2917. nextL: 'css;li.next > a',
  2918. pageE: 'css;.work-list > div',
  2919. replaceE: 'css;.pagerbar',
  2920. scrollD: 1500
  2921. }
  2922. }, // 普象网 - 作品集/搜索页
  2923. puxiang_collect: {
  2924. pager: {
  2925. nextL: 'css;li.next > a',
  2926. pageE: 'css;.collect-list > div',
  2927. replaceE: 'css;.pagerbar',
  2928. scrollD: 1500
  2929. }
  2930. }, // 普象网 - 收藏夹
  2931. xuexiniu: {
  2932. host: ['www.xuexiniu.com', 'bbs.xuexiniu.com'],
  2933. functionS: ()=> {
  2934. if (getCSS('body#nv_forum.pg_forumdisplay')) {
  2935. if (getCSS('ul.waterfall')) {
  2936. curSite = DBSite.xuexiniu_forum;
  2937. } else {
  2938. curSite = DBSite.discuz_guide
  2939. }
  2940. } else if (getCSS('body#nv_forum.pg_viewthread') && GM_getValue('menu_thread')) {
  2941. curSite = DBSite.xuexiniu_thread;
  2942. } else if (indexOF('/search.php')) {
  2943. curSite = DBSite.xuexiniu_search;
  2944. } else {
  2945. curSite = DBSite.xuexiniu;
  2946. }
  2947. },
  2948. pager: {
  2949. nextL: '//a[@class="page-link" and contains(text(), "下一页")]',
  2950. pageE: 'css;.row > .col-sm-6',
  2951. replaceE: 'css;ul.pagination',
  2952. scrollD: 1000
  2953. }
  2954. }, // 学犀牛 - 分类页
  2955. xuexiniu_forum: {
  2956. pager: {
  2957. nextL: 'css;a.nxt:not([href*="javascript"])',
  2958. pageE: 'css;.waterfall > li',
  2959. replaceE: 'css;.pg',
  2960. scrollD: 1500
  2961. }
  2962. }, // 学犀牛 - 各板块帖子列表
  2963. xuexiniu_thread: {
  2964. pager: {
  2965. nextL: 'css;a.nxt:not([href*="javascript"])',
  2966. pageE: 'css;#zhanzhuai_primary > .box',
  2967. replaceE: 'css;.pg',
  2968. scrollD: 1500
  2969. }
  2970. }, // 学犀牛 - 帖子内
  2971. xuexiniu_search: {
  2972. pager: {
  2973. nextL: 'css;a.nxt:not([href*="javascript"])',
  2974. pageE: 'css;.yangshi.yangshi2',
  2975. insertP: ['css;.page', 1],
  2976. replaceE: 'css;.page',
  2977. scrollD: 1500
  2978. }
  2979. }, // 学犀牛 - 搜索页
  2980. om: {
  2981. host: 'www.om.cn',
  2982. functionS: ()=> {if (location.pathname != '/') {curSite = DBSite.om;}},
  2983. pager: {
  2984. nextL: 'css;li.next > a',
  2985. pageE: 'css;.main_content > ul > li',
  2986. replaceE: 'css;ul.pagination',
  2987. scrollD: 1500
  2988. }
  2989. }, // 欧模网
  2990. xiadele: {
  2991. host: ['www.xiadele.com', 'search.xiadele.com'],
  2992. functionS: ()=> {if (location.pathname != '/') {curSite = DBSite.xiadele;}},
  2993. style: '.last-li-carousel-img {display: none !important;}',
  2994. pager: {
  2995. nextL: 'css;li.next_page a[rel="next"]',
  2996. pageE: 'css;ul.list-page-ul > li',
  2997. replaceE: 'css;ul.pagination',
  2998. scrollD: 2000
  2999. }
  3000. }, // 下得乐
  3001. Mixkit: {
  3002. host: 'mixkit.co',
  3003. functionS: ()=> {if (location.pathname != '/') {curSite = DBSite.Mixkit;}},
  3004. pager: {
  3005. nextL: 'css;a.pagination__link--next',
  3006. pageE: 'css;.item-grid-item',
  3007. replaceE: 'css;.pagination__wrapper',
  3008. scrollD: 2000
  3009. }
  3010. }, // Mixkit
  3011. _3dmgame: {
  3012. host: 'www.3dmgame.com',
  3013. functionS: ()=> {
  3014. if (getCSS('.Llist_b > div.lis')) {
  3015. curSite = DBSite._3dmgame_list;
  3016. } else if (getCSS('.newsleft > ul')) {
  3017. curSite = DBSite._3dmgame_list2;
  3018. } else if (indexOF('/resource')) {
  3019. curSite = DBSite._3dmgame_list3;
  3020. } else {
  3021. curSite = DBSite._3dmgame;
  3022. }},
  3023. pager: {
  3024. type: 3,
  3025. nextL: 'css;li.next > a',
  3026. pageE: 'css;script[src*="common.js"], .news_warp_center > *',
  3027. insertP: ['css;.news_warp_center', 3],
  3028. replaceE: 'css;.pagewrap',
  3029. scrollE: 'css;.pagewrap',
  3030. scriptT: 2,
  3031. interval: 500,
  3032. scrollD: 500
  3033. }
  3034. }, // 3DM
  3035. _3dmgame_list: {
  3036. pager: {
  3037. nextL: 'css;li.next > a',
  3038. pageE: 'css;.Llist_b > div.lis',
  3039. replaceE: 'css;.pagewrap',
  3040. scrollD: 1000
  3041. },
  3042. function: {
  3043. bF: src_bF,
  3044. bFp: [0, 'img[data-original]', 'data-original']
  3045. }
  3046. }, // 3DM - 分类页
  3047. _3dmgame_list2: {
  3048. pager: {
  3049. nextL: 'css;li.next > a',
  3050. pageE: 'css;.newsleft > ul > li',
  3051. replaceE: 'css;.pagewrap',
  3052. scrollD: 1000
  3053. },
  3054. function: {
  3055. bF: src_bF,
  3056. bFp: [0, 'img[data-original]', 'data-original']
  3057. }
  3058. }, // 3DM - 游戏专区 - 分类页
  3059. _3dmgame_list3: {
  3060. pager: {
  3061. nextL: 'css;li.next > a',
  3062. pageE: 'css;.item > ul',
  3063. insertP: ['css;.item > ul:last-child', 1],
  3064. replaceE: 'css;.pagewrap',
  3065. scrollD: 800
  3066. }
  3067. }, // 3DM - 游戏专区 - 资源页
  3068. _3dmgame_mod: {
  3069. host: 'mod.3dmgame.com',
  3070. pager: {
  3071. nextL: ()=> getNextEP('//li[@class="page-list active"]/following-sibling::li[contains(@class, "page-list")]/a', 'Page=', /Page=\d+/),
  3072. 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")]',
  3073. insertP: ['//div[contains(@class, "game-mod-wrap") or contains(@class, "search-mod ")]', 3],
  3074. scriptT: 2,
  3075. scrollD: 1200
  3076. }
  3077. }, // 3DM MOD站
  3078. ali213_www: {
  3079. host: 'www.ali213.net',
  3080. pager: {
  3081. type: 3,
  3082. nextL: 'css;#after_this_page',
  3083. pageE: 'css;#Content >*:not(.news_ding):not(.page_fenye)',
  3084. insertP: ['css;.page_fenye', 1],
  3085. replaceE: 'css;.page_fenye',
  3086. scrollE: 'css;.page_fenye',
  3087. interval: 500,
  3088. scrollD: 100
  3089. }
  3090. }, // 游侠网
  3091. ali213_list: {
  3092. host: 'down.ali213.net',
  3093. functionS: ()=> {if (getCSS('.famous-ul > .famous-li')) {curSite = DBSite.ali213_list;}},
  3094. pager: {
  3095. nextL: 'css;a.page-next',
  3096. pageE: 'css;.famous-ul > .famous-li',
  3097. replaceE: 'css;.page-container',
  3098. scrollD: 1000
  3099. },
  3100. function: {
  3101. bF: src_bF,
  3102. bFp: [0, 'img[data-original]', 'data-original']
  3103. }
  3104. }, // 游侠网 - 分类页
  3105. ali213_gl: {
  3106. host: 'gl.ali213.net',
  3107. style: '.n_show_b, a.morezjjump {display: none !important;}',
  3108. pager: {
  3109. type: 3,
  3110. nextL: 'css;a.next',
  3111. pageE: 'css;.c-detail > *',
  3112. insertP: ['css;.c-detail', 3],
  3113. replaceE: 'css;.page_fenye',
  3114. scrollE: 'css;.page_fenye',
  3115. interval: 500,
  3116. scrollD: 300
  3117. }
  3118. }, // 游侠网 - 攻略
  3119. ali213_pic: {
  3120. host: 'pic.ali213.net',
  3121. style: 'a.prev, a.next {display: none !important;}',
  3122. pager: {
  3123. nextL: 'css;a.next',
  3124. pageE: 'css;#image-show > img',
  3125. replaceE: 'css;#image-show > a',
  3126. scrollD: 1200
  3127. }
  3128. }, // 游侠网 - 图库
  3129. gamersky_ent: {
  3130. host: 'www.gamersky.com',
  3131. functionS: ()=> {if (indexOF('/ent/')) {
  3132. curSite = DBSite.gamersky_ent;
  3133. } else {
  3134. curSite = DBSite.gamersky_gl;
  3135. if (indexOF('/zl/') && indexOF('.shtml')) {curSite.pager.insertP = ['css;.pagecss', 1]; curSite.pager.scrollD = 400;}
  3136. }},
  3137. pager: {
  3138. type: 3,
  3139. nextL: '//div[@class="page_css"]/a[text()="下一页"]',
  3140. pageE: 'css;.Mid2L_con > *:not(.gs_nc_editor):not(.pagecss):not(.page_css):not(.gs_ccs_solve):not(.post_ding)',
  3141. insertP: ['css;.page_css', 1],
  3142. replaceE: 'css;.page_css',
  3143. scrollE: 'css;.page_css',
  3144. interval: 500,
  3145. scrollD: 100
  3146. }
  3147. }, // 游民星空
  3148. gamersky_gl: {
  3149. pager: {
  3150. type: 3,
  3151. nextL: '//div[@class="page_css"]/a[text()="下一页"]',
  3152. pageE: 'css;.Mid2L_con > *:not(.gs_nc_editor):not(.pagecss):not(.gs_ccs_solve):not(.post_ding)',
  3153. insertP: ['css;.gs_nc_editor', 1],
  3154. replaceE: 'css;.page_css',
  3155. scrollE: 'css;.page_css',
  3156. forceHTTPS: true,
  3157. interval: 500,
  3158. scrollD: 100
  3159. },
  3160. function: {
  3161. bF: pageElems => { // 插入前函数(移除下一页底部的 "更多相关内容请关注:xxx" 文字 + 加载图片)
  3162. pageElems.forEach(function (one) {if (one.tagName === 'P' && one.textContent.indexOf('更多相关内容请关注') > -1) {one.style.display = 'none';}});
  3163. return src_bF(pageElems, [0, 'img[data-src]', 'data-src'])
  3164. }
  3165. }
  3166. }, // 游民星空 - 攻略
  3167. nexusmods: {
  3168. host: 'www.nexusmods.com',
  3169. functionS: ()=> {locationC = true; if (!(lp == '/' || indexOF(/\/mods\/\d+/))) {curSite = DBSite.nexusmods;}},
  3170. history: false,
  3171. pager: {
  3172. nextL: nexusmods_nextL,
  3173. pageE: 'css;ul.tiles > li',
  3174. replaceE: 'css;.pagination',
  3175. scrollD: 4000
  3176. },
  3177. function: {
  3178. bF: nexusmods_bF
  3179. }
  3180. }, // NexusMods
  3181. curseforge: {
  3182. host: 'www.curseforge.com',
  3183. pager: {
  3184. nextL: 'css;.pagination-next > a',
  3185. pageE: 'css;div.my-2',
  3186. replaceE: 'css;.pagination',
  3187. scrollD: 2500
  3188. }
  3189. }, // CurseForge
  3190. steamcommunity_workshop: {
  3191. host: 'steamcommunity.com',
  3192. functionS: ()=> {if (indexOF('/workshop/browse')) {curSite = DBSite.steamcommunity_workshop;} else if (indexOF(/eventcomments\/\d/)) {curSite = DBSite.steamcommunity_eventcomments;}},
  3193. pager: {
  3194. nextL: '//a[@class="pagebtn" and text()=">"]',
  3195. pageE: 'css;.workshopBrowseItems > *',
  3196. replaceE: 'css;.workshopBrowsePaging',
  3197. scriptT: 2,
  3198. scrollD: 1500
  3199. }
  3200. }, // Steam 创意工坊 - 项目列表
  3201. steamcommunity_eventcomments: {
  3202. style: '.forum_paging_controls {display: none !important;}',
  3203. pager: {
  3204. nextL: ()=> getNextUP('ctp=', /ctp=\d+/, location.pathname, '2', getCSS('span.commentthread_pagelinks > a:last-child').textContent),
  3205. pageE: 'css;.commentthread_comments > .commentthread_comment',
  3206. replaceE: 'css;.forum_paging .forum_paging_summary',
  3207. scriptT: 1,
  3208. scrollD: 1500
  3209. }
  3210. }, // Steam 社区 - 活动评论
  3211. yikm: {
  3212. host: 'www.yikm.net',
  3213. pager: {
  3214. nextL: '//ul[@class="pager"]//a[text()="下一页"]',
  3215. pageE: '//h2[contains(text(), "所有游戏") or contains(text(), "搜索结果")]/following-sibling::div[1]/div',
  3216. replaceE: 'css;ul.pager',
  3217. scrollD: 1500
  3218. }
  3219. }, // 小霸王其乐无穷
  3220. switch520: {
  3221. host: 'switch520.com',
  3222. functionS: ()=> {if (!indexOF('.html')) {curSite = DBSite.switch520;}},
  3223. pager: {
  3224. nextL: 'css;a.next',
  3225. pageE: 'css;.row.posts-wrapper > div',
  3226. replaceE: 'css;ul.page-numbers',
  3227. scrollD: 1000
  3228. }
  3229. }, // Switch520
  3230. cs_rin_ru: {
  3231. host: 'cs.rin.ru',
  3232. functionS: ()=> {if (lp == '/forum/viewforum.php') {
  3233. curSite = DBSite.cs_rin_ru;
  3234. } else if (lp == '/forum/search.php') {
  3235. curSite = DBSite.cs_rin_ru_search;
  3236. if (indexOF('sr=posts', 's')) curSite.pager.pageE = 'css;#wrapcentre > form > table.tablebg > tbody > tr[class^="row"]'
  3237. } else if (lp == '/forum/viewtopic.php' && GM_getValue('menu_thread')) {
  3238. curSite = DBSite.cs_rin_ru_list;
  3239. }},
  3240. pager: {
  3241. nextL: '//td[@class="gensmall"][@align="right"]//a[text()="Next"]',
  3242. pageE: 'css;#pagecontent > table.tablebg > tbody > tr:not([align])',
  3243. replaceE: 'css;#pagecontent > table:first-child',
  3244. scrollD: 1500
  3245. },
  3246. function: {
  3247. bF: pageElems => { // 插入前函数(过滤置顶帖子)
  3248. for (let i = 0; i < pageElems.length; i++) {if (pageElems[i].textContent.replace(/\n| /g,'') === 'Topics') {pageElems.splice(0,i+1); break;}}
  3249. return pageElems
  3250. }
  3251. }
  3252. }, // cs.rin.ru - 各版块帖子列表
  3253. cs_rin_ru_list: {
  3254. pager: {
  3255. nextL: 'id("pageheader")/p[@class="gensmall"]//a[text()="Next"]',
  3256. pageE: 'css;#pagecontent > table.tablebg:not(:nth-last-child(2)):not(:nth-child(2))',
  3257. replaceE: 'css;#pagecontent >table:not(.tablebg), #pageheader p.gensmall',
  3258. scrollD: 2000
  3259. }
  3260. }, // cs.rin.ru - 帖子内
  3261. cs_rin_ru_search: {
  3262. pager: {
  3263. nextL: 'id("wrapcentre")/div[@class="nav"]//a[text()="Next"]',
  3264. pageE: 'css;#wrapcentre > form > table.tablebg > tbody > tr[valign]',
  3265. replaceE: 'css;#wrapcentre > div',
  3266. scrollD: 1500
  3267. }
  3268. }, // cs.rin.ru - 搜索页
  3269. crackhub: {
  3270. host: 'crackhub.site',
  3271. style: 'html.wp-dark-mode-active .inside-article {background-color: var(--wp-dark-mode-bg);}',
  3272. pager: {
  3273. nextL: 'css;a.next.page-numbers',
  3274. pageE: 'css;article[id^="post-"]',
  3275. replaceE: 'css;nav.paging-navigation',
  3276. scrollD: 2000
  3277. }
  3278. }, // Crackhub213
  3279. fitgirl: {
  3280. host: 'fitgirl-repacks.site',
  3281. pager: {
  3282. nextL: 'css;a.next.page-numbers',
  3283. pageE: 'css;article[id^="post-"]',
  3284. replaceE: 'css;nav.paging-navigation',
  3285. scrollD: 2500
  3286. }
  3287. }, // FitGirl Repacks
  3288. bilibili_search: {
  3289. host: 'search.bilibili.com',
  3290. functionS: ()=> {
  3291. locationC = true;
  3292. if (lp == '/all' || lp == '/video') {
  3293. curSite = DBSite.bilibili_search;
  3294. } else if (lp == '/article') {
  3295. curSite = DBSite.bilibili_search_article;
  3296. }
  3297. },
  3298. retry: 100,
  3299. pager: {
  3300. nextL: bilibili_search_nextL,
  3301. pageE: '//ul[contains(@class, "video-list")]/li | //script[contains(text(), "window.__INITIAL_STATE__")]',
  3302. insertP: ['css;ul.video-list', 3],
  3303. replaceE: 'css;ul.pages',
  3304. scriptT: 2,
  3305. scrollD: 1000
  3306. },
  3307. function: {
  3308. bF: bilibili_search_bF,
  3309. aF: bilibili_search_aF
  3310. }
  3311. }, // B 站(Bilibili) - 搜索页 - 视频
  3312. bilibili_search_article: {
  3313. retry: 100,
  3314. pager: {
  3315. nextL: bilibili_search_nextL,
  3316. pageE: 'css;li.article-item',
  3317. replaceE: 'css;ul.pages',
  3318. //scriptT: 2,
  3319. scrollD: 1000
  3320. }
  3321. }, // B 站(Bilibili) - 搜索页 - 专栏
  3322. cupfox: {
  3323. host: 'www.cupfox.com',
  3324. pager: {
  3325. type: 2,
  3326. nextL: 'css;.load-more',
  3327. nextText: '点击加载更多',
  3328. scrollD: 700
  3329. }
  3330. }, // 茶杯狐
  3331. novipnoad: {
  3332. host: 'www.novipnoad.com',
  3333. functionS: ()=> {if (location.pathname != '/' && !indexOF('.html')) {curSite = DBSite.novipnoad;}},
  3334. pager: {
  3335. nextL: 'css;a.nextpostslink',
  3336. pageE: 'css;.video-listing-content .row > div',
  3337. replaceE: 'css;.wp-pagenavi',
  3338. scrollD: 1500
  3339. },
  3340. function: {
  3341. bF: src_bF,
  3342. bFp: [0, 'img[data-original]', 'data-original']
  3343. }
  3344. }, // NO视频
  3345. ddrk: {
  3346. host: ['ddrk.me', 'ddys.tv'],
  3347. functionS: ()=> {if (lp == '/' || indexOF(/\/(category|tag)\//)) {curSite = DBSite.ddrk;}},
  3348. pager: {
  3349. nextL: 'css;a.next',
  3350. pageE: 'css;.post-box-list > article',
  3351. replaceE: 'css;.pagination_wrap',
  3352. scrollD: 1500
  3353. }
  3354. }, // 低端影视
  3355. nfmovies: {
  3356. host: 'www.nfmovies.com',
  3357. functionS: ()=> {if (lp == '/search.php' || indexOF('/list/')) {curSite = DBSite.nfmovies;}},
  3358. pager: {
  3359. nextL: '//ul[contains(@class, "myui-page")]/li/a[text()="下一页"]',
  3360. pageE: 'css;ul.myui-vodlist > li',
  3361. replaceE: 'css;ul.myui-page',
  3362. scrollD: 1500
  3363. },
  3364. function: {
  3365. bF: src_bF,
  3366. bFp: [1, 'a[data-original]', 'data-original']
  3367. }
  3368. }, // 奈菲影视
  3369. zxzj: {
  3370. host: ['www.zxzj.me', 'www.zxzj.fun'],
  3371. functionS: ()=> {if (location.pathname != '/' && !indexOF('/detail/') && !indexOF('/video/')) {curSite = DBSite.zxzj;}},
  3372. style: 'div.stui-page__all {display: none !important;}',
  3373. pager: {
  3374. nextL: '//ul[contains(@class, "stui-page__item")]//a[text()="下一页"]',
  3375. pageE: 'css;ul.stui-vodlist > li',
  3376. replaceE: 'css;ul.stui-page__item',
  3377. scrollD: 1000
  3378. },
  3379. function: {
  3380. bF: src_bF,
  3381. bFp: [1, 'a[data-original]', 'data-original']
  3382. }
  3383. }, // 在线之家
  3384. enlienli: {
  3385. host: 'enlienli.com',
  3386. functionS: ()=> {if (indexOF('/show/') || indexOF('/search')) {curSite = DBSite.enlienli;}},
  3387. pager: {
  3388. nextL: 'css;a.page-number.page-next',
  3389. pageE: 'css;.module-items > *',
  3390. replaceE: 'css;#page',
  3391. scrollD: 1000
  3392. },
  3393. function: {
  3394. bF: src_bF,
  3395. bFp: [0, 'img[data-src]', 'data-src']
  3396. }
  3397. }, // 嗯哩嗯哩
  3398. mjw91: {
  3399. host: 'mjw91.com',
  3400. functionS: ()=> {if (!indexOF('/video/') || !indexOF('/vplay/')) {curSite = DBSite.mjw91;}},
  3401. pager: {
  3402. nextL: 'css;.next-page > a',
  3403. pageE: 'css;.m-movies > article',
  3404. replaceE: 'css;.pagination',
  3405. scrollD: 1500
  3406. },
  3407. function: {
  3408. bF: src_bF,
  3409. bFp: [0, 'img[data-original]', 'data-original']
  3410. }
  3411. }, // 91 美剧网
  3412. zhenbuka: {
  3413. host: ['www.zhenbuka3.com', 'www.zhenbuka5.com'],
  3414. functionS: ()=> {if (indexOF('/vodtype/')) {curSite = DBSite.zhenbuka;}},
  3415. pager: {
  3416. nextL: '//ul[contains(@class, "stui-page")]/li/a[text()="下一页"]',
  3417. pageE: 'css;ul.stui-vodlist > li',
  3418. replaceE: 'css;ul.stui-page',
  3419. scrollD: 1500
  3420. },
  3421. function: {
  3422. bF: src_bF,
  3423. bFp: [1, 'a[data-original]', 'data-original']
  3424. }
  3425. }, // 真不卡影院
  3426. zzzfun: {
  3427. host: 'www.zzzfun.com',
  3428. functionS: ()=> {
  3429. if (indexOF('/vod_type') || indexOF('/vod_show')) {
  3430. curSite = DBSite.zzzfun;
  3431. } else if (indexOF('/vod_search')) {
  3432. curSite = DBSite.zzzfun_search;
  3433. }},
  3434. pager: {
  3435. nextL: 'css;#page a[title="下一页"]',
  3436. pageE: 'css;ul.search-result > a',
  3437. replaceE: 'css;#page',
  3438. scrollD: 1000
  3439. },
  3440. function: {
  3441. bF: src_bF,
  3442. bFp: [0, 'img[data-original]', 'data-original']
  3443. }
  3444. }, // ZzzFun 动漫
  3445. zzzfun_search: {
  3446. pager: {
  3447. nextL: 'css;#page a[title="下一页"]',
  3448. pageE: 'css;ul.show-list > li',
  3449. replaceE: 'css;#page',
  3450. scrollD: 1000
  3451. },
  3452. function: {
  3453. bF: src_bF,
  3454. bFp: [0, 'img[data-original]', 'data-original']
  3455. }
  3456. }, // ZzzFun 动漫 - 搜索页
  3457. tucao: {
  3458. host: 'www.tucao.one',
  3459. functionS: ()=> {if (indexOF('/list/')) {
  3460. curSite = DBSite.tucao;
  3461. } else if (indexOF('search', 's')) {
  3462. curSite = DBSite.tucao_search;
  3463. }},
  3464. pager: {
  3465. nextL: 'css;.pagego a',
  3466. pageE: 'css;.list > ul > li',
  3467. replaceE: 'css;.newpages, .pagego, #float_show',
  3468. scrollD: 1000
  3469. }
  3470. }, // 吐槽弹幕网
  3471. tucao_search: {
  3472. pager: {
  3473. nextL: '//a[@class="a1"][contains(text(), "下一页")]',
  3474. pageE: 'css;.search_list > *',
  3475. replaceE: 'css;.pages',
  3476. scrollD: 1000
  3477. }
  3478. }, // 吐槽弹幕网 - 搜索页
  3479. mandao: {
  3480. host: 'www.mandao.tv',
  3481. functionS: ()=> {if (location.pathname != '/' && !indexOF('/man')) {
  3482. curSite = DBSite.mandao;
  3483. }},
  3484. pager: {
  3485. nextL: '//div[contains(@class, "page")]/a[text()=">"]',
  3486. pageE: 'css;.index-tj > ul > li',
  3487. replaceE: 'css;.page',
  3488. scrollD: 1000
  3489. },
  3490. function: {
  3491. bF: src_bF,
  3492. bFp: [0, 'img[data-original]', 'data-original']
  3493. }
  3494. }, // 漫岛动漫
  3495. yxdm: {
  3496. host: 'www.yxdm.li',
  3497. functionS: ()=> {if (indexOF('/search') || indexOF('/category') || indexOF('/resource')) {curSite = DBSite.yxdm;}},
  3498. pager: {
  3499. nextL: '//a[@class="nextPage" or text()="下一页"]',
  3500. pageE: 'css;.dhnew > ul > li',
  3501. replaceE: 'css;.pagelist',
  3502. scrollD: 2000
  3503. }
  3504. }, // 怡萱动漫
  3505. nicotv: {
  3506. host: 'www.nicotv.me',
  3507. functionS: ()=> {if (indexOF('/search') || indexOF('/type')) {curSite = DBSite.nicotv;}},
  3508. pager: {
  3509. nextL: '//ul[contains(@class, "pagination ")]//a[text()="»"]',
  3510. pageE: 'css;ul.list-unstyled > li',
  3511. replaceE: 'css;ul.pagination ',
  3512. scrollD: 1000
  3513. },
  3514. function: {
  3515. bF: src_bF,
  3516. bFp: [0, 'img[data-original]', 'data-original']
  3517. }
  3518. }, // 妮可动漫
  3519. yhdm: {
  3520. host: ['www.imomoe.la', 'www.imomoe.live'],
  3521. functionS: ()=> {if (indexOF('/list/')) {
  3522. curSite = DBSite.yhdm;
  3523. } else if (lp == '/so.asp' || lp == '/search.asp') {
  3524. curSite = DBSite.yhdm_;
  3525. }},
  3526. pager: {
  3527. nextL: '//div[@class="pages"]/a[text()="下一页"]',
  3528. pageE: 'css;#contrainer > .img> ul > li',
  3529. replaceE: 'css;.pages',
  3530. scrollD: 1000
  3531. }
  3532. }, // 樱花动漫
  3533. yhdm_: {
  3534. pager: {
  3535. nextL: '//div[@class="pages"]/a[text()="下一页"]',
  3536. pageE: 'css;#contrainer .fire .pics > ul > li',
  3537. replaceE: 'css;.pages',
  3538. scrollD: 1000
  3539. }
  3540. }, // 樱花动漫 - 搜索页等
  3541. agefans: {
  3542. host: ['www.agemys.com', 'www.age.tv'],
  3543. functionS: ()=> {if (indexOF('/catalog/') || lp == '/search') {
  3544. curSite = DBSite.agefans;
  3545. } else if (lp == '/recommend' || lp == '/update') {
  3546. curSite = DBSite.agefans_;
  3547. } else if (lp == '/rank') {
  3548. curSite = DBSite.agefans_rank;
  3549. }},
  3550. pager: {
  3551. nextL: 'id("container")//div[@class="blockcontent"]/div[@style][not(@class)]/li/a[contains(text(), "下一页")]',
  3552. pageE: 'css;#container .blockcontent1 > div',
  3553. replaceE: 'css;#container .blockcontent > div[style]:not([class])',
  3554. scrollD: 1000
  3555. }
  3556. }, // AGE 动漫 - 全部/搜索
  3557. agefans_: {
  3558. pager: {
  3559. nextL: 'id("container")//div[@class="blockcontent"]/div[@style][not(@class)]/li/a[contains(text(), "下一页")]',
  3560. pageE: 'css;#container .blockcontent > ul > li',
  3561. replaceE: 'css;#container .blockcontent > div[style]:not([class])',
  3562. scrollD: 1000
  3563. }
  3564. }, // AGE 动漫 - 其他页
  3565. agefans_rank: {
  3566. pager: {
  3567. nextL: 'id("container")/ul[@style][not(@class)]/li/a[contains(text(), "下一页")]',
  3568. pageE: 'css;#container > .div_right .blockcontent.div_right_r_3 > ul',
  3569. replaceE: 'css;#container > ul[style]:not([class])',
  3570. scrollD: 1000
  3571. }
  3572. }, // AGE 动漫 - 排行榜
  3573. dm233: {
  3574. host: 'www.dm233.cc',
  3575. functionS: ()=> {if (indexOF('/catalog/') || lp == '/recommend/' || lp == '/search') {
  3576. curSite = DBSite.dm233;
  3577. } else if (lp == '/article/') {
  3578. curSite = DBSite.dm233_article;
  3579. } else if (lp == '/rank/') {
  3580. curSite = DBSite.dm233_rank;
  3581. }},
  3582. pager: {
  3583. nextL: '//div[@class="pagelist"]//a[contains(text(), "下一页") or contains(text(), "下一頁")]',
  3584. pageE: 'css;.dhnew ul > li',
  3585. replaceE: 'css;.pagelist',
  3586. scrollD: 1000
  3587. }
  3588. }, // 233 动漫
  3589. dm233_article: {
  3590. pager: {
  3591. nextL: '//div[@class="pagelist"]//a[contains(text(), "下一页") or contains(text(), "下一頁")]',
  3592. pageE: 'css;.xgyd ul > li',
  3593. replaceE: 'css;.pagelist',
  3594. scrollD: 1000
  3595. }
  3596. }, // 233 动漫 - 动漫情报/资讯
  3597. dm233_rank: {
  3598. pager: {
  3599. nextL: '//div[@class="pagelist"]//a[contains(text(), "下一页") or contains(text(), "下一頁")]',
  3600. pageE: 'css;.side-update.normal-wai > .normal-nei',
  3601. replaceE: 'css;.pagelist',
  3602. scrollD: 1000
  3603. }
  3604. }, // 233 动漫 - 排行榜
  3605. anime1: {
  3606. host: 'anime1.me',
  3607. functionS: ()=> {if (indexOF('s=', 's')) {curSite = DBSite.wp_nav_navigation;} else if (lp == '/') {curSite = DBSite.anime1;}},
  3608. history: false,
  3609. pager: {
  3610. type: 4,
  3611. nextL: ()=> { // 获取下一页内容(叠加)
  3612. let next = getCSS('a.paginate_button.next');
  3613. if (next && next.className.indexOf('disabled') === -1) {
  3614. let oldList = getCSS('#table-list > tbody').innerHTML;
  3615. if (oldList) {next.click(); pageNum.now = pageNum._now + 1; getCSS('#table-list > tbody').insertAdjacentHTML('afterbegin', oldList);}
  3616. }
  3617. },
  3618. interval: 500,
  3619. scrollD: 800
  3620. }
  3621. }, // Anime1
  3622. yinfans: {
  3623. host: /www\.yinfans\./,
  3624. style: '#post_container {height: auto !important;} #post_container > li {position: static !important; float: left !important; height: 620px !important;}',
  3625. pager: {
  3626. nextL: 'css;a.next',
  3627. pageE: 'css;#post_container > li',
  3628. replaceE: 'css;.pagination',
  3629. scrollD: 1500
  3630. }
  3631. }, // 音范丝
  3632. btbtt: {
  3633. host: /btbtt/,
  3634. pager: {
  3635. nextL: '//div[@class="page"]/a[contains(text(), "▶") or contains(text(), "下一页")]',
  3636. pageE: 'css;#threadlist > *',
  3637. replaceE: 'css;.page',
  3638. scrollD: 2000
  3639. }
  3640. }, // BT 之家
  3641. bdys: {
  3642. host: 'www.bd2020.com',
  3643. functionS: ()=> {if (location.pathname != '/' && !indexOF(/\/\d+\.htm/)) {curSite = DBSite.bdys;}},
  3644. pager: {
  3645. type: 2,
  3646. nextL: 'css;div.layui-flow-more > a',
  3647. nextText: '加载更多',
  3648. scrollD: 1000
  3649. }
  3650. }, // BD 影视
  3651. gaoqing_fm: {
  3652. host: 'gaoqing.fm',
  3653. pager: {
  3654. type: 2,
  3655. nextL: 'css;.col-md-12 > a, #loadmore > a',
  3656. interval: 1500,
  3657. scrollD: 1000
  3658. }
  3659. }, // 高清电台
  3660. yyds: {
  3661. host: 'yyds.fans',
  3662. functionS: ()=> {if (location.search != '' && !indexOF('p=', 's')) {curSite = DBSite.yyds;}},
  3663. pager: {
  3664. nextL: 'css;a.next.page-numbers',
  3665. pageE: 'css;.list-grouped > div',
  3666. replaceE: 'css;nav.pagination',
  3667. scrollD: 1100
  3668. }
  3669. }, // YYDS 电影
  3670. kisssub: {
  3671. host: ['www.kisssub.org','www.comicat.org', /(share|www)\.acgnx\./],
  3672. pager: {
  3673. nextL: 'css;a.nextprev:last-of-type',
  3674. pageE: 'css;#data_list > tr',
  3675. replaceE: 'css;.pages',
  3676. scrollD: 2500
  3677. }
  3678. }, // 爱恋动漫 / 漫猫动漫 / 末日动漫
  3679. dmhy: {
  3680. host: ['share.dmhy.org', 'dmhy.anoneko.com'],
  3681. pager: {
  3682. nextL: '//div[@class="nav_title"]/a[contains(text(), "下一")]',
  3683. pageE: 'css;#topic_list > tbody > tr',
  3684. replaceE: 'css;.nav_title',
  3685. scrollD: 1500
  3686. },
  3687. function: {
  3688. 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');`;}
  3689. }
  3690. }, // 动漫花园
  3691. futaacg: {
  3692. host: /futaacg\./,
  3693. pager: {
  3694. nextL: 'css;ul.pagination a[rel="next"]',
  3695. pageE: 'css;.topic-list > div',
  3696. replaceE: 'css;ul.pagination',
  3697. scrollD: 1500
  3698. }
  3699. }, // 扶她动漫
  3700. acg_rip: {
  3701. host: 'acg.rip',
  3702. pager: {
  3703. nextL: 'css;li.next>a',
  3704. pageE: 'css;table.post-index > tbody > tr',
  3705. replaceE: 'css;ul.pagination',
  3706. scrollD: 1500
  3707. }
  3708. }, // ACG.RIP
  3709. bangumi: {
  3710. host: 'bangumi.moe',
  3711. functionS: ()=> {if (indexOF('/lite')) {curSite = DBSite.bangumi_lite;} else {curSite = DBSite.bangumi;}},
  3712. pager: {
  3713. type: 2,
  3714. nextL: 'css;[torrent-list="lattorrents"] button[ng-click="loadMore()"] ,[torrent-list="torrents"] button[ng-click="loadMore()"]',
  3715. interval: 1000,
  3716. scrollD: 1500
  3717. }
  3718. }, // 萌番组
  3719. bangumi_lite: {
  3720. pager: {
  3721. nextL: '//section/a[./span[contains(@class, "next")]]',
  3722. pageE: 'css;li.torrent-li',
  3723. replaceE: 'css;.page-btn-section',
  3724. scrollD: 2000
  3725. }
  3726. }, // 萌番组 lite
  3727. miobt: {
  3728. host: ['miobt.com', 'www.36dm.club'],
  3729. functionS: ()=> {curSite = DBSite.miobt; if (location.hostname === 'www.36dm.club') {curSite.pager.scrollD = 1000;}},
  3730. pager: {
  3731. nextL: '//a[@class="nextprev"][contains(text(), "〉") or contains(text(), "下一页") or contains(text(), "»")]',
  3732. pageE: 'css;#data_list > tr',
  3733. replaceE: 'css;.pages',
  3734. scrollD: 2000
  3735. }
  3736. }, // MioBT + 简单动漫
  3737. reimu: {
  3738. host: /\.reimu\./,
  3739. functionS: ()=> {if (lp == '/' || indexOF('/category') || indexOF('/tag')) curSite = DBSite.reimu},
  3740. pager: {
  3741. nextL: 'css;span.current+a.sfwppa-current-page',
  3742. pageE: 'css;article[id^="post-"]',
  3743. replaceE: 'css;.wp-pagenavi',
  3744. scrollD: 1500
  3745. }
  3746. }, // REIMU
  3747. hacg: {
  3748. host: /\.hacg\./,
  3749. functionS: ()=> {if (indexOF('/wp/') && !indexOF(/\d+\.html/)) curSite = DBSite.hacg},
  3750. pager: {
  3751. nextL: 'css;a.nextpostslink',
  3752. pageE: 'css;article[id^="post-"]',
  3753. replaceE: 'css;.wp-pagenavi',
  3754. scrollD: 1500
  3755. }
  3756. }, // HACG
  3757. nyaa: {
  3758. host: /nyaa\.si/,
  3759. pager: {
  3760. nextL: 'css;a[rel="next"], li.next > a',
  3761. pageE: 'css;table.torrent-list > tbody > tr',
  3762. replaceE: 'css;ul.pagination',
  3763. scrollD: 2000
  3764. }
  3765. }, // Nyaa
  3766. skrbt: {
  3767. host: /skrbt/,
  3768. functionS: ()=> {if (lp == '/search') curSite = DBSite.skrbt;},
  3769. pager: {
  3770. nextL: ()=> { // 获取下一页地址
  3771. let page = getCSS('a[onclick][aria-label="Next"]');
  3772. if (page) {page = /(?<=\()\d+(?=\))/.exec(page.onclick)[0];} else {return '';} // 获取下一页页码
  3773. if (page) return getNextF('css;#search-form').replace(/p=\d+/,'p=' + page)
  3774. return '';
  3775. },
  3776. pageE: 'css;div[class="row"] > .col-md-6 > ul',
  3777. insertP: ['css;nav[aria-label*="Page"]', 1],
  3778. replaceE: 'css;ul.pagination',
  3779. scrollD: 900
  3780. }
  3781. }, // SkrBT
  3782. _1337x: {
  3783. host: /1337x\./,
  3784. functionS: ()=> {if (indexOF('search/')) {curSite = DBSite._1337x;}},
  3785. pager: {
  3786. nextL: '//div[@class="pagination"]//a[text()=">>"]',
  3787. pageE: 'css;table.table-list > tbody > tr',
  3788. replaceE: 'css;.pagination',
  3789. scrollD: 1200
  3790. }
  3791. }, // 1337x
  3792. rarbg: {
  3793. host: /rarbg/,
  3794. functionS: ()=> {if (lp == '/torrents.php') {curSite = DBSite.rarbg; curSite.function.bF(getAllCSS('table.lista2t tr.lista2'));}},
  3795. style: 'html::-webkit-scrollbar {height: 0 !important;}',
  3796. pager: {
  3797. nextL: 'css;#pager_links > a[title="next page"]',
  3798. pageE: 'css;table.lista2t tr.lista2',
  3799. replaceE: 'css;#pager_links',
  3800. scrollD: 1200
  3801. },
  3802. function: {
  3803. bF: pageElems => { // 插入前函数(鼠标指向显示封面)
  3804. pageElems.forEach(function (one) {
  3805. one.querySelectorAll('td > a[onmouseover][onmouseout]').forEach(function (now) {
  3806. now.parentElement.parentElement.setAttribute('onmouseover', now.getAttribute('onmouseover')); now.removeAttribute('onmouseover');
  3807. now.parentElement.parentElement.setAttribute('onmouseout', now.getAttribute('onmouseout')); now.removeAttribute('onmouseout');
  3808. });
  3809. });
  3810. return pageElems
  3811. }
  3812. }
  3813. }, // RARBG
  3814. /*thepiratebay: {
  3815. host: 'thepiratebay.org',
  3816. functionS: ()=> {if (lp == '/search.php') {curSite = DBSite.thepiratebay;}},
  3817. pager: {
  3818. type: 6,
  3819. nextL: 'css;center > b+a[href]',
  3820. pageE: 'css;ol#torrents > li[id]',
  3821. replaceE: 'css;center',
  3822. loadTime: 1000,
  3823. scrollD: 1500
  3824. }
  3825. },*/ // thepiratebay
  3826. subdh: {
  3827. host: 'subdh.com',
  3828. functionS: ()=> {if (lp == '/' || indexOF('/list/new')) {curSite = DBSite.subdh;} else if (indexOF('/search')) {curSite = DBSite.subdh_search;}},
  3829. pager: {
  3830. nextL: '//a[@class="page-link"][contains(text(), "下一页")]',
  3831. pageE: 'css;.col-lg-9 .bg-white.shadow-sm.rounded-3 > .row.gx-0',
  3832. replaceE: 'css;ul.pagination',
  3833. scrollD: 1000
  3834. }
  3835. }, // SubDH
  3836. subdh_search: {
  3837. pager: {
  3838. nextL: '//a[@class="page-link"][contains(text(), "下一页")]',
  3839. pageE: 'css;.col-lg-9 .bg-white.shadow-sm.rounded-3',
  3840. insertP: ['css;nav[aria-label="pagination"]', 1],
  3841. replaceE: 'css;ul.pagination',
  3842. scrollD: 1000
  3843. }
  3844. }, // SubDH - 搜索页
  3845. mini4k: {
  3846. host: 'www.mini4k.com',
  3847. functionS: ()=> {if (location.pathname != '/' && !indexOF(/\/\d{3,}/)) {curSite = DBSite.mini4k;};},
  3848. pager: {
  3849. nextL: 'css;a.pager__item--next',
  3850. pageE: 'css;div[class*="-item-list"] > ul > li',
  3851. replaceE: 'css;.pagination',
  3852. scrollD: 2000
  3853. }
  3854. }, // MINI4K
  3855. bthaha: {
  3856. host: /bthaha/,
  3857. functionS: ()=> {if (indexOF('/search/')) {
  3858. curSite = DBSite.bthaha;
  3859. getAllCSS('[id^="list_top"], [id^="list_bottom"]').forEach(function (one) {one.parentElement.parentElement.hidden = true;});
  3860. }},
  3861. style: '[id^="list_top"], [id^="list_bottom"] {display: none !important;}',
  3862. pager: {
  3863. nextL: '//ul[@class="pagination"]/li/a[contains(text(), "下一页")]',
  3864. pageE: 'css;table.table > tbody > tr',
  3865. replaceE: 'css;ul.pagination',
  3866. scrollD: 1000
  3867. },
  3868. function: {
  3869. bF: pageElems => { // 插入前函数(隐藏底部元素)
  3870. pageElems.forEach(function (one) {let now = one.querySelector('[id^="list_top"], [id^="list_bottom"]'); if (now) {one.hidden = true;};});
  3871. return pageElems
  3872. }
  3873. }
  3874. }, // BTHaha
  3875. a4k: {
  3876. host: 'www.a4k.net',
  3877. functionS: ()=> {if (!indexOF('/subtitle/')) {curSite = DBSite.a4k;};},
  3878. pager: {
  3879. nextL: 'css;a.pager__item--next',
  3880. pageE: 'css;ul.list > li',
  3881. replaceE: 'css;.pagination',
  3882. scrollD: 1000
  3883. }
  3884. }, // A4k 字幕网(字幕)
  3885. assrt: {
  3886. host: 'assrt.net',
  3887. functionS: ()=> {if (location.pathname === '/sub/') {curSite = DBSite.assrt;} else if (indexOF('/list/')) {curSite = DBSite.assrt_list;}},
  3888. pager: {
  3889. nextL: ()=> getNextEP('css;#pl-current+a[href]:not([id])', 'page=', /page=\d+/),
  3890. pageE: 'css;.resultcard > div:not(#top-banner):not(#bottom-banner):not(.pagelinkcard)',
  3891. insertP: ['css;.pagelinkcard', 1],
  3892. replaceE: 'css;.pagelinkcard',
  3893. scrollD: 1000
  3894. }
  3895. }, // 射手网(字幕)
  3896. assrt_list: {
  3897. pager: {
  3898. nextL: '//a[@id="pl-nav" and text()=">"]',
  3899. pageE: 'css;#resultsdiv > .subitem:not([id])',
  3900. replaceE: 'css;.pagelinkcard',
  3901. scrollD: 1000
  3902. }
  3903. }, // 射手网(字幕)
  3904. subhd: {
  3905. host: 'subhd.tv',
  3906. functionS: ()=> {if (lp == '/forum/forum') {
  3907. curSite = DBSite.subhd_forum;
  3908. } else if (location.pathname != '/' && location.pathname != '/zu' && !indexOF('/a/') && !indexOF('/d/') && !indexOF('/forum/')) {
  3909. curSite = DBSite.subhd;
  3910. }},
  3911. pager: {
  3912. nextL: '//a[@class="page-link"][contains(text(), "下一页")]',
  3913. pageE: 'css;.bg-white.shadow-sm.rounded-3',
  3914. insertP: ['css;nav.clearfix', 1],
  3915. replaceE: 'css;nav.clearfix',
  3916. scrollD: 1000
  3917. }
  3918. }, // SubHD(字幕)
  3919. subhd_forum: {
  3920. pager: {
  3921. nextL: '//a[@class="page-link"][contains(text(), "下一页")]',
  3922. pageE: 'css;.bg-white.shadow-sm.rounded-3 > div',
  3923. replaceE: 'css;nav.clearfix',
  3924. scrollD: 800
  3925. }
  3926. }, // SubHD - forum(字幕)
  3927. manben: {
  3928. host: 'www.manben.com',
  3929. functionS: ()=> {if (indexOF(/\/m\d+/)) {
  3930. if (getCookie('showtype') != '2') {
  3931. document.cookie='showtype=2; expires=Thu, 18 Dec 2031 12:00:00 GMT; path=/'; // 写入 Cookie 开启 [垂直阅读] 模式
  3932. location.reload(); // 刷新网页
  3933. }
  3934. curSite = DBSite.mhxqiu;
  3935. }}
  3936. }, // 漫本
  3937. haoman: {
  3938. host: ['www.haoman6.com', 'www.g-lens.com'],
  3939. functionS: ()=> {
  3940. if (indexOF('/chapter/')) {
  3941. curSite = DBSite.haoman;
  3942. if (location.hostname == 'www.g-lens.com') curSite.function.bFp = [0, 'img[data-echo]', 'data-echo']
  3943. } else if (indexOF('/comic/')) {
  3944. if (getCSS('.chapter__more')) getCSS('.chapter__more').click();
  3945. } else if (indexOF('/category/') || indexOF('/search')) {
  3946. curSite = DBSite.haoman_list;
  3947. }},
  3948. 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;}',
  3949. pager: {
  3950. nextL: ()=> {if (getCSS('a.rd-aside__item.j-rd-next')) return location.origin + getCSS('a.rd-aside__item.j-rd-next').getAttribute('_href')},
  3951. pageE: 'css;.rd-article-wr > div',
  3952. replaceE: 'css;a.last-crumb, .rd-aside',
  3953. interval: 2000,
  3954. scrollD: 2000
  3955. },
  3956. function: {
  3957. bF: src_bF,
  3958. bFp: [0, 'img[dta-echo]', 'dta-echo']
  3959. }
  3960. }, // 好漫 6
  3961. haoman_list: {
  3962. pager: {
  3963. nextL: 'css;a.next',
  3964. pageE: 'css;.cate-comic-list > div',
  3965. replaceE: 'css;#Pagination',
  3966. scrollD: 1000
  3967. },
  3968. function: {
  3969. bF: src_bF,
  3970. bFp: [0, 'img[data-original]', 'data-original']
  3971. }
  3972. }, // 好漫 6 - 分类/搜索页
  3973. cartoonmad: {
  3974. host: ['www.cartoonmad.com','www.cartoonmad.cc'],
  3975. functionS: ()=> {if (indexOF('/comic/')) {
  3976. getCSS('body > table > tbody > tr:nth-child(4) > td > table > tbody > tr:first-child > td:first-child > a').href = 'javascript:void(0);'; // 清理图片上的链接
  3977. curSite = DBSite.cartoonmad;
  3978. } else if (location.pathname != '/') {
  3979. curSite = DBSite.cartoonmad_list;
  3980. }},
  3981. 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;}',
  3982. pager: {
  3983. nextL: cartoonmad_nextL,
  3984. pageE: 'css;body > table > tbody > tr:nth-child(4) > td > table > tbody > tr:first-child > td:first-child img',
  3985. replaceE: 'css;body > table > tbody > tr:nth-child(2), body > table > tbody > tr:nth-child(5)',
  3986. scrollD: 2000
  3987. }
  3988. }, // 动漫狂
  3989. cartoonmad_list: {
  3990. pager: {
  3991. nextL: '//a[@class="pages"][contains(text(), "下一頁")]',
  3992. pageE: 'css;td[background="/image/content_box4.gif"]+td > table > tbody > tr',
  3993. replaceE: '//a[@class="pages"]/parent::td/parent::tr | //font[contains(text(), "目前在第")]',
  3994. scrollD: 1000
  3995. }
  3996. }, // 动漫狂 - 分类/搜索页
  3997. dongman: {
  3998. host: 'www.dongman.la',
  3999. functionS: ()=> {if (indexOF('/chapter/')) {
  4000. src_bF(getAllCSS('img.mdui-img-fluid[data-srcset]:not([src])'), [0, 'img[data-srcset]', 'data-srcset']);
  4001. curSite = DBSite.dongman;
  4002. } else if (indexOF('/detail/')) {
  4003. setTimeout(function(){getCSS('a#zhankai').click()}, 500)
  4004. } else if (indexOF('/manhua/')) {
  4005. curSite = DBSite.dongman_list;
  4006. }},
  4007. 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;}',
  4008. pager: {
  4009. nextL: '//footer//a[./label[text()="下一章"]]',
  4010. pageE: 'css;.lazyBox',
  4011. insertP: ['css;.slick-track', 3],
  4012. replaceE: 'css;footer',
  4013. scrollD: 3000
  4014. },
  4015. function: {
  4016. bF: src_bF,
  4017. bFp: [0, 'img[data-srcset]', 'data-srcset']
  4018. }
  4019. }, // 动漫啦
  4020. dongman_list: {
  4021. pager: {
  4022. nextL: '//a[@class="GPageLink" and text()="下一页"]',
  4023. pageE: 'css;.cy_list_mh > ul',
  4024. replaceE: 'css;.NewPages',
  4025. scrollD: 2000
  4026. }
  4027. }, // 动漫啦 - 分类页
  4028. manhuacat: {
  4029. host: ['www.manhuacat.com', 'www.maofly.com'],
  4030. functionS: ()=> {if (indexOF(/\/manga\/\d+\/.+\.html/)) {
  4031. if (getCookie('is_pull') == 'true') { // 强制关闭 [下拉] 模式
  4032. document.cookie='is_pull=false; expires=Thu, 18 Dec 2031 12:00:00 GMT; path=/'; // 写入 Cookie 关闭 [下拉] 模式
  4033. location.reload(); // 刷新网页
  4034. }
  4035. setTimeout(manhuacat_init, 100);
  4036. curSite = DBSite.manhuacat;
  4037. } else if (indexOF('/list')) {
  4038. curSite = DBSite.manhuacat_list;
  4039. } else if (indexOF('/search') || indexOF('/update')) {
  4040. curSite = DBSite.manhuacat_search;
  4041. }},
  4042. 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;}', // 隐藏不需要的元素,调整图片
  4043. pager: {
  4044. type: 4,
  4045. nextL: manhuacat_nextL,
  4046. insertP: ['css;.img-content', 3],
  4047. insertE: manhuacat_insertE,
  4048. replaceE: 'css;.comic-detail > .breadcrumb-bar, .comic-detail >h2.h4, .vg-r-data, body > script:not([src])',
  4049. interval: 2000,
  4050. scrollD: 3000
  4051. }
  4052. }, // 漫画猫
  4053. manhuacat_list: {
  4054. pager: {
  4055. nextL: '//div[contains(@class, "pagination")]//a[contains(text(), "下一页") or contains(text(), "下页")]',
  4056. pageE: 'css;.comic-main-section > *',
  4057. replaceE: 'css;.pagination',
  4058. scrollD: 1000
  4059. },
  4060. function: {
  4061. bF: src_bF,
  4062. bFp: [0, 'img[data-original]', 'data-original']
  4063. }
  4064. }, // 漫画猫 - 分类页
  4065. manhuacat_search: {
  4066. pager: {
  4067. nextL: '//div[contains(@class, "pagination")]//a[contains(text(), "下一页") or contains(text(), "下页")]',
  4068. pageE: 'css;.comic-main-section .row > div',
  4069. replaceE: 'css;.pagination',
  4070. scrollD: 1000
  4071. }
  4072. }, // 漫画猫 - 搜索页
  4073. manhuatai: {
  4074. host: 'www.manhuatai.net',
  4075. functionS: ()=> {if (indexOF('/manhua/')) {
  4076. curSite = DBSite.manhuatai;
  4077. } else if (indexOF('/fenlei_') || indexOF('/top_')) {
  4078. curSite = DBSite.manhuatai_list;
  4079. } else if (indexOF('/search')) {
  4080. curSite = DBSite.manhuatai_search;
  4081. }},
  4082. pager: {
  4083. nextL: '//div[contains(@class, "page")]//a[@href][contains(text(), "下一页") or contains(text(), "下一章")]',
  4084. pageE: 'css;#htmlContent p.img > img',
  4085. replaceE: 'css;.page, .title',
  4086. scrollD: 2000
  4087. }
  4088. }, // 漫画台
  4089. manhuatai_list: {
  4090. pager: {
  4091. nextL: 'css;#pagelink a.next',
  4092. pageE: 'css;.article-list',
  4093. replaceE: 'css;#pagelink',
  4094. scrollD: 1500
  4095. }
  4096. }, // 漫画台 - 分类页
  4097. manhuatai_search: {
  4098. pager: {
  4099. nextL: 'css;#pagelink a.next',
  4100. pageE: 'css;#content > table > tbody > tr:not([align])',
  4101. replaceE: 'css;#pagelink',
  4102. scrollD: 1500
  4103. }
  4104. }, // 漫画台 - 搜索页
  4105. manhuapi: {
  4106. host: 'www.manhuapi.com',
  4107. functionS: ()=> {if (indexOF('/chapter/')) {
  4108. curSite = DBSite.manhuapi;
  4109. } else if (!indexOF(/\/manhua\/\d+\.html/)) {
  4110. curSite = DBSite.manhuapi_list;
  4111. }},
  4112. pager: {
  4113. nextL: '//div[@class="page"]/a[text()="下一页" or text()="下一章"]',
  4114. pageE: 'css;.mh_list img[src]',
  4115. replaceE: 'css;.page',
  4116. scrollD: 2000
  4117. }
  4118. }, // 漫画皮
  4119. manhuapi_list: {
  4120. pager: {
  4121. nextL: '//div[@class="pages"]/a[text()="下一页"]',
  4122. pageE: 'css;.cy_list_mh > ul',
  4123. replaceE: 'css;.pages',
  4124. scrollD: 1500
  4125. }
  4126. }, // 漫画皮 - 分类页
  4127. imanhuaw: {
  4128. host: ['www.imanhuaw.net', 'www.imanhuaw.com', 'www.ccshwy.com'],
  4129. functionS: ()=> {
  4130. if (getCSS('.mh-search-result')) {
  4131. curSite = DBSite.imanhuaw_list;
  4132. } else if (getCSS('a#zhankai')) {
  4133. getCSS('a#zhankai').click();
  4134. } else if (indexOF(/\/\d{3,}\.html/)) {
  4135. curSite = DBSite.imanhuaw; imanhuaw_init();
  4136. }
  4137. },
  4138. 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;}',
  4139. pager: {
  4140. type: 4,
  4141. nextL: imanhuaw_nextL,
  4142. insertP: ['css;#qTcms_Pic_middle img:last-of-type', 4],
  4143. insertE: imanhuaw_insertE,
  4144. replaceE: 'css;.title h2',
  4145. interval: 2000,
  4146. scrollD: 3000
  4147. }
  4148. }, // 爱漫画 + 188漫画网
  4149. imanhuaw_list: {
  4150. pager: {
  4151. nextL: '//div[@class="NewPages"]//a[text()="下一页"]',
  4152. pageE: 'css;ul.mh-search-list > li',
  4153. replaceE: 'css;.NewPages',
  4154. scrollD: 1500
  4155. }
  4156. }, // 爱漫画 - 分类页
  4157. manhuagui: {
  4158. host: ['www.mhgui.com', 'tw.mhgui.com', 'www.manhuagui.com', 'tw.manhuagui.com'],
  4159. functionS: ()=> {if (indexOF(/\/comic\/\d+\/\d+\.html/)) {
  4160. if (!getXpath('//li[@class="pfunc"]/a[@class="current"][text()="双击" or text()="雙擊"]')) getXpath('//li[@class="pfunc"]/a[text()="双击" or text()="雙擊"]').click();
  4161. pausePage = false;
  4162. setTimeout(manhuagui_init, 100);
  4163. curSite = DBSite.manhuagui;
  4164. } else if (indexOF('list/') || indexOF('/s/')) {
  4165. curSite = DBSite.manhuagui_list;
  4166. }},
  4167. 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;}',
  4168. pager: {
  4169. type: 4,
  4170. nextL: manhuagui_nextL,
  4171. pageE: 'css;body > script:not([src])',
  4172. insertP: ['css;#mangaBox', 3],
  4173. insertE: manhuagui_insertE,
  4174. replaceE: 'css;title',
  4175. interval: 4000,
  4176. scrollD: 2500
  4177. }
  4178. }, // 漫画柜
  4179. manhuagui_list: {
  4180. pager: {
  4181. nextL: '//div[@class="pager"]/a[text()="下一页" or text()="下一頁"]',
  4182. pageE: 'css;.book-result > ul > li, .book-list > ul > li',
  4183. insertP: ['css;.book-result > ul, .book-list > ul', 3],
  4184. replaceE: 'css;.pager',
  4185. scrollD: 1500
  4186. },
  4187. function: {
  4188. bF: src_bF,
  4189. bFp: [0, 'img[data-src]', 'data-src']
  4190. }
  4191. }, // 漫画台 - 分类/搜索页
  4192. _36manga: {
  4193. host: ['36manga.com', 'www.36manga.com', '36manhua.com', 'www.36manhua.com'],
  4194. functionS: ()=> {if (indexOF(/\/manhua\/.+\/\d+\.html/)) {
  4195. if (localStorage.getItem('chapterScroll') != '"pagination"') {
  4196. localStorage.setItem('chapterScroll', '"pagination"'); location.reload()
  4197. } else {
  4198. pausePage = false;
  4199. setTimeout(_36manga_init, 100);
  4200. curSite = DBSite._36manga;
  4201. }
  4202. } else if (indexOF('list/') || indexOF('/search/')) {
  4203. curSite = DBSite._36manga_list;
  4204. }},
  4205. 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;}',
  4206. pager: {
  4207. type: 4,
  4208. nextL: _36manga_nextL,
  4209. pageE: '//body/script[contains(text(), "chapterImages")]',
  4210. insertP: ['css;#images', 3],
  4211. insertE: _36manga_insertE,
  4212. replaceE: 'css;.title',
  4213. interval: 4000,
  4214. scrollD: 2500
  4215. }
  4216. }, // 36漫画
  4217. _36manga_list: {
  4218. pager: {
  4219. nextL: 'css;ul.pagination li.next a',
  4220. pageE: 'css;#contList',
  4221. replaceE: 'css;ul.pagination',
  4222. scrollD: 1500
  4223. }
  4224. }, // 36漫画 - 分类/搜索页
  4225. manhuadb: {
  4226. host: 'www.manhuadb.com',
  4227. functionS: ()=> {if (indexOF(/\/manhua\/\d+\/.+\.html/)) {
  4228. if (getCSS('img.img-fluid.show-pic')) getCSS('img.img-fluid.show-pic').style.display = 'none'; // 隐藏第一个图片(避免重复)
  4229. setTimeout(manhuadb_init, 100);
  4230. curSite = DBSite.manhuadb;
  4231. } else if (indexOF('/list')) {
  4232. curSite = DBSite.manhuacat_list;
  4233. } else if (indexOF('/search') || indexOF('/update')) {
  4234. curSite = DBSite.manhuacat_search;
  4235. }},
  4236. style: '.row.m-0.pt-3.ad_2_wrap, .row.m-0.ad_1_wrap, .pagination.justify-content-center, #left, #right {display: none !important;}',
  4237. pager: {
  4238. type: 4,
  4239. nextL: manhuadb_nextL,
  4240. pageE: 'css;body > script:not([type]):not([src]), .vg-r-data, ol.links-of-books.num_div',
  4241. insertP: ['css;.pjax-container', 3],
  4242. insertE: manhuadb_insertE,
  4243. interval: 5000,
  4244. scrollD: 3000
  4245. }
  4246. }, // 漫画 DB
  4247. hicomic: {
  4248. host: 'www.hicomic.net',
  4249. functionS: ()=> {if (indexOF('/chapters/')) {
  4250. setTimeout(hicomic_init, 100);
  4251. curSite = DBSite.hicomic;
  4252. }},
  4253. style: '.content {height: auto !important;} .footer, .left_cursor, .right_cursor, .finish {display: none !important;} .content > img {display: block !important;margin: 0 auto !important;}',
  4254. pager: {
  4255. type: 4,
  4256. nextL: hicomic_nextL,
  4257. insertP: ['css;.content', 3],
  4258. insertE: hicomic_insertE,
  4259. interval: 5000,
  4260. scrollD: 3000
  4261. }
  4262. }, // HiComic (嗨漫画)
  4263. dmzj: {
  4264. host: 'www.dmzj.com',
  4265. functionS: ()=> {if (indexOF('/view/')) {
  4266. if (getCookie('display_mode') != '1') { // 强制开启 [上下滚动阅读] 模式
  4267. document.cookie='display_mode=1; expires=Thu, 18 Dec 2031 12:00:00 GMT; path=/'; // 写入 Cookie 开启 [上下滚动阅读] 模式
  4268. location.reload(); // 刷新网页
  4269. }
  4270. setTimeout(function() {dmzj_init('.comic_wraCon > a > img')}, 100);
  4271. curSite = DBSite.dmzj;
  4272. } else if (indexOF('/category') || indexOF('/update')) {
  4273. curSite = DBSite.dmzj_list;
  4274. } else if (indexOF('/rank')) {
  4275. curSite = DBSite.dmzj_rank;
  4276. }},
  4277. 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;}', // 隐藏中间的页数信息
  4278. pager: {
  4279. type: 4,
  4280. nextL: 'css;span.next > a',
  4281. insertP: ['css;.comic_wraCon', 3],
  4282. insertE: dmzj_insertE,
  4283. replaceE: 'css;.wrap_last_mid, .wrap_last_head',
  4284. interval: 2000,
  4285. scrollD: 3000
  4286. }
  4287. }, // 动漫之家 - 原创
  4288. dmzj_list: {
  4289. style: '.wrap_mhlist_l.con_left, .wrap_list {height: auto!important;}',
  4290. pager: {
  4291. nextL: 'css;a.pg_next',
  4292. pageE: 'css;ul.list_con_li > li',
  4293. replaceE: 'css;.page',
  4294. scrollD: 1000
  4295. }
  4296. }, // 动漫之家 - 原创 - 分类页
  4297. dmzj_rank: {
  4298. style: '.wrap_mhlist_l.con_left {height: auto!important;}',
  4299. pager: {
  4300. nextL: 'css;a.pg_next',
  4301. pageE: 'css;.ph_r_con_li > div:not(.ad_column)',
  4302. replaceE: 'css;.page',
  4303. scrollD: 1000
  4304. }
  4305. }, // 动漫之家 - 原创 - 排行榜
  4306. dmzj_manhua: {
  4307. host: 'manhua.dmzj.com',
  4308. functionS: ()=> {if (indexOF(/\/\d+\.shtml/)) {
  4309. let chapterScroll = getCSS('#qiehuan_txt') // 强制为 [上下滚动阅读] 模式
  4310. if (chapterScroll && chapterScroll.textContent === '切换到上下滚动阅读') {chapterScroll.click();}
  4311. setTimeout(function() {dmzj_init('#center_box > .inner_img img[src]')}, 100);
  4312. curSite = DBSite.dmzj_manhua;
  4313. /*} else if (indexOF('/tags/')) {
  4314. curSite = DBSite.dmzj_manhua_list;*/
  4315. } else if (indexOF('/update')) {
  4316. curSite = DBSite.dmzj_manhua_update;
  4317. }},
  4318. 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;}', // 隐藏中间的页数信息
  4319. pager: {
  4320. type: 4,
  4321. nextL: 'css;#next_chapter',
  4322. insertP: ['css;#center_box', 3],
  4323. insertE: dmzj_manhua_insertE,
  4324. replaceE: 'css;.display_graybg',
  4325. interval: 2000,
  4326. scrollD: 3000
  4327. }
  4328. }, // 动漫之家 - 日漫
  4329. /*dmzj_manhua_list: {
  4330. pager: {
  4331. nextL: ()=> getNextUPN(/(?<=-)\d+(?=\.shtml)/, /-\d+\.shtml/, '-', '.shtml', '2', getCSS('#topage > option:last-child').value),
  4332. pageE: 'css;#search_list_div ul',
  4333. scrollD: 1500
  4334. }
  4335. },*/ // 动漫之家 - 日漫 - 分类页
  4336. dmzj_manhua_update: {
  4337. pager: {
  4338. nextL: '//div[@class="pages"]/a[contains(text(), "下一页")]',
  4339. pageE: 'css;.newpic_content > *:not(.pages)',
  4340. replaceE: 'css;.pages',
  4341. scrollD: 1000
  4342. }
  4343. }, //动漫之家 - 日漫 - 最新更新
  4344. acgn: {
  4345. host: 'comic.acgn.cc',
  4346. functionS: ()=> {
  4347. if (indexOF('/view-')) {
  4348. curSite = DBSite.acgn;
  4349. acgn_aF();
  4350. } else if (indexOF('/cate-') || indexOF('/pinyin-')) {
  4351. curSite = DBSite.acgn_list;
  4352. }
  4353. },
  4354. style: '.img1 {cursor: initial !important;}',
  4355. pager: {
  4356. nextL: 'css;#next_chapter',
  4357. pageE: 'css;.pic[_src]',
  4358. replaceE: 'css;[class^="display_"]',
  4359. interval: 2000,
  4360. scrollD: 2000
  4361. },
  4362. function: {
  4363. aF: acgn_aF
  4364. }
  4365. }, // 动漫戏说
  4366. acgn_list: {
  4367. pager: {
  4368. nextL: 'css;a[rel="next"]',
  4369. pageE: 'css;ul#display > li',
  4370. replaceE: 'css;#pagination',
  4371. scrollD: 1000
  4372. }
  4373. }, // 动漫戏说 - 分类页
  4374. ykmh: {
  4375. host: 'www.ykmh.com',
  4376. functionS: ()=> {if (indexOF(/\/\d+\.html/)) {
  4377. let chapterScroll = getCSS('#qiehuan_txt') // 强制为 [上下滚动阅读] 模式
  4378. if (localStorage.getItem('chapterScroll') != '"scroll"') {
  4379. localStorage.setItem('chapterScroll', '"scroll"'); location.reload()
  4380. } else {
  4381. setTimeout(ykmh_init, 100);
  4382. curSite = DBSite.ykmh;
  4383. }
  4384. } else if (indexOF('/list') || indexOF('/search')) {
  4385. curSite = DBSite.ykmh_list;
  4386. }},
  4387. 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;}',
  4388. pager: {
  4389. type: 4,
  4390. nextL: ykmh_nextL,
  4391. insertP: ['css;#images', 3],
  4392. insertE: ykmh_insertE,
  4393. replaceE: 'css;.head_title, span.head_wz',
  4394. interval: 2000,
  4395. scrollD: 3000
  4396. }
  4397. }, // 优酷漫画
  4398. ykmh_list: {
  4399. pager: {
  4400. nextL: 'css;li.next > a',
  4401. pageE: 'css;li.list-comic',
  4402. replaceE: 'css;ul.pagination',
  4403. scrollD: 1000
  4404. }
  4405. }, // 优酷漫画 - 分类页
  4406. copymanga: {
  4407. host: /copymanga\./,
  4408. functionS: ()=> {if (indexOF('/chapter/')) {
  4409. curSite = DBSite.copymanga;
  4410. } else if (indexOF('/comics')) {
  4411. curSite = DBSite.copymanga_list;
  4412. }},
  4413. style: '.upMember, .comicContainerAds, .footer {display: none !important;} body, html {height: auto !important;}',
  4414. iframe: true,
  4415. pager: {
  4416. type: 5,
  4417. nextL: 'css;.comicContent-next > a',
  4418. style: 'h4.header, h4.header +div[style*="fixed"] {display: none !important;}',
  4419. scrollD: 3000
  4420. }
  4421. }, // 拷贝漫画
  4422. copymanga_list: {
  4423. pager: {
  4424. nextL: 'css;li.next > a',
  4425. pageE: 'css;.exemptComic-box > div',
  4426. replaceE: 'css;ul.page-all',
  4427. scrollD: 1500
  4428. },
  4429. function: {
  4430. bF: src_bF,
  4431. bFp: [0, 'img[data-src]', 'data-src']
  4432. }
  4433. }, // 拷贝漫画 - 分类页
  4434. mhxqiu: {
  4435. host: /\.mhxqiu/,
  4436. functionS: ()=> {if (indexOF(/\/\d+\.html/)) { // 阅读页
  4437. curSite = DBSite.mhxqiu;
  4438. } else if (indexOF(/\/\d+\/$/)) { // 目录页
  4439. setTimeout(function(){if (getCSS('#zhankai')) getCSS('#zhankai').click();}, 500)
  4440. } else if (indexOF(/\/(sort|rank)\//)) { // 分类页
  4441. curSite = DBSite.mhxqiu_list;
  4442. }},
  4443. 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;}',
  4444. pager: {
  4445. type: 4,
  4446. nextL: 'css;#mainControlNext',
  4447. insertP: ['css;#comicContain', 3],
  4448. insertE: mhxqiu_insertE,
  4449. replaceE: 'css;.main_control, h1.chaptername_title, span.title-comicHeading',
  4450. interval: 4000,
  4451. scrollD: 3000
  4452. }
  4453. }, // 漫画星球
  4454. mhxqiu_list: {
  4455. pager: {
  4456. nextL: '//div[@class="NewPages"]//a[contains(text(), "下一页")]',
  4457. pageE: 'css;.cy_list_mh > ul',
  4458. replaceE: 'css;.NewPages',
  4459. scrollD: 1000
  4460. }
  4461. }, // 漫画星球 - 分类页
  4462. fffdm: {
  4463. host: 'manhua.fffdm.com',
  4464. functionS: ()=> {if (location.pathname.split('/').length === 4) {curSite = DBSite.fffdm;}},
  4465. style: '#footer, #header {display: none !important;} #mhimg0 img {display: block !important;margin: 0 auto !important;}',
  4466. pager: {
  4467. type: 4,
  4468. nextL: '//a[contains(text(), "下一页") or contains(text(), "下一頁") or contains(text(), "下一话") or contains(text(), "下一話")]',
  4469. insertP: ['css;#mhimg0', 3],
  4470. insertE: fffdm_insertE,
  4471. replaceE: 'css;.navigation, #weizhi, h1',
  4472. scrollD: 2000
  4473. }
  4474. }, // 风之动漫
  4475. baozimh: {
  4476. host: ['www.webmota.com', 'cn.webmota.com', 'cn.baozimh.com'],
  4477. functionS: ()=> {
  4478. if (indexOF('/chapter/')) {
  4479. curSite = DBSite.baozimh;
  4480. } else if (indexOF('/comic/')) {
  4481. if (getCSS('#button_show_all_chatper')) getCSS('#button_show_all_chatper').click();
  4482. }},
  4483. style: '#footer, #header {display: none !important;} .header, .bottom-bar {opacity: 0.3;}',
  4484. pager: {
  4485. nextL: 'css;.next_chapter > a',
  4486. pageE: 'css;.comic-contain > amp-img',
  4487. replaceE: 'css;.next_chapter, .bottom-bar, .header .title',
  4488. scrollD: 2000
  4489. }
  4490. }, // 包子漫画
  4491. leyuman: {
  4492. host: 'www.leyuman.com',
  4493. functionS: ()=> {if (indexOF(/\/comic\/\d+\/\d+\.html/)) {
  4494. curSite = DBSite.leyuman;
  4495. setTimeout(leyuman_init, 100);
  4496. } else if (indexOF(/\/comic\/\d+\.html/)) {
  4497. setTimeout(function(){if (getCSS('#read-more')) getCSS('#read-more').click();}, 500)
  4498. } else {
  4499. curSite = DBSite.leyuman_list;
  4500. }},
  4501. style: '.mh_select, .mh_comicpic > p, mh_headpager {display: none !important;} .mh_comicpic > img{width: 100% !important; height: auto !important;}',
  4502. pager: {
  4503. type: 4,
  4504. nextL: 'css;#xurl',
  4505. insertP: ['css;.mh_comicpic', 3],
  4506. insertE: leyuman_insertE,
  4507. replaceE: 'css;.mh_headpager, .mh_readtitle',
  4508. interval: 3000,
  4509. scrollD: 3000
  4510. }
  4511. }, // 乐语漫画
  4512. leyuman_list: {
  4513. pager: {
  4514. nextL: '//a[@class="page-link"][contains(text(), "下一页")]',
  4515. pageE: 'css;.works_recommend.classification_works > ul',
  4516. replaceE: 'css;.paging',
  4517. scrollD: 1000
  4518. },
  4519. function: {
  4520. bF: src_bF,
  4521. bFp: [0, 'img[data-src]', 'data-src']
  4522. }
  4523. }, // 乐语漫画 - 分类页
  4524. _77mh: {
  4525. host: 'www.77mh.cc',
  4526. functionS: ()=> {if (indexOF(/\/\d+\.html/)) {
  4527. curSite = DBSite._77mh;
  4528. setTimeout(_77mh_init, 100);
  4529. } else if (indexOF('/colist_')) {
  4530. setTimeout(function(){if (getCSS('#listmore1, .listmore')) getCSS('#listmore1, .listmore').click();}, 500)
  4531. } else {
  4532. curSite = DBSite._77mh_list;
  4533. }},
  4534. 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;}',
  4535. pager: {
  4536. type: 4,
  4537. nextL: _77mh_nextL,
  4538. insertP: ['css;#comicImg', 3],
  4539. insertE: _77mh_insertE,
  4540. interval: 3000,
  4541. scrollD: 2000
  4542. }
  4543. }, // 新新漫画
  4544. _77mh_list: {
  4545. pager: {
  4546. nextL: '//div[@class="pages_s"]/a[text()="下一页"]',
  4547. pageE: 'css;.ar_list_co > ul > li',
  4548. replaceE: 'css;.pages_s',
  4549. scrollD: 1000
  4550. }
  4551. }, // 新新漫画 - 分类页
  4552. _77mh_search: {
  4553. host: 'so.77mh.cc',
  4554. pager: {
  4555. nextL: 'css;a.next',
  4556. pageE: 'css;.ar_list_co > ul > dl',
  4557. replaceE: 'css;.pages_s',
  4558. scrollD: 1000
  4559. }
  4560. }, // 新新漫画 - 搜索页
  4561. gufengmh: {
  4562. host: /gufengmh/,
  4563. functionS: ()=> {if (indexOF(/\/\d+.+\.html/)) {
  4564. let chapterScroll = getCSS('#chapter-scroll') // 强制为 [下拉阅读] 模式
  4565. if (chapterScroll && chapterScroll.className === '') {chapterScroll.click();}
  4566. curSite = DBSite.gufengmh;
  4567. } else if (indexOF(/\/(update|list|search)/)) {
  4568. curSite = DBSite.gufengmh_list;
  4569. }},
  4570. style: 'p.img_info {display: none !important;}', // 隐藏中间的页数信息
  4571. pager: {
  4572. type: 4,
  4573. nextL: gufengmh_nextL,
  4574. pageE: 'css;body > script:first-child',
  4575. insertP: ['css;#images', 3],
  4576. insertE: gufengmh_insertE,
  4577. interval: 5000,
  4578. scrollD: 4000
  4579. }
  4580. }, // 古风漫画网
  4581. gufengmh_list: {
  4582. pager: {
  4583. nextL: 'css;li.next > a',
  4584. pageE: 'css;ul.book-list > li',
  4585. replaceE: 'css;ul.pagination',
  4586. scrollD: 1000
  4587. }
  4588. }, // 古风漫画网 - 分类页
  4589. szcdmj: {
  4590. host: 'www.szcdmj.com',
  4591. functionS: ()=> {
  4592. if (indexOF('/szcchapter/')) {
  4593. curSite = DBSite.szcdmj;
  4594. } else if (indexOF('/szcbook/')) {
  4595. if (getCSS('#detail-list-more')) getCSS('#detail-list-more').click();
  4596. } else if (lp == '/szcbolist' || lp == '/update') {
  4597. curSite = DBSite.szcdmj_list;
  4598. }},
  4599. style: '.header {opacity: 0.3 !important;}',
  4600. pager: {
  4601. nextL: '//div[@class="fanye"][1]/a[@href][text()="下一页" or text()="下一话"]',
  4602. pageE: 'css;.comicpage > div',
  4603. insertP: ['css;.comicpage', 3],
  4604. replaceE: 'css;.fanye,h1.title',
  4605. scrollD: 2000
  4606. },
  4607. function: {
  4608. bF: src_bF,
  4609. bFp: [0, 'img[data-original]', 'data-original']
  4610. }
  4611. }, // 砂之船动漫家
  4612. szcdmj_list: {
  4613. pager: {
  4614. nextL: 'css;#nextPage',
  4615. pageE: 'css;ul.mh-list > li',
  4616. replaceE: 'css;.pagination',
  4617. scrollD: 1000
  4618. }
  4619. }, // 砂之船动漫家 - 分类/搜索页
  4620. mangabz: {
  4621. host: ['mangabz.com', 'www.mangabz.com'],
  4622. functionS: ()=> {if (indexOF(/\/m\d+/)) {
  4623. setTimeout(mangabz_init, 1500);
  4624. curSite = DBSite.mangabz;
  4625. } else if (indexOF(/\/\d+bz\//)) {
  4626. if (getCSS('.detail-list-form-more')) getCSS('.detail-list-form-more').click();
  4627. } else if (indexOF('/manga-list') || lp == '/search') {
  4628. curSite = DBSite.mangabz_list;
  4629. }},
  4630. 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;}',
  4631. pager: {
  4632. type: 4,
  4633. nextL: mangabz_nextL,
  4634. insertP: ['css;#cp_img', 3],
  4635. insertE: mangabz_insertE,
  4636. replaceE: 'css;p.top-title, body > .container > div:not([id])',
  4637. interval: 500,
  4638. scrollD: 2000
  4639. }
  4640. }, // Mangabz 漫画
  4641. mangabz_list: {
  4642. pager: {
  4643. nextL: '//div[contains(@class,"page-pagination")]//a[contains(text(), ">")]',
  4644. pageE: 'css;ul.mh-list > li',
  4645. replaceE: 'css;.page-pagination',
  4646. scrollD: 800
  4647. }
  4648. }, // Mangabz 漫画 - 分类/搜索页
  4649. dm5: {
  4650. host: 'www.dm5.com',
  4651. functionS: ()=> {if (indexOF(/\/m\d+/)) {
  4652. setTimeout(mangabz_init, 1500);
  4653. curSite = DBSite.dm5;
  4654. } else if (indexOF('/manga-list') || lp == '/search' || getCSS('.box-body > ul.mh-list > li')) {
  4655. curSite = DBSite.mangabz_list;
  4656. } else if (getCSS('.detail-more')) {
  4657. getCSS('.detail-more').click();
  4658. }},
  4659. 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;}',
  4660. pager: {
  4661. type: 4,
  4662. nextL: dm5_nextL,
  4663. insertP: ['css;#cp_img', 3],
  4664. insertE: dm5_insertE,
  4665. replaceE: 'css;.view-paging > .container, .rightToolBar',
  4666. interval: 500,
  4667. scrollD: 2000
  4668. }
  4669. }, // 动漫屋
  4670. xmanhua: {
  4671. host: ['xmanhua.com', 'www.xmanhua.com'],
  4672. functionS: ()=> {if (indexOF(/\/m\d+/)) {
  4673. setTimeout(mangabz_init, 1500);
  4674. curSite = DBSite.xmanhua;
  4675. } else if (indexOF(/\/\d+xm\//)) {
  4676. if (getCSS('.detail-list-form-more')) getCSS('.detail-list-form-more').click();
  4677. } else if (indexOF('/manga-list') || lp == '/search') {
  4678. curSite = DBSite.xmanhua_list;
  4679. }},
  4680. 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;}',
  4681. hiddenPN: true,
  4682. pager: {
  4683. type: 4,
  4684. nextL: xmanhua_nextL,
  4685. insertP: ['css;#cp_img', 3],
  4686. insertE: xmanhua_insertE,
  4687. replaceE: 'css;.reader-title, body > .container > div:not([id])',
  4688. interval: 500,
  4689. scrollD: 2500
  4690. }
  4691. }, // Xmanhua 漫画
  4692. xmanhua_list: {
  4693. pager: {
  4694. nextL: '//div[@class="page-pagination"]//a[contains(text(), ">")]',
  4695. pageE: 'css;ul.mh-list > li',
  4696. replaceE: 'css;.page-pagination',
  4697. scrollD: 1000
  4698. }
  4699. }, // Xmanhua 漫画 - 分类/搜索页
  4700. cocomanga: {
  4701. host: 'www.cocomanga.com',
  4702. functionS: ()=> {if (indexOF('.html')) {
  4703. if (!(getCookie('mh_readmode') === '' || getCookie('mh_readmode') === '3')) {
  4704. document.cookie='mh_readmode=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/'; // 强制开启自带的无缝翻页功能
  4705. location.reload(); // 刷新网页
  4706. }
  4707. setTimeout(cocomanga_init, 500);
  4708. curSite = DBSite.cocomanga;
  4709. } else if (indexOF(/\/\d+\/$/)) {
  4710. setTimeout(function(){if (getCSS('a.website-display-all')) getCSS('a.website-display-all').click();}, 300)
  4711. } else if (lp == '/show') {
  4712. curSite = DBSite.cocomanga_list;
  4713. } else if (lp == '/search') {
  4714. curSite = DBSite.cocomanga_search;
  4715. }},
  4716. style: '.mh_readend, .mh_footpager, .mh_readmode {display: none !important;} .mh_comicpic img {cursor: unset !important;} .mh_comicpic img {min-height: 150px;}',
  4717. pager: {
  4718. type: 4,
  4719. nextL: '//a[contains(@class, "read_page_link") and contains(string(), "下一章")][not(contains(@href, "javascript"))]',
  4720. insertP: ['css;#mangalist', 3],
  4721. insertE: cocomanga_insertE,
  4722. replaceE: 'css;.mh_readtitle, .mh_headpager > a.mh_prevbook, .mh_readend',
  4723. interval: 1000,
  4724. scrollD: 2500
  4725. }
  4726. }, // COCOMANGA 漫画
  4727. cocomanga_list: {
  4728. pager: {
  4729. nextL: ()=> getNextEP('css;.fed-page-info a.fed-btns-green+a[onclick]', 'page=', /page=\d+/),
  4730. pageE: 'css;ul.fed-list-info > li',
  4731. replaceE: 'css;.fed-page-info',
  4732. scrollD: 1000
  4733. },
  4734. function: {
  4735. bF: src_bF,
  4736. bFp: [1, 'a[data-original]', 'data-original']
  4737. }
  4738. }, // COCOMANGA 漫画 - 分类页
  4739. cocomanga_search: {
  4740. pager: {
  4741. nextL: ()=> getNextEP('css;.fed-page-info a.fed-btns-green+a[onclick]', 'page=', /page=\d+/),
  4742. pageE: 'css;dl.fed-deta-info',
  4743. replaceE: 'css;.fed-page-info',
  4744. scrollD: 1000
  4745. },
  4746. function: {
  4747. bF: src_bF,
  4748. bFp: [1, 'a[data-original]', 'data-original']
  4749. }
  4750. }, // COCOMANGA 漫画 - 搜索页
  4751. qidian: {
  4752. host: 'www.qidian.com',
  4753. functionS: ()=> {if (indexOF('/all/')) {curSite = DBSite.qidian;}},
  4754. pager: {
  4755. nextL: 'css;a[class*="pagination-next"]',
  4756. pageE: 'css;ul.all-img-list > li',
  4757. replaceE: 'css;#page-container',
  4758. scrollD: 900
  4759. }
  4760. }, // 起点中文
  4761. qidian_read: {
  4762. host: 'read.qidian.com',
  4763. style: '.admire-wrap {display: none !important;}',
  4764. pager: {
  4765. nextL: 'css;a[id$="chapterNext"]',
  4766. pageE: 'css;.main-text-wrap > div:not(.admire-wrap)',
  4767. replaceE: 'css;.chapter-control',
  4768. scrollD: 900
  4769. }
  4770. }, // 起点中文 - 阅读页
  4771. qimao: {
  4772. host: 'www.qimao.com',
  4773. functionS: ()=> {if (indexOF(/\/shuku\/\d+-\d+\//) || indexOF('/reader/index/')) {curSite = DBSite.qimao;}},
  4774. pager: {
  4775. nextL: '//div[@class="reader-footer"]/a[text()="下一章"]',
  4776. pageE: 'css;.article > p',
  4777. replaceE: 'css;.reader-footer',
  4778. scrollD: 900
  4779. }
  4780. }, // 七猫中文
  4781. zxcs: {
  4782. host: 'zxcs.me',
  4783. functionS: ()=> {if (indexOF('/sort/')) curSite = DBSite.zxcs;},
  4784. pager: {
  4785. nextL: 'css;#pagenavi > span+a',
  4786. pageE: 'css;dl[id="plist"]',
  4787. replaceE: 'css;#pagenavi',
  4788. scrollD: 900
  4789. }
  4790. }, // 知轩藏书
  4791. baoshuu: {
  4792. host: 'www.baoshuu.com',
  4793. functionS: ()=> {if (indexOF('/TXT/list')) curSite = DBSite.baoshuu;},
  4794. pager: {
  4795. nextL: '//div[@class="listl2"]//a[text()="下一页"]',
  4796. pageE: 'css;.listl2 > ul > li',
  4797. replaceE: 'css;.listl2 > dl',
  4798. scrollD: 900
  4799. }
  4800. }, // 宝书网
  4801. baoshuu_m: {
  4802. host: 'm.baoshuu.com',
  4803. functionS: ()=> {if (indexOF('/TXT/list')) curSite = DBSite.baoshuu_m;},
  4804. pager: {
  4805. nextL: '//div[@class="man_first"]//a[text()="下一页"]',
  4806. pageE: 'css;.man_first > ul > li',
  4807. replaceE: 'css;.man_first > dl',
  4808. scrollD: 900
  4809. }
  4810. }, // 宝书网- 手机版
  4811. yushubo: {
  4812. host: 'www.yushubo.com',
  4813. functionS: ()=> {if (indexOF('/read_')) {
  4814. curSite = DBSite.yushubo;
  4815. } else if (indexOF('/lists/')) {
  4816. curSite = DBSite.yushubo_list;
  4817. } else if (indexOF('/all')) {
  4818. curSite = DBSite.yushubo_all;
  4819. }},
  4820. style: '.readbg.mt10 {display: none !important;}',
  4821. pager: {
  4822. nextL: '//div[contains(@class, "articlebtn")]/a[contains(text(), "下一页") or contains(text(), "下一章")]',
  4823. pageE: 'css;#BookText',
  4824. insertP: ['css;#BookText', 6],
  4825. insertP6Br: true,
  4826. replaceE: 'css;.articlebtn',
  4827. scrollD: 1000
  4828. }
  4829. }, // 御书网
  4830. yushubo_list: {
  4831. pager: {
  4832. nextL: 'id("pager")//a[contains(text(), "下一页")]',
  4833. pageE: 'css;.books-list > ul > li',
  4834. replaceE: 'css;#pager',
  4835. scrollD: 1000
  4836. }
  4837. }, // 御书网 - 分类页
  4838. yushubo_all: {
  4839. pager: {
  4840. nextL: 'id("pager")//a[contains(text(), "下一页")]',
  4841. pageE: 'css;ul.search-list > li',
  4842. replaceE: 'css;#pager',
  4843. scrollD: 1000
  4844. }
  4845. }, // 御书网 - 书库页
  4846. soxscc: {
  4847. host: 'www.soxscc.org',
  4848. functionS: ()=> {if (indexOF(/\/\d{4,}\.html/)) {curSite = DBSite.soxscc;}},
  4849. style: '.content > p, img {display: none !important;}',
  4850. pager: {
  4851. nextL: '//font[contains(text(), "下一章")]/following-sibling::a[1]',
  4852. pageE: 'css;.content',
  4853. insertP: ['css;.content', 6],
  4854. insertP6Br: true,
  4855. replaceE: 'css;.pagego',
  4856. scrollD: 1500
  4857. }
  4858. }, // 搜小说
  4859. ihuaben: {
  4860. host: 'www.ihuaben.com',
  4861. functionS: ()=> {if (indexOF(/\/\d{4,}\.html/)) {curSite = DBSite.ihuaben;}},
  4862. style: '.discription > p > i, img, #container, #BDBannerBottom_PC, iframe, .navFooter {display: none !important;} .discription > p {font-size: 16px; min-height: 24px; padding-bottom: 24px;}',
  4863. pager: {
  4864. nextL: 'id("preAndNextBar")/a[contains(text(), "下一章")]',
  4865. pageE: 'css;#contentsource > p',
  4866. insertP: ['css;.discription', 3],
  4867. replaceE: 'css;#preAndNextBar',
  4868. scrollD: 1000
  4869. }
  4870. }, // 话本小说网
  4871. xineyby: {
  4872. host: 'www.xineyby.com',
  4873. functionS: ()=> {if (indexOF('/read/')) {
  4874. curSite = DBSite.xineyby;
  4875. } else if (indexOF(/\/(list|quanben|search)/)) {
  4876. curSite = DBSite.xineyby_list;
  4877. }},
  4878. pager: {
  4879. nextL: 'id("footlink")/a[contains(text(), "下一页")]',
  4880. pageE: 'css;#contents',
  4881. insertP: ['css;#contents', 6],
  4882. insertP6Br: true,
  4883. replaceE: 'css;#footlink, #amain dd h1',
  4884. scrollD: 900
  4885. }
  4886. }, // 无错小说网
  4887. xineyby_list: {
  4888. pager: {
  4889. nextL: 'css;#pagelink a.next',
  4890. pageE: 'css;#content > dd tbody > tr:not(:first-child)',
  4891. insertP: ['css;#content > dd tbody', 3],
  4892. replaceE: 'css;#pagelink',
  4893. scrollD: 900
  4894. }
  4895. }, // 无错小说网 - 分类/搜索页
  4896. _530p: {
  4897. host: 'www.530p.com',
  4898. functionS: ()=> {if (indexOF(/\/\d{4,}\.htm/)) {curSite = DBSite._530p;}},
  4899. pager: {
  4900. nextL: 'css;#nextLink',
  4901. pageE: 'css;#cp_content',
  4902. insertP: ['css;#cp_content', 6],
  4903. insertP6Br: true,
  4904. replaceE: 'css;#pg_bar',
  4905. scrollD: 1500
  4906. }
  4907. }, // 无弹窗小说网
  4908. xiaoshuo77: {
  4909. host: 'm.xiaoshuo77.net',
  4910. functionS: ()=> {if (indexOF('.html')) {curSite = DBSite.xiaoshuo77; xs_bF(getAllCSS('#novelcontent'), [/(<br>)?(&nbsp;)+内容未完,下一页.*$|【本章阅读.*$/, '<br>']);}},
  4911. style: '#novelcontent > p, img {display: none !important;}',
  4912. pager: {
  4913. nextL: 'css;.page_chapter a.p4',
  4914. pageE: 'css;#novelcontent',
  4915. insertP: ['css;#novelcontent', 6],
  4916. replaceE: 'css;.page_chapter',
  4917. scrollD: 1500
  4918. },
  4919. function: {
  4920. bF: xs_bF,
  4921. bFp: [/(<br>)?(&nbsp;)+内容未完,下一页.*$|【本章阅读.*$/, '<br>']
  4922. }
  4923. }, // 读书族小说网
  4924. linovel: {
  4925. host: 'www.linovel.net',
  4926. functionS: ()=> {if (indexOF(/\/book\/\d+\/.+\.html/)) {
  4927. insStyle('.reward-section {display: none !important;}');
  4928. } else if (indexOF('/cat/')) {
  4929. curSite = DBSite.linovel;
  4930. }},
  4931. pager: {
  4932. nextL: '//ul[@class="pagination"]/li/a[contains(text(), "下一页")]',
  4933. pageE: 'css;.rank-book-list > div',
  4934. replaceE: 'css;ul.pagination',
  4935. scrollD: 1000
  4936. }
  4937. }, // 轻之文库
  4938. _23qb: {
  4939. host: 'www.23qb.net',
  4940. functionS: ()=> {if (indexOF(/\/book\/\d+\/.+\.html/)) {
  4941. curSite = DBSite._23qb; xs_bF(getAllCSS('#mlfy_main_text > *'), [/(继续下一页).+|铅笔小说.+/, '']);
  4942. } else if (location.pathname != '/' && !indexOF(/\/book\/\d+\//)) {
  4943. curSite = DBSite._23qb_list;
  4944. }},
  4945. pager: {
  4946. nextL: ()=> (location.origin + ReadParams.url_next),
  4947. pageE: 'id("TextContent")/p | //script[contains(text(), "ReadParams")]',
  4948. insertP: ['css;#TextContent', 3],
  4949. replaceE: 'css;.chepnav',
  4950. scriptT: 2,
  4951. scrollD: 1500
  4952. },
  4953. function: {
  4954. bF: xs_bF,
  4955. bFp: [/.*继续下一页.*|.*铅笔小说.*/, '']
  4956. }
  4957. }, // 铅笔小说
  4958. _23qb_list: {
  4959. pager: {
  4960. nextL: 'css;.pages a.next, .pages > strong+a',
  4961. pageE: 'css;#sitebox > dl',
  4962. replaceE: 'css;.pages',
  4963. scrollD: 1000
  4964. },
  4965. function: {
  4966. bF: src_bF,
  4967. bFp: [0, 'img[_src]', '_src']
  4968. }
  4969. }, // 铅笔小说 - 分类页
  4970. linovelib: {
  4971. host: 'www.linovelib.com',
  4972. functionS: ()=> {if (indexOF(/\/novel\/\d+\/.+\.html/)) {
  4973. curSite = DBSite.linovelib;
  4974. } else if (indexOF('/wenku/')) {
  4975. curSite = DBSite.linovelib_wenku;
  4976. } else if (indexOF('/top/') || indexOF('/topfull/') || indexOF('toplist.php')) {
  4977. curSite = DBSite.linovelib_top;
  4978. }},
  4979. pager: {
  4980. nextL: '//p[@class="mlfy_page"]/a[contains(text(), "下一页") or contains(text(), "下一章")]',
  4981. pageE: 'css;#mlfy_main_text > *',
  4982. replaceE: 'css;p.mlfy_page',
  4983. scrollD: 1000
  4984. }
  4985. }, // 哔哩轻小说
  4986. linovelib_wenku: {
  4987. pager: {
  4988. nextL: 'css;#pagelink > a.next',
  4989. pageE: 'css;.store_collist > div.bookbox',
  4990. replaceE: 'css;#pagelink',
  4991. scrollD: 1000
  4992. },
  4993. function: {
  4994. bF: src_bF,
  4995. bFp: [0, 'img[data-original]', 'data-original']
  4996. }
  4997. }, // 哔哩轻小说 - 文库
  4998. linovelib_top: {
  4999. pager: {
  5000. nextL: 'css;#pagelink > a.next',
  5001. pageE: 'css;.rankpage_box > div.rank_d_list',
  5002. replaceE: 'css;#pagelink',
  5003. scrollD: 1000
  5004. },
  5005. function: {
  5006. bF: src_bF,
  5007. bFp: [0, 'img[data-original]', 'data-original']
  5008. }
  5009. }, // 哔哩轻小说 - 全本
  5010. linovelib_w: {
  5011. host: 'w.linovelib.com',
  5012. functionS: ()=> {if (indexOF(/\/novel\/\d+\/.+\.html/)) {
  5013. curSite = DBSite.linovelib_w;
  5014. } else if (indexOF('/wenku/') || indexOF('/sa/')) {
  5015. curSite = DBSite.linovelib_w_wenku;
  5016. }},
  5017. style: 'body {min-height: 1000px;}',
  5018. pager: {
  5019. nextL: ()=> {if (ReadParams) {return (location.origin + ReadParams.url_next)}; return ''},
  5020. pageE: '//body/script[contains(text(), "var ReadParams")] | id("apage")/div',
  5021. insertP: ['css;#apage', 3],
  5022. scriptT: 2,
  5023. scrollD: 1000
  5024. }
  5025. }, // 哔哩轻小说 (手机版)
  5026. linovelib_w_wenku: {
  5027. pager: {
  5028. nextL: 'css;#pagelink > strong+a ,#pagelink a.next',
  5029. pageE: 'css;ol.book-ol > li',
  5030. replaceE: 'css;#pagelink',
  5031. scrollD: 1000
  5032. },
  5033. function: {
  5034. bF: src_bF,
  5035. bFp: [0, 'img[data-original]', 'data-original']
  5036. }
  5037. }, // 哔哩轻小说 (手机版) - 文库
  5038. _423down: {
  5039. host: 'www.423down.com',
  5040. functionS: ()=> {if (!indexOF('.html')) curSite = DBSite._423down;},
  5041. pager: {
  5042. nextL: '//div[@class="paging"]//a[contains(text(),"下一页")]',
  5043. pageE: 'css;div.content-wrap ul.excerpt > li',
  5044. replaceE: 'css;div.paging',
  5045. scrollD: 2000
  5046. }
  5047. }, // 423Down
  5048. iao_su: {
  5049. host: 'iao.su',
  5050. pager: {
  5051. nextL: 'css;li.next > a',
  5052. pageE: 'css;#index > article, #archive > article',
  5053. insertP: ['css;ol.page-navigator', 1],
  5054. replaceE: 'css;ol.page-navigator',
  5055. scriptT: 3,
  5056. scrollD: 1000
  5057. }
  5058. }, // 不死鸟
  5059. sharerw: {
  5060. host: 'www.sharerw.com',
  5061. functionS: ()=> {if (!indexOF('.html')) {if (lp == '/search.php') {curSite = DBSite.sharerw_search;} else {curSite = DBSite.sharerw;};};},
  5062. pager: {
  5063. nextL: 'css;span.next > a',
  5064. pageE: 'css;.new-post > article',
  5065. replaceE: 'css;.pagebar',
  5066. scrollD: 1500
  5067. }
  5068. }, // 分享者
  5069. sharerw_search: {
  5070. pager: {
  5071. nextL: 'css;span.next > a',
  5072. pageE: 'css;#mainbox > article',
  5073. replaceE: 'css;.pagebar',
  5074. scrollD: 1500
  5075. }
  5076. }, // 分享者 - 搜索页
  5077. extfans: {
  5078. host: 'www.extfans.com',
  5079. functionS: ()=> {if (location.pathname != '/') {curSite = DBSite.extfans;}},
  5080. pager: {
  5081. nextL: 'css;a.page-next',
  5082. pageE: 'css;.app-item-content, .article-item-content',
  5083. replaceE: 'css;.pagination-content',
  5084. scrollD: 2000
  5085. }
  5086. }, // 扩展迷
  5087. appinn: {
  5088. host: 'www.appinn.com',
  5089. pager: {
  5090. nextL: 'css;a.next.page-numbers',
  5091. pageE: 'css;section#latest-posts > article',
  5092. replaceE: 'css;div.nav-links',
  5093. scrollD: 1500
  5094. }
  5095. }, // 小众软件
  5096. isharepc: {
  5097. host: 'www.isharepc.com',
  5098. pager: {
  5099. nextL: 'css;a.next.page-numbers',
  5100. pageE: 'css;.content > div.post',
  5101. replaceE: 'css;nav.pagination',
  5102. scrollD: 1000
  5103. }
  5104. }, // 乐软博客
  5105. ghxi: {
  5106. host: 'www.ghxi.com',
  5107. functionS: ()=> {if (lp == '/' && !location.search) {curSite = DBSite.ghxi;} else {curSite = DBSite.ghxi_list;}},
  5108. pager: {
  5109. type: 2,
  5110. nextL: 'css;.load-more',
  5111. interval: 1000,
  5112. scrollD: 5000
  5113. }
  5114. }, // 果核剥壳 - 首页
  5115. ghxi_list: {
  5116. pager: {
  5117. nextL: 'css;a.next',
  5118. pageE: 'css;ul.post-loop > li',
  5119. replaceE: 'css;ul.pagination',
  5120. scrollD: 1500
  5121. },
  5122. function: {
  5123. bF: src_bF,
  5124. bFp: [0, 'img[data-original]', 'data-original']
  5125. }
  5126. }, // 果核剥壳 - 分类/搜索页
  5127. _6yit: {
  5128. host: ['www.6yit.com'],
  5129. functionS: ()=> {if (!indexOF('.html')) {curSite = DBSite._6yit;}},
  5130. pager: {
  5131. nextL: 'css;a.next.page-numbers',
  5132. pageE: 'css;posts.posts-item.list',
  5133. replaceE: 'css;.pagenav',
  5134. scrollD: 1500
  5135. }
  5136. }, // 六音软件
  5137. apprcn: {
  5138. host: ['www.apprcn.com', 'free.apprcn.com'],
  5139. functionS: ()=> {if (lp == '/' || indexOF('/category/')) {curSite = DBSite.apprcn;}},
  5140. pager: {
  5141. nextL: '//div[@class="pagination"]//a[contains(text(), "Next")]',
  5142. pageE: 'css;article.article',
  5143. replaceE: 'css;.pagination',
  5144. scrollD: 1000
  5145. }
  5146. }, // 反斗软件
  5147. weidown: {
  5148. host: 'www.weidown.com',
  5149. functionS: ()=> {if (indexOF('/search/')) { //搜索页
  5150. curSite = DBSite.weidown_search;
  5151. } else if (indexOF('/special')) { // 专题页
  5152. curSite = DBSite.weidown_special;
  5153. } else {
  5154. curSite = DBSite.weidown;
  5155. }},
  5156. pager: {
  5157. nextL: 'css;a.nextpage',
  5158. pageE: 'css;.articleWrapper > .itemArticle, .articleWrapper > .richTextItem.search',
  5159. insertP: ['css;.articleWrapper', 3],
  5160. replaceE: 'css;#pageGroup',
  5161. scrollD: 1500
  5162. }
  5163. }, // 微当下载
  5164. weidown_search: {
  5165. pager: {
  5166. nextL: 'css;a.nextpage',
  5167. pageE: 'css;.articleListWrapper > .richTextItem.search',
  5168. replaceE: 'css;#pageGroup',
  5169. scrollD: 700
  5170. }
  5171. }, // 微当下载 - 搜索页
  5172. weidown_special: {
  5173. pager: {
  5174. nextL: 'css;a.nextpage',
  5175. pageE: 'css;.special > .item, .articleWrapper > div',
  5176. insertP: ['css;.special, .articleWrapper', 3],
  5177. replaceE: 'css;#pageGroup',
  5178. scrollD: 700
  5179. }
  5180. }, // 微当下载 - 专题页
  5181. fsylr: {
  5182. host: 'fsylr.com',
  5183. functionS: ()=> {if (!indexOF('.html')) {curSite = DBSite.fsylr;}},
  5184. pager: {
  5185. nextL: 'css;a.next.page-numbers',
  5186. pageE: 'css;.posts-con > div:not([class*="posts-"])',
  5187. replaceE: 'css;nav.pagination',
  5188. scrollD: 2000
  5189. }
  5190. }, // 发烧友绿软
  5191. iplaysoft: {
  5192. host: 'www.iplaysoft.com',
  5193. functionS: ()=> {if (indexOF('.html') || indexOF('/p/')) {curSite = DBSite.iplaysoft_comment;} else {curSite = DBSite.iplaysoft;}},
  5194. pager: {
  5195. nextL: 'css;.pagenavi a[title="下一页"]',
  5196. pageE: 'css;#postlist > div.entry',
  5197. replaceE: 'css;.pagenavi-button, .pagenavi',
  5198. scrollD: 1200
  5199. },
  5200. function: {
  5201. bF: src_bF,
  5202. bFp: [0, 'img[data-src]', 'data-src']
  5203. }
  5204. }, // 异次元软件
  5205. iplaysoft_comment: {
  5206. pager: {
  5207. type: 2,
  5208. nextL: 'css;#loadHistoryComments',
  5209. nextTextOf: '展开后面',
  5210. scrollD: 1200
  5211. }
  5212. }, // 异次元软件 - 评论
  5213. mubolin: {
  5214. host: 'www.mubolin.cn',
  5215. pager: {
  5216. nextL: 'css;a.next.page-numbers',
  5217. pageE: 'css;#recent-content > div',
  5218. replaceE: 'css;nav.pagination',
  5219. scrollD: 1500
  5220. }
  5221. }, // 悪魔の小站
  5222. mpyit: {
  5223. host: 'www.mpyit.com',
  5224. functionS: ()=> {if (lp == '/' && !location.search) {
  5225. curSite = DBSite.mpyit;
  5226. } else if (indexOF('/category/') || indexOF('?s=', 's')) { // 搜索页 / 分类页
  5227. curSite = DBSite.mpyit_category;
  5228. }},
  5229. pager: {
  5230. nextL: 'css;a.page-numbers[title="下一页"]',
  5231. pageE: 'css;#post > div[id^="post-"]',
  5232. replaceE: 'css;#post > #pagenavi',
  5233. scrollD: 1700
  5234. }
  5235. }, // 老殁 | 殁漂遥
  5236. mpyit_category: {
  5237. pager: {
  5238. nextL: 'css;a.page-numbers[title="下一页"]',
  5239. pageE: 'css;#content > div[class^="entry_box"]',
  5240. replaceE: 'css;#content > #pagenavi',
  5241. scrollD: 1700
  5242. }
  5243. }, // 老殁 | 殁漂遥 - 搜索页/分类页
  5244. tenlonstudio: {
  5245. host: 'www.tenlonstudio.com',
  5246. functionS: ()=> {if (lp == '/' && !location.search) {
  5247. curSite = DBSite.tenlonstudio;
  5248. } else {
  5249. curSite = DBSite.tenlonstudio_list;
  5250. }},
  5251. pager: {
  5252. type: 2,
  5253. nextL: 'css;.load-more',
  5254. nextText: '加载更多',
  5255. interval: 500,
  5256. scrollD: 1000
  5257. }
  5258. }, // 腾龙工作室
  5259. tenlonstudio_list: {
  5260. pager: {
  5261. nextL: '//div[@class="btn-pager"]/a[contains(text(), "❯")]',
  5262. pageE: 'css;li.post-list-item',
  5263. replaceE: 'css;.ajax-pager',
  5264. scrollD: 1000
  5265. }
  5266. }, // 腾龙工作室 - 分类/搜索页
  5267. yxssp: {
  5268. host: 'www.yxssp.com',
  5269. pager: {
  5270. nextL: '//div[contains(@class, "page-nav")]/a[last()]',
  5271. pageE: 'css;.td-modules-container.td-module-number4 > div',
  5272. replaceE: 'css;.page-nav.td-pb-padding-side',
  5273. scrollD: 1000
  5274. }
  5275. }, // 异星软件空间
  5276. yrxitong: {
  5277. host: 'www.yrxitong.com',
  5278. functionS: ()=> {
  5279. if (lp == '/sr.jsp') {
  5280. curSite = DBSite.yrxitong_search;
  5281. } else if (!indexOF('/h-nd-')) {
  5282. curSite = DBSite.yrxitong;
  5283. }
  5284. },
  5285. pager: {
  5286. nextL: 'css;span.pageNext > a',
  5287. pageE: 'css;#containerFormsCenter .m_news_list > div',
  5288. replaceE: 'css;.pagenation',
  5289. scrollD: 1200
  5290. },
  5291. function: {
  5292. bF: src_bF,
  5293. bFp: [1, 'a[data-original]', 'data-original']
  5294. }
  5295. }, // 小鱼儿 yr 系统
  5296. yrxitong_search: {
  5297. pager: {
  5298. nextL: 'css;span.pageNext > a',
  5299. pageE: 'css;#containerFormsCenter .newsList > div',
  5300. replaceE: 'css;.pagenation',
  5301. scrollD: 2000
  5302. }
  5303. }, // 小鱼儿 yr 系统 - 搜索页
  5304. downg: {
  5305. host: 'www.downg.com',
  5306. functionS: ()=> {if (indexOF('/new/')) {curSite = DBSite.downg;}},
  5307. pager: {
  5308. nextL: 'css;a.nextpage',
  5309. pageE: 'css;.ApdList > ul.ApdLi',
  5310. replaceE: 'css;.pagination',
  5311. scrollD: 1500
  5312. }
  5313. }, // 绿软家园
  5314. sordum: {
  5315. host: 'www.sordum.org',
  5316. pager: {
  5317. nextL: 'css;a.next.page-numbers',
  5318. pageE: 'css;.article > article',
  5319. replaceE: 'css;nav.navigation.posts-navigation',
  5320. scrollD: 1500
  5321. }
  5322. }, // (下面这几个都是国外博客网站)
  5323. winaero: {
  5324. host: 'winaero.com',
  5325. functionS: ()=> {if (lp == '/' || indexOF('/category/')) curSite = DBSite.winaero;},
  5326. pager: {
  5327. nextL: 'css;a.next.page-numbers',
  5328. pageE: 'css;#main > article',
  5329. replaceE: 'css;.pagination',
  5330. scrollD: 1500
  5331. }
  5332. },
  5333. lrepacks: {
  5334. host: 'lrepacks.net',
  5335. functionS: ()=> {if (!indexOF('.html')) curSite = DBSite.lrepacks;},
  5336. pager: {
  5337. nextL: 'css;.page_next > a',
  5338. pageE: 'css;#main .post-list article',
  5339. replaceE: 'css;.page_nav',
  5340. scrollD: 1500
  5341. },
  5342. function: {
  5343. bF: pageElems => { // 插入前函数(调整 class)
  5344. pageElems.forEach(function (one) {
  5345. let now = one.querySelector('.slideUp, .elementFade');
  5346. if (now) now.className = now.className.replace('slideUp','slideUpRun').replace('elementFade','elementFadeRun');
  5347. });
  5348. return pageElems
  5349. }
  5350. }
  5351. },
  5352. dlandroid: {
  5353. host: 'dlandroid.com',
  5354. functionS: ()=> {if (indexOF('/cat/') || (lp === '/' && indexOF('?s=', 's'))) curSite = DBSite.dlandroid;},
  5355. pager: {
  5356. nextL: 'css;a.next.page-numbers',
  5357. pageE: 'css;div.post',
  5358. replaceE: 'css;.navigation',
  5359. scrollD: 1500
  5360. },
  5361. function: {
  5362. bF: src_bF,
  5363. bFp: [0, 'img[data-src]', 'data-src']
  5364. }
  5365. }, // DlAndroid
  5366. winhelponline: {
  5367. host: 'www.winhelponline.com',
  5368. functionS: ()=> {if (lp == '/blog/') {curSite = DBSite.winhelponline;}},
  5369. pager: {
  5370. nextL: 'css;span.prev > a',
  5371. pageE: 'css;#main > article',
  5372. replaceE: 'css;nav.paging-navigation',
  5373. scrollD: 2000
  5374. }
  5375. },
  5376. windowslatest: {
  5377. host: 'www.windowslatest.com',
  5378. pager: {
  5379. nextL: '//div[contains(@class, "page-nav")]/a[last()]',
  5380. pageE: 'css;.td-ss-main-content > div:not(.td-block-title-wrap):not(.page-nav)',
  5381. replaceE: 'css;.page-nav',
  5382. scrollD: 2000
  5383. }
  5384. },
  5385. thewindowsclub: {
  5386. host: 'www.thewindowsclub.com',
  5387. functionS: ()=> {curSite = DBSite.thewindowsclub; if (lp == '/') {curSite.pager.scrollD = 2000;}},
  5388. pager: {
  5389. nextL: 'css;li.pagination-next > a',
  5390. pageE: 'css;#genesis-content > article.post',
  5391. replaceE: 'css;.pagination',
  5392. scrollD: 1500
  5393. }
  5394. },
  5395. acs: {
  5396. host: ['pubs.acs.org','onlinelibrary.wiley.com'],
  5397. functionS: ()=> {if (indexOF('/doSearch')) {curSite = DBSite.acs;}},
  5398. pager: {
  5399. nextL: 'css;a.pagination__btn--next',
  5400. pageE: 'css;ul.items-results > *',
  5401. replaceE: 'css;.pagination',
  5402. scrollD: 3000
  5403. }
  5404. }, // Wiley Online Library + ACS (Publications)
  5405. libgen: {
  5406. host: /libgen/,
  5407. functionS: ()=> {if (lp == '/search.php') {curSite = DBSite.libgen;}},
  5408. pager: {
  5409. nextL: '//font/a[contains(text(), "►")]',
  5410. pageE: 'css;table[rules="rows"] > tbody > tr:nth-of-type(n+2), .paginator+script:not([src])',
  5411. insertP: ['css;table[rules="rows"] > tbody', 3],
  5412. replaceE: '//td[./font/a[contains(text(), "►")]]',
  5413. scriptT: 2,
  5414. scrollD: 2000
  5415. }
  5416. }, // Library Genesis
  5417. sciencedirect: {
  5418. host: 'www.sciencedirect.com',
  5419. functionS: ()=> {locationC = true; if (lp == '/search') {curSite = DBSite.sciencedirect; setTimeout(function(){insStyle('html, body {height: ' + (document.documentElement.scrollHeight || document.body.scrollHeight) + 'px;}')}, 2000)}},
  5420. style: 'footer {display: none !important;}',
  5421. iframe: true,
  5422. pager: {
  5423. type: 5,
  5424. nextL: 'css;a[data-aa-name="srp-next-page"]',
  5425. scrollD: 2000
  5426. }
  5427. }, // ScienceDirect
  5428. Z_Library: {
  5429. host: /(\dlib|b-ok\d?|booksc|z-lib)\./,
  5430. functionS: ()=> {if (indexOF('/s/')) {curSite = DBSite.Z_Library;}},
  5431. pager: {
  5432. nextL: '//div[@class="paginator"]//span/strong/parent::span/parent::td/following-sibling::td[1]//a',
  5433. pageE: 'id("searchResultBox")/div | //script[contains(string(), "pagerOptions")]',
  5434. insertP: ['css;#searchResultBox', 3],
  5435. replaceE: 'css;.paginator',
  5436. scriptT: 2,
  5437. scrollD: 2000
  5438. },
  5439. function: {
  5440. bF: src_bF,
  5441. bFp: [0, 'img[data-src]', 'data-src']
  5442. }
  5443. }, // Z-Library
  5444. pubmed: {
  5445. host: 'pubmed.ncbi.nlm.nih.gov',
  5446. pager: {
  5447. type: 2,
  5448. nextL: 'css;button.load-button.next-page',
  5449. nextText: 'Show more results',
  5450. scrollD: 1500
  5451. }
  5452. }, // PubMed
  5453. x_mol: {
  5454. host: 'www.x-mol.com',
  5455. functionS: ()=> {if (indexOF('/search/q') || indexOF('/paper/')) {curSite = DBSite.x_mol;}},
  5456. pager: {
  5457. nextL: ()=> getNextEP('css;.pagination li.active+li > a', 'pageIndex=', /pageIndex=\d+/),
  5458. pageE: 'css;.magazine-senior-search-results-list > ul > li, .magazine-model-content-new > ul > li',
  5459. insertP: ['css;.magazine-senior-search-results-list > ul, .magazine-model-content-new > ul', 3],
  5460. replaceE: 'css;.pagination',
  5461. scrollD: 2000
  5462. }
  5463. }, // X-MOL
  5464. cqvip: {
  5465. host: 'www.cqvip.com',
  5466. functionS: ()=> {if (indexOF('/search')) {curSite = DBSite.cqvip;}},
  5467. pager: {
  5468. type: 6,
  5469. nextL: '//ul[@class="pagenum"]//a[text()="下一页"]',
  5470. pageE: 'css;ul.prolist:last-child > li',
  5471. replaceE: 'css;ul.pagenum',
  5472. loadTime: 1000,
  5473. scrollD: 2000
  5474. }
  5475. }, // 维普网
  5476. ablesci: {
  5477. host: 'www.ablesci.com',
  5478. functionS: ()=> {if (indexOF('/detail') && GM_getValue('menu_thread')) {curSite = DBSite.ablesci_p;} else if (getCSS('ul.fly-list')) {curSite = DBSite.ablesci;}},
  5479. pager: {
  5480. nextL: 'css;li.next > a',
  5481. pageE: 'css;ul.fly-list > li',
  5482. replaceE: 'css;.pages',
  5483. scrollD: 2000
  5484. }
  5485. }, // 科研通
  5486. ablesci_p: {
  5487. pager: {
  5488. nextL: 'css;li.next > a',
  5489. pageE: 'css;ul#jieda > li',
  5490. replaceE: 'css;.pages',
  5491. scrollD: 2000
  5492. }
  5493. }, // 科研通 - 帖子内
  5494. coolkeyan: {
  5495. host: 'www.coolkeyan.com',
  5496. functionS: ()=> {if (location.hash.indexOf('/project/') > -1) curSite = DBSite.coolkeyan;},
  5497. style: '.q-img {height: auto !important;} .q-img__image {max-height: 1000px !important;} .row.q-my-sm.q-gutter-sm {display: none !important;}',
  5498. pager: {
  5499. type: 4,
  5500. nextL: coolkeyan_nextL,
  5501. insertP: ['//div[contains(@class, "q-img__image")][last()]', 4],
  5502. insertE: coolkeyan_insertE,
  5503. scrollD: 1500
  5504. }
  5505. }, // 酷科研
  5506. muchong: {
  5507. host: 'muchong.com',
  5508. functionS: ()=> {if (indexOF('/f-') || indexOF('search.php')) {
  5509. curSite = DBSite.muchong;
  5510. } else if (indexOF('/t-') && GM_getValue('menu_thread')) {
  5511. curSite = DBSite.muchong; curSite.pager.pageE = 'css;#maincontent > table > tbody:not(.header)'; curSite.pager.scrollD = 2000;
  5512. }},
  5513. style: 'tr.forum_head {display: none !important;}',
  5514. pager: {
  5515. nextL: '//div[contains(@class, "xmc_Pages")]//a[text()="下一页"]',
  5516. pageE: 'css;.forum_body table > tbody',
  5517. replaceE: 'css;.xmc_Pages',
  5518. scrollD: 1500
  5519. }
  5520. }, // 小木虫
  5521. google_scholar: {
  5522. host: 'scholar.google.com',
  5523. functionS: ()=> {if (lp == '/scholar') {curSite = DBSite.google_scholar;}},
  5524. pager: {
  5525. nextL: '//a[./span[contains(@class, "next")]]',
  5526. pageE: 'css;#gs_res_ccl_mid > *',
  5527. insertP: ['css;#gs_res_ccl_mid', 3],
  5528. replaceE: 'css;#gs_n',
  5529. scriptT: 1,
  5530. scrollD: 2000
  5531. }
  5532. }, // 谷歌学术
  5533. google_scholar_: {
  5534. host: 'sc.panda321.com',
  5535. pager: {
  5536. nextL: '//a[./span[contains(@class, "next")]]',
  5537. pageE: 'css;#gs_res_ccl_mid > *',
  5538. insertP: ['css;#gs_res_ccl_mid', 3],
  5539. replaceE: 'css;#gs_n',
  5540. scriptT: 1,
  5541. scrollD: 2000
  5542. },
  5543. function: {
  5544. bF: pageElems => {
  5545. getCSS('#gs_n').remove();
  5546. return pageElems
  5547. }
  5548. }
  5549. }, // 谷歌学术 - 其他镜像站
  5550. bing_academic: {
  5551. style: 'li.aca_algo_count {display: none !important;}',
  5552. pager: {
  5553. nextL: 'css;a.sb_pagN',
  5554. pageE: 'css;#b_results > li.aca_algo',
  5555. replaceE: 'css;#b_results .b_pag',
  5556. scrollD: 1000
  5557. }
  5558. }, // 必应学术
  5559. baidu_xueshu: {
  5560. host: 'xueshu.baidu.com',
  5561. functionS: ()=> {if (lp == '/s') {
  5562. curSite = DBSite.baidu_xueshu;
  5563. } else if (indexOF('journal/navigation')) {
  5564. curSite = DBSite.baidu_xueshu_journal;
  5565. } else if (indexOF('paper/show')) {
  5566. curSite = DBSite.baidu_xueshu_paper;
  5567. }},
  5568. pager: {
  5569. nextL: 'id("page")/a[./i[@class="c-icon-pager-next"]]',
  5570. pageE: 'css;#bdxs_result_lists > div.result',
  5571. replaceE: 'css;#page',
  5572. scrollD: 1000
  5573. }
  5574. }, // 百度学术
  5575. baidu_xueshu_journal: {
  5576. pager: {
  5577. nextL: 'css;a.res-page-next',
  5578. pageE: 'css;#journaldetail > div',
  5579. replaceE: 'css;.res-page',
  5580. scrollD: 1000
  5581. }
  5582. }, // 百度学术
  5583. baidu_xueshu_paper: {
  5584. pager: {
  5585. type: 2,
  5586. nextL: 'css;div:not([style*="display: none"]) > .more_btn',
  5587. nextText: '加载更多',
  5588. scrollD: 1000
  5589. }
  5590. }, // 百度学术
  5591. so_xueshu: {
  5592. host: 'xueshu.so.com',
  5593. functionS: ()=> {if (lp == '/s') {curSite = DBSite.so_xueshu;}},
  5594. pager: {
  5595. nextL: 'css;a#snext',
  5596. pageE: 'css;ul.list > li',
  5597. replaceE: 'css;#page',
  5598. scrollD: 1000
  5599. }
  5600. }, // 360 学术
  5601. wanfangdata: {
  5602. host: 's.wanfangdata.com.cn',
  5603. functionS: ()=> {locationC = true; curSite = DBSite.wanfangdata;},
  5604. style: '#zkFooter {display: none !important;}',
  5605. iframe: true,
  5606. pager: {
  5607. type: 5,
  5608. nextL: ()=> getNextEP('css;.pager.active+span.pager', 'p=', /p=\d+/),
  5609. scrollD: 2000
  5610. }
  5611. }, // 万方数据知识服务
  5612. nsfc: {
  5613. host: ['output.nsfc.gov.cn', 'kd.nsfc.gov.cn'],
  5614. functionS: ()=> {if (indexOF('/conclusionProject/')) curSite = DBSite.nsfc;},
  5615. style: '#pageNoUl {display: none !important;}',
  5616. pager: {
  5617. type: 4,
  5618. nextL: nsfc_nextL,
  5619. insertP: ['css;#pageNoUl', 1],
  5620. insertE: nsfc_insertE,
  5621. scrollD: 1500
  5622. }
  5623. }, // 国家自然科学基金
  5624. stackoverflow: {
  5625. host: 'stackoverflow.com',
  5626. functionS: ()=> {if (indexOF('/questions') && !indexOF(/\/questions\/\d+\//)) {
  5627. curSite = DBSite.stackoverflow;
  5628. } else if (lp == '/search') {
  5629. curSite = DBSite.stackoverflow_search;
  5630. } else if (lp == '/tags') {
  5631. curSite = DBSite.stackoverflow_tags;
  5632. } else if (lp == '/users') {
  5633. curSite = DBSite.stackoverflow_users;
  5634. }},
  5635. pager: {
  5636. nextL: 'css;a[rel="next"]',
  5637. pageE: 'css;#questions > div',
  5638. replaceE: 'css;.pager',
  5639. scrollD: 2000
  5640. }
  5641. }, // StackOverflow - Questions
  5642. stackoverflow_tags: {
  5643. pager: {
  5644. nextL: 'css;a[rel="next"]',
  5645. pageE: 'css;#tags-browser > div',
  5646. replaceE: 'css;.pager',
  5647. scrollD: 2000
  5648. }
  5649. }, // StackOverflow - Tags
  5650. stackoverflow_users: {
  5651. pager: {
  5652. nextL: 'css;a[rel="next"]',
  5653. pageE: 'css;#user-browser > div:first-child > div',
  5654. replaceE: 'css;.pager',
  5655. scrollD: 2000
  5656. }
  5657. }, // StackOverflow - Users
  5658. stackoverflow_search: {
  5659. pager: {
  5660. nextL: 'css;a[rel="next"]',
  5661. pageE: 'css;.js-search-results > div:first-child > div',
  5662. replaceE: 'css;.pager',
  5663. scrollD: 2000
  5664. }
  5665. }, // StackOverflow - Search
  5666. segmentfault: {
  5667. host: 'segmentfault.com',
  5668. functionS: ()=> {locationC = true;
  5669. if (indexOF('/questions')) {
  5670. curSite = DBSite.segmentfault;
  5671. } else if (lp == '/search') {
  5672. curSite = DBSite.segmentfault_search;
  5673. }},
  5674. pager: {
  5675. nextL: '//a[@class="page-link"][contains(text(), "下一页")]',
  5676. pageE: 'css;ul.list-group > li',
  5677. replaceE: 'css;ul.pagination',
  5678. scrollD: 1000
  5679. }
  5680. }, // SegmentFault - Questions
  5681. segmentfault_search: {
  5682. pager: {
  5683. nextL: 'css;a[rel="next"]',
  5684. pageE: 'css;.search-result > section',
  5685. replaceE: 'css;ul.pagination',
  5686. scrollD: 1000
  5687. }
  5688. }, // SegmentFault - Search
  5689. w3school_com_cn: {
  5690. host: 'www.w3school.com.cn',
  5691. functionS: ()=> {if (location.pathname.split('/').length > 2) {curSite = DBSite.w3school_com_cn;}},
  5692. style: '#maincontent h1:not(:nth-of-type(1)) {margin-top: 30px;}',
  5693. pager: {
  5694. type: 3,
  5695. nextL: ()=> { // 过滤部分非本页的参考手册
  5696. let next = getCSS('li.next > a[href]')
  5697. if (next && next.href.indexOf('/index.') === -1) return next.href;
  5698. curSite = {SiteTypeID: 0}; return ''
  5699. },
  5700. pageE: 'css;#maincontent > *:not([class*="prenextnav"]):not(#bpn):not(#tpn)',
  5701. insertP: ['id("bpn") | //div[contains(@class, "prenextnav")][last()]', 1],
  5702. replaceE: 'css;ul.prenext, #navsecond',
  5703. scrollE: 'id("bpn") | //div[contains(@class, "prenextnav")][last()]',
  5704. forceHTTPS: true,
  5705. scrollD: 600
  5706. }
  5707. }, // W3school
  5708. w3cschool_cn: {
  5709. host: 'www.w3cschool.cn',
  5710. functionS: ()=> {if (location.pathname.split('/').length > 2) {curSite = DBSite.w3cschool_cn;}},
  5711. style: '.widget-body, #rfbanner {display: none !important;}',
  5712. pager: {
  5713. nextL: 'css;.next-link > a',
  5714. pageE: 'css;#pro-mian-header, .content-bg',
  5715. replaceE: 'css;.content-links, .splitter-sidebar',
  5716. scrollD: 1500
  5717. }
  5718. }, // W3Cschool
  5719. runoob: {
  5720. host: 'www.runoob.com',
  5721. functionS: ()=> {if (location.pathname.split('/').length > 2 && getCSS('#leftcolumn')) {curSite = DBSite.runoob;}},
  5722. style: '#comments, #postcomments, #respond, #footer {display: none !important;} .article-intro h1:not(:nth-of-type(1)) {margin: 30px 0 10px 0;}',
  5723. pager: {
  5724. nextL: ()=> { // 过滤部分非本页的参考手册
  5725. let next = getCSS('#leftcolumn > a[style]~a[href]')
  5726. if (next && next.href.split('/').length === location.href.split('/').length && next.href.split('/')[3] === location.href.split('/')[3]) return next.href;
  5727. next.href = location.href; curSite = {SiteTypeID: 0}; return ''
  5728. },
  5729. pageE: 'css;#content > *, script[src*="assets/js/main.min.js"]',
  5730. insertP: ['css;#content', 3],
  5731. replaceE: 'css;.previous-next-links, #leftcolumn',
  5732. scriptT: 2,
  5733. forceHTTPS: true,
  5734. scrollD: 1000
  5735. }
  5736. }, // 菜鸟教程
  5737. cnblogs: {
  5738. host: ['www.cnblogs.com', 'zzk.cnblogs.com'],
  5739. functionS: ()=> {
  5740. if (location.hostname === 'zzk.cnblogs.com') {
  5741. curSite = DBSite.cnblogs_search;
  5742. } else if (getCSS('#post_list')) {
  5743. curSite = DBSite.cnblogs_list;
  5744. } else if (location.pathname.split('/').length === 3 && getCSS('.topicListFooter')) {
  5745. curSite = DBSite.cnblogs;
  5746. if (!getCSS('#homepage_top_pager')) {
  5747. getCSS('.forFlow').insertAdjacentHTML(getAddTo(2), '<div id="homepage_top_pager" class="topicListFooter"></div>');
  5748. getCSS('.forFlow').insertAdjacentHTML(getAddTo(3), '<div id="homepage_bottom_pager" class="topicListFooter"></div>');
  5749. }
  5750. }
  5751. },
  5752. pager: {
  5753. nextL: '//div[@class="topicListFooter"]//a[contains(text(), "下一页")]',
  5754. pageE: 'css;div.day',
  5755. replaceE: 'css;.topicListFooter',
  5756. scrollD: 1000
  5757. }
  5758. }, // 博客园 - 文章列表(个人)
  5759. cnblogs_list: {
  5760. pager: {
  5761. nextL: '//div[@class="pager"]//a[contains(text(), ">")]',
  5762. pageE: 'css;#post_list > article',
  5763. replaceE: 'css;.pager',
  5764. scrollD: 1000
  5765. }
  5766. }, // 博客园 - 文章列表
  5767. cnblogs_search: {
  5768. pager: {
  5769. nextL: '//div[@class="pager"]//a[contains(text(), ">")]',
  5770. pageE: 'css;div.searchItem',
  5771. replaceE: 'css;.pager',
  5772. scrollD: 1000
  5773. }
  5774. }, // 博客园 - 搜索页
  5775. gitee: {
  5776. host: 'gitee.com',
  5777. functionS: ()=> {
  5778. if (indexOF('/explore/')) {
  5779. curSite = DBSite.gitee;
  5780. } else if (indexOF(/\/issues$/)) {
  5781. curSite = DBSite.gitee_issues;
  5782. } else if (indexOF(/\/releases/)) {
  5783. curSite = DBSite.gitee_releases;
  5784. } else if (indexOF(/\/tags/)) {
  5785. curSite = DBSite.gitee_tags;
  5786. }
  5787. if (curSite.SiteTypeID > 0 && !curSite.pager.nextL) {
  5788. curSite.pager.type = 1;
  5789. curSite.pager.nextL = 'css;a[rel="next"]';
  5790. curSite.pager.replaceE = 'css;.pagination';
  5791. curSite.pager.scrollD = 2500;
  5792. }
  5793. },
  5794. pager: {
  5795. pageE: 'css;.items > .item',
  5796. }
  5797. }, // Gitee - Explore 列表
  5798. gitee_issues: {
  5799. pager: {
  5800. pageE: 'css;.issue-wrapper',
  5801. }
  5802. }, // Gitee - Issues 列表
  5803. gitee_releases: {
  5804. pager: {
  5805. pageE: 'css;.release-tag-item',
  5806. }
  5807. }, // Gitee - Releases 列表
  5808. gitee_tags: {
  5809. pager: {
  5810. pageE: 'css;.tag-item',
  5811. }
  5812. }, // Gitee - Tags 列表
  5813. gitee_search: {
  5814. host: 'search.gitee.com',
  5815. functionS: ()=> {if (location.search) curSite = DBSite.gitee_search;},
  5816. pager: {
  5817. nextL: 'css;li.next:not(.disabled) > a',
  5818. pageE: 'css;#hits-list > div',
  5819. replaceE: 'css;ul.pagination',
  5820. scrollD: 1000
  5821. }
  5822. }, // Gitee - Search 列表
  5823. github: {
  5824. host: ['github.com', 'hub.fastgit.org'],
  5825. functionS: ()=> {locationC = true;
  5826. if (lp == '/') {
  5827. curSite = DBSite.github;
  5828. } else if (indexOF('tab=stars', 's')) {
  5829. curSite = DBSite.github_star;
  5830. } else if (indexOF('tab=repositories', 's')) {
  5831. curSite = DBSite.github_repositories;
  5832. } else if (indexOF(/\/issues$/) || indexOF(/\/pulls$/)) {
  5833. curSite = DBSite.github_issues;
  5834. } else if (indexOF(/\/discussions$/) || indexOF('/discussions/categories')) {
  5835. curSite = DBSite.github_discussions;
  5836. } else if (indexOF(/\/releases$/)) {
  5837. curSite = DBSite.github_releases;
  5838. } else if (indexOF(/\/tags$/)) {
  5839. curSite = DBSite.github_tags;
  5840. } else if (indexOF('/commits')) {
  5841. curSite = DBSite.github_commits;
  5842. } else if (indexOF('/notifications')) {
  5843. curSite = DBSite.github_notifications;
  5844. } else if (indexOF('/search')) {
  5845. if (!location.search) return
  5846. if (!indexOF('type=', 's')) {
  5847. if (lp == '/search') {
  5848. curSite = DBSite.github_search_repositories;
  5849. } else {
  5850. curSite = DBSite.github_search_code;
  5851. }
  5852. } else {
  5853. curSite = DBSite['github_search_' + /type=[a-z]+/.exec(location.search.toLowerCase())[0].replace('type=','')];
  5854. }
  5855. if (curSite.SiteTypeID > 0 && !curSite.pager.nextL) {
  5856. curSite.pager.type = 1;
  5857. curSite.pager.nextL = 'css;a.next_page';
  5858. curSite.pager.replaceE = 'css;.pagination';
  5859. curSite.pager.scrollD = 3000;
  5860. }
  5861. }},
  5862. pager: {
  5863. type: 2,
  5864. nextL: 'css;.ajax-pagination-btn',
  5865. nextText: 'More',
  5866. scrollD: 2500
  5867. }
  5868. }, // Github - 首页
  5869. github_star: {
  5870. pager: {
  5871. nextL: '//div[@class="paginate-container"]//a[contains(text(), "Next")]',
  5872. pageE: 'css;#js-pjax-container .position-relative div[class^="col-lg-"] > div:not(.position-relative):not(.paginate-container)',
  5873. insertP: ['css;.paginate-container', 1],
  5874. replaceE: 'css;.paginate-container',
  5875. scrollD: 3000
  5876. }
  5877. }, // Github - 用户 Star 列表
  5878. github_repositories: {
  5879. pager: {
  5880. nextL: '//div[@class="paginate-container"]//a[contains(text(), "Next")]',
  5881. pageE: 'css;#user-repositories-list > ul > li',
  5882. replaceE: 'css;.paginate-container',
  5883. scrollD: 3000
  5884. }
  5885. }, // Github - 用户 项目 列表
  5886. github_issues: {
  5887. pager: {
  5888. nextL: 'css;a.next_page',
  5889. pageE: 'css;.js-navigation-container.js-active-navigation-container > div[id^="issue_"]',
  5890. replaceE: 'css;.pagination',
  5891. scrollD: 3000
  5892. }
  5893. }, // Github - Issues 列表 / PR 列表
  5894. github_discussions: {
  5895. pager: {
  5896. nextL: 'css;a.next_page',
  5897. pageE: 'css;ul[aria-labelledby="discussions-list"] > li',
  5898. replaceE: 'css;.pagination',
  5899. scrollD: 3000
  5900. }
  5901. }, // Github - Discussions 列表
  5902. github_releases: {
  5903. pager: {
  5904. nextL: 'css;a.next_page',
  5905. pageE: 'css;#repo-content-pjax-container > div[data-pjax] > div:not(.paginate-container)',
  5906. replaceE: 'css;.pagination',
  5907. scrollD: 3000
  5908. }
  5909. }, // Github - Releases 列表
  5910. github_tags: {
  5911. pager: {
  5912. nextL: '//div[@class="pagination"]/a[contains(text(), "Next")]',
  5913. pageE: 'css;.Box-body > div.Box-row',
  5914. replaceE: 'css;.pagination',
  5915. scrollD: 3000
  5916. }
  5917. }, // Github - Tags 列表
  5918. github_commits: {
  5919. pager: {
  5920. nextL: '//div[@class="paginate-container"]//a[contains(text(), "Older")]',
  5921. pageE: 'css;div.js-navigation-container > div',
  5922. replaceE: 'css;.paginate-container',
  5923. scrollD: 3000
  5924. }
  5925. }, // Github - Commits 列表
  5926. github_notifications: {
  5927. pager: {
  5928. nextL: 'css;nav.paginate-container > a[aria-label="Next"]',
  5929. pageE: 'css;li.notifications-list-item',
  5930. replaceE: 'css;nav.paginate-container, .js-notifications-list-paginator-counts',
  5931. scrollD: 3000
  5932. }
  5933. }, // Github - Notifications 列表
  5934. github_search_repositories: {
  5935. pager: {
  5936. pageE: 'css;ul.repo-list > li',
  5937. }
  5938. }, //Github - Search 列表
  5939. github_search_code: {
  5940. pager: {
  5941. pageE: 'css;.code-list-item',
  5942. }
  5943. }, // Github - Search 列表 - Code
  5944. github_search_commits: {
  5945. pager: {
  5946. pageE: 'css;#commit_search_results > div',
  5947. }
  5948. }, // Github - Search 列表 - Commit
  5949. github_search_issues: {
  5950. pager: {
  5951. pageE: 'css;.issue-list-item',
  5952. }
  5953. }, // Github - Search 列表 - Issues
  5954. github_search_discussions: {
  5955. pager: {
  5956. pageE: 'css;.discussion-list-item',
  5957. }
  5958. }, // Github - Search 列表 - Discussions
  5959. github_search_registrypackages: {
  5960. pager: {
  5961. pageE: 'css;#package_search_results > div',
  5962. }
  5963. }, // Github - Search 列表 - Package
  5964. github_search_marketplace: {
  5965. pager: {
  5966. pageE: 'css;#marketplace_search_results > div:first-child > div',
  5967. }
  5968. }, // Github - Search 列表 - Marketplace
  5969. github_search_topics: {
  5970. pager: {
  5971. pageE: 'css;.topic-list-item',
  5972. }
  5973. }, // Github - Search 列表 - Topics
  5974. github_search_wikis: {
  5975. pager: {
  5976. pageE: 'css;#wiki_search_results > div:first-child > div',
  5977. }
  5978. }, // Github - Search 列表 - wiki
  5979. github_search_users: {
  5980. pager: {
  5981. pageE: 'css;#user_search_results > div:first-child > div',
  5982. }
  5983. }, // Github - Search 列表 - user
  5984. oi_wiki: {
  5985. host: 'oi-wiki.org',
  5986. style: 'blockquote.page-copyright, h2#__comments, form#gitalk-form {display: none !important;} article.md-content__inner{min-height: 700px;}',
  5987. pager: {
  5988. nextL: 'css;li.md-nav__item.md-nav__item--active.md-nav__item--nested li.md-nav__item--active+li a',
  5989. pageE: 'css;article.md-content__inner',
  5990. insertP: ['css;article.md-content__inner', 6],
  5991. replaceE: 'css;.md-sidebar.md-sidebar--primary',
  5992. scrollD: 1300
  5993. }
  5994. }, // OI Wiki
  5995. guokr: {
  5996. host: 'www.guokr.com',
  5997. pager: {
  5998. type: 2,
  5999. nextL: 'css;div[class*="LoadMoreWrap"]',
  6000. interval: 1500,
  6001. scrollD: 1500
  6002. }
  6003. }, // 果壳网
  6004. landian: {
  6005. host: 'www.landian.vip',
  6006. functionS: ()=> {if (lp != '/' && !indexOF('/archives/') && !indexOF('/search/')) {curSite = DBSite.landian;}},
  6007. style: '.pagination {display: none !important;}',
  6008. pager: {
  6009. nextL: ()=> getNextUPN(/(?<=\/page\/)\d+/, /\/page\/\d+/, '/page/', '', '2', getCSS('.pagination > button.end').textContent),
  6010. pageE: 'css;.content li.color-border',
  6011. scrollD: 1500
  6012. }
  6013. }, // 蓝点网
  6014. kenengba: {
  6015. host: 'kenengba.com',
  6016. functionS: ()=> {if (lp == '/' || indexOF('/page/') || indexOF('/category/') || indexOF('/tag/')) {curSite = DBSite.kenengba;}},
  6017. pager: {
  6018. nextL: '//div[@class="pagebar"]/a[@href and text()=">>"]',
  6019. pageE: 'css;article.post',
  6020. replaceE: 'css;.pagebar',
  6021. scrollD: 3000
  6022. }
  6023. }, // 可能吧
  6024. expreview: {
  6025. host: 'www.expreview.com',
  6026. pager: {
  6027. type: 2,
  6028. nextL: 'css;#show_article_red_1SHOW',
  6029. interval: 1500,
  6030. scrollD: 1500
  6031. }
  6032. }, // 超能网
  6033. ithome: {
  6034. host: 'www.ithome.com',
  6035. pager: {
  6036. type: 2,
  6037. nextL: 'css;a.more',
  6038. interval: 1500,
  6039. scrollD: 1500
  6040. }
  6041. }, // IT之家
  6042. _36kr: {
  6043. host: ['36kr.com', 'www.36kr.com'],
  6044. functionS: ()=> {if (lp != '/' && !indexOF('/p/') && !indexOF('/newsflashes/')) {curSite = DBSite._36kr;}},
  6045. pager: {
  6046. type: 2,
  6047. nextL: 'css;.kr-loading-more-button.show',
  6048. nextText: '查看更多',
  6049. scrollD: 1500
  6050. }
  6051. }, // 36氪
  6052. _36kr_m: {
  6053. host: 'm.36kr.com',
  6054. pager: {
  6055. type: 2,
  6056. nextL: 'css;.kr-loading-more-button-default',
  6057. nextText: '查看更多',
  6058. scrollD: 1500
  6059. }
  6060. }, // 36氪 - 手机版
  6061. sciencealert: {
  6062. host: 'www.sciencealert.com',
  6063. pager: {
  6064. type: 2,
  6065. nextL: 'css;.load-more',
  6066. nextTextOf: 'LOAD MORE',
  6067. scrollD: 2000
  6068. }
  6069. }, // ScienceAlert
  6070. zhutix: {
  6071. host: 'zhutix.com',
  6072. functionS: ()=> {if (getCSS('#post-list')) {
  6073. curSite = DBSite.zhutix;
  6074. } else {
  6075. curSite = DBSite.zhutix_list;
  6076. }},
  6077. pager: {
  6078. nextL: '//li[@class="next-page"]/a | //div[@class="btn-pager"]/a[contains(text(), "❯")]',
  6079. pageE: 'css;#post-list > ul > li',
  6080. replaceE: 'css;.pagination, .b2-pagenav.post-nav',
  6081. scrollD: 1500
  6082. }
  6083. }, // 致美化
  6084. zhutix_list: {
  6085. pager: {
  6086. nextL: 'css;li.next-page a',
  6087. pageE: 'css;#primary-home > div:not(.pagination)',
  6088. replaceE: 'css;.pagination',
  6089. scrollD: 1500
  6090. }
  6091. }, // 致美化 - 文章列表
  6092. lanzou: {
  6093. host: /\.lanzou[a-z]\./,
  6094. hiddenPN: true,
  6095. pager: {
  6096. type: 2,
  6097. nextL: 'css;#filemore',
  6098. nextTextOf: '更多',
  6099. isHidden: true,
  6100. scrollD: 800
  6101. }
  6102. }, // 蓝奏云 - 分享链接列表
  6103. lanzou_: {
  6104. host: 'pc.woozooo.com',
  6105. iframe: true,
  6106. hiddenPN: true,
  6107. pager: {
  6108. type: 2,
  6109. nextL: 'css;#filemore > span[onclick]',
  6110. nextText: '显示更多文件',
  6111. isHidden: true,
  6112. scrollD: 800
  6113. }
  6114. }, // 蓝奏云 - 后台
  6115. alipanso: {
  6116. host: 'www.alipanso.com',
  6117. functionS: ()=> {if (lp == '/search.html') {curSite = DBSite.alipanso;}},
  6118. style: '.pager-wrap {display: none !important;}',
  6119. pager: {
  6120. nextL: ()=> getNextUP('page=', /page=\d+/),
  6121. pageE: 'css;#res_list > div',
  6122. scrollD: 2000
  6123. }
  6124. }, // 阿里盘搜
  6125. wikihow: {
  6126. host: ['www.wikihow.com', 'zh.wikihow.com'],
  6127. functionS: ()=> {if (indexOF('/Category:')) {
  6128. curSite = DBSite.wikihow;
  6129. } else if (indexOF('/wikiHowTo') && indexOF('?search=', 's')) {
  6130. curSite = DBSite.wikihow_search;
  6131. }},
  6132. pager: {
  6133. nextL: 'css;a.pag_next',
  6134. pageE: 'css;#cat_all > .cat_grid > div',
  6135. replaceE: 'css;#large_pagination',
  6136. scriptT: 3,
  6137. scrollD: 2000
  6138. }
  6139. }, // 指南
  6140. wikihow_search: {
  6141. pager: {
  6142. nextL: 'css;#searchresults_footer > a.buttonright',
  6143. pageE: 'css;#searchresults_list > a',
  6144. replaceE: 'css;#searchresults_footer',
  6145. scrollD: 3000
  6146. }
  6147. }, // 指南 - 搜索页
  6148. afreecatv: {
  6149. host: 'www.afreecatv.com',
  6150. pager: {
  6151. type: 2,
  6152. nextL: 'css;.btn-more > button',
  6153. interval: 2000,
  6154. scrollD: 1000
  6155. }
  6156. }, // 直播
  6157. greasyfork: {
  6158. host: 'greasyfork.org',
  6159. functionS: ()=> {if (indexOF(/\/scripts$/) || indexOF('/scripts/by-site/')) {
  6160. curSite = DBSite.greasyfork;
  6161. } else if (indexOF(/\/feedback$/)) {
  6162. curSite = DBSite.greasyfork_feedback;
  6163. } else if (indexOF('/discussions') && !indexOF(/\/\d+/)) {
  6164. curSite = DBSite.greasyfork_discussions;
  6165. }},
  6166. pager: {
  6167. nextL: 'css;a.next_page',
  6168. pageE: 'css;ol#browse-script-list > li',
  6169. replaceE: 'css;.pagination',
  6170. scrollD: 1300
  6171. }
  6172. }, // GreasyFork
  6173. greasyfork_feedback: {
  6174. pager: {
  6175. nextL: 'css;a.next_page',
  6176. pageE: 'css;.script-discussion-list > div',
  6177. replaceE: 'css;.pagination',
  6178. scrollD: 1800
  6179. }
  6180. }, // GreasyFork - 反馈页
  6181. greasyfork_discussions: {
  6182. pager: {
  6183. nextL: 'css;a.next_page',
  6184. pageE: 'css;.discussion-list > div',
  6185. replaceE: 'css;.pagination',
  6186. scrollD: 1300
  6187. }
  6188. }, // GreasyFork - 讨论页
  6189. userscript: {
  6190. host: 'www.userscript.zone',
  6191. functionS: ()=> {if (lp == '/search') {curSite = DBSite.userscript;}},
  6192. pager: {
  6193. nextL: ()=> getNextF('css;.next > form'),
  6194. pageE: 'css;.row.script',
  6195. replaceE: 'css;.pagination',
  6196. scrollD: 1000
  6197. }
  6198. }, // UserScript
  6199. userstyles: {
  6200. host: 'userstyles.world',
  6201. functionS: ()=> {if (lp == '/explore') {curSite = DBSite.userstyles;}},
  6202. pager: {
  6203. nextL: 'css;a.Pagination-button.next',
  6204. pageE: 'css;.card',
  6205. replaceE: 'css;.Pagination',
  6206. scrollD: 1500
  6207. }
  6208. }, // UserStyles
  6209. getquicker: {
  6210. host: 'getquicker.net',
  6211. functionS: ()=> {if (indexOF('/Share/')) {curSite = DBSite.getquicker;}},
  6212. pager: {
  6213. nextL: '//a[@class="page-link" and text()="下一页"]',
  6214. pageE: 'css;table.table > tbody > tr:not(:first-child), script[src^="/js/site.js"]',
  6215. insertP: ['css;table.table > tbody', 3],
  6216. replaceE: 'css;ul.pagination',
  6217. scriptT: 2,
  6218. scrollD: 1000
  6219. }
  6220. }, // Quicker
  6221. xposed: {
  6222. host: 'repo.xposed.info',
  6223. functionS: ()=> {if (lp == '/module-overview') {curSite = DBSite.xposed;}},
  6224. pager: {
  6225. nextL: 'css;li.pager-next > a',
  6226. pageE: 'css;.view-content > table > tbody > tr',
  6227. replaceE: 'css;ul.pager',
  6228. scrollD: 1500
  6229. }
  6230. }, // Xposed
  6231. bookmarkearth: {
  6232. host: 'www.bookmarkearth.com',
  6233. functionS: ()=> {if (lp == '/' || lp == '/page') {
  6234. curSite = DBSite.bookmarkearth;
  6235. } else if (lp == '/s/search') {
  6236. curSite = DBSite.bookmarkearth_search;
  6237. }},
  6238. pager: {
  6239. nextL: ()=> getNextUP('currentPage=', /currentPage=\d+/, '/page', '2', getCSS('ul.pager').dataset.totalpage),
  6240. pageE: 'css;.document-piece',
  6241. replaceE: 'css;ul.pager',
  6242. scrollD: 1000
  6243. }
  6244. }, // 书签地球
  6245. bookmarkearth_search: {
  6246. pager: {
  6247. nextL: ()=> getNextEP('css;a.cut-page-item.active+a.cut-page-item', 'currentPage=', /currentPage=\d+/),
  6248. pageE: 'css;.document-piece',
  6249. replaceE: 'css;.cut-page',
  6250. scrollD: 1000
  6251. }
  6252. }, // 书签地球 - 搜索页
  6253. smzdm: {
  6254. host: ['www.smzdm.com', 'search.smzdm.com'],
  6255. functionS: ()=> {if (location.hostname === 'search.smzdm.com' || indexOF('/fenlei/') || indexOF(/\/mall\/.+\/.+/)) {curSite = DBSite.smzdm;}},
  6256. pager: {
  6257. nextL: '//ul[@class="pagenation-list"]//a[contains(text() ,"下一页")] | //ul[@class="pagenation-list"]/li[contains(@class, "next-page")]/a',
  6258. pageE: 'css;#feed-main-list > li',
  6259. replaceE: 'css;ul.pagenation-list',
  6260. scrollD: 1500
  6261. }
  6262. }, // 什么值得买 - 分类/搜索页
  6263. meidebi: {
  6264. host: 'www.meidebi.com',
  6265. functionS: ()=> {if (indexOF('/fenlei/') || lp == '/Search') {
  6266. curSite = DBSite.meidebi;
  6267. }},
  6268. pager: {
  6269. nextL: 'css;a.next',
  6270. pageE: 'css;.share-list > ul > li',
  6271. replaceE: 'css;.h-pages',
  6272. scrollD: 1500
  6273. }
  6274. }, // 没得比 - 分类/搜索页
  6275. ruyile_xuexiao: {
  6276. host: 'www.ruyile.com',
  6277. functionS: ()=> {
  6278. if (lp == '/xuexiao/') {
  6279. curSite = DBSite.ruyile_xuexiao;
  6280. } else if (lp == '/data/') {
  6281. curSite = DBSite.ruyile_data;
  6282. } else if (lp == '/shijuan/') {
  6283. curSite = DBSite.ruyile_shijuan;
  6284. }},
  6285. pager: {
  6286. nextL: '//div[@class="fy"]/a[contains(text(), "下一页")]',
  6287. pageE: 'css;.xxlb > .sk',
  6288. insertP: ['css;.xxlb', 3],
  6289. replaceE: 'css;.fy',
  6290. scrollD: 1000
  6291. }
  6292. }, // 如意了教育 - 学校
  6293. ruyile_data: {
  6294. pager: {
  6295. nextL: '//div[@class="fy"]/a[contains(text(), "下一页")]',
  6296. pageE: 'css;.m1_z > .lbk',
  6297. insertP: ['css;.page', 1],
  6298. replaceE: 'css;.fy',
  6299. scrollD: 1000
  6300. }
  6301. }, // 如意了教育 - 数据
  6302. ruyile_shijuan: {
  6303. pager: {
  6304. nextL: '//div[@class="fy"]/a[contains(text(), "下一页")]',
  6305. pageE: 'css;.m1_z > .m2_lb',
  6306. insertP: ['css;.page', 1],
  6307. replaceE: 'css;.fy',
  6308. scrollD: 1000
  6309. }
  6310. }, // 如意了教育 - 试卷
  6311. koolearn: {
  6312. host: 'cet4.koolearn.com',
  6313. pager: {
  6314. nextL: 'id("page")/a[text()="下一页"]',
  6315. pageE: 'css;ul.xqy_entry_list > li,.xqy_core_text > p:not([style="text-align:center"])',
  6316. insertP: ['css;ul.xqy_entry_list,.xqy_core_text', 3],
  6317. replaceE: 'css;#page',
  6318. scrollD: 2500
  6319. }
  6320. }, // 新东方在线
  6321. che168: {
  6322. host: 'www.che168.com',
  6323. functionS: ()=> {
  6324. if (location.pathname != '/' && !indexOF('/dealer/')) {
  6325. curSite = DBSite.che168;
  6326. }},
  6327. pager: {
  6328. nextL: 'css;a.page-item-next',
  6329. pageE: 'css;ul.viewlist_ul > li',
  6330. replaceE: 'css;.page',
  6331. scrollD: 2000
  6332. }
  6333. }, // 二手车之家
  6334. jiligamefun: {
  6335. host: 'www.jiligamefun.com',
  6336. functionS: ()=> {if (indexOF('/category/')) {curSite = DBSite.jiligamefun;}},
  6337. pager: {
  6338. nextL: 'css;a.poi-pager__item.poi-pager__item_next',
  6339. pageE: 'css;.inn-archive__container > article',
  6340. replaceE: 'css;.poi-pager',
  6341. scrollD: 1800
  6342. }
  6343. }, // 叽哩叽哩日报
  6344. wendangku: {
  6345. host: 'www.wendangku.net',
  6346. functionS: ()=> {if (indexOF('/doc/')) {curSite = DBSite.wendangku;}},
  6347. pager: {
  6348. nextL: 'css;a.next',
  6349. pageE: 'css;#contents > *:not(.pages)',
  6350. replaceE: 'css;.pages',
  6351. scrollD: 1800
  6352. }
  6353. }, // 文档库
  6354. oshwhub: {
  6355. host: 'www.oshwhub.com',
  6356. functionS: ()=> {if (lp == '/explore') {curSite = DBSite.oshwhub;}},
  6357. pager: {
  6358. nextL: 'css;a.current+a',
  6359. pageE: 'css;.each-project',
  6360. replaceE: 'css;.page',
  6361. scriptT: 0,
  6362. scrollD: 1200
  6363. }
  6364. }, // 立创开源硬件平台
  6365. netbian: {
  6366. host: 'pic.netbian.com',
  6367. style: 'li.nextpage {display: none !important;}',
  6368. pager: {
  6369. nextL: '//div[@class="page"]/a[contains(text(),"下一页")]',
  6370. pageE: 'css;.slist ul > li:not(.nextpage)',
  6371. replaceE: 'css;.page',
  6372. scrollD: 1000
  6373. }
  6374. }, // 彼岸图网
  6375. ioliu: {
  6376. host: 'bing.ioliu.cn',
  6377. functionS: ()=> {if (!indexOF('/photo/') && !indexOF('.html')) {curSite = DBSite.ioliu; document.head.appendChild(document.createElement('base')).target = '_blank';}},
  6378. style: '.progressive--not-loaded {filter: none !important;}',
  6379. pager: {
  6380. nextL: '//div[@class="page"]/a[contains(text(), "下一页")]',
  6381. pageE: 'css;body > .container > div.item',
  6382. replaceE: 'css;.page',
  6383. scrollD: 1000
  6384. }
  6385. }, // 必应壁纸
  6386. konachan: {
  6387. host: 'konachan.net',
  6388. functionS: ()=> {if (indexOF('/post')) {curSite = DBSite.konachan; document.head.appendChild(document.createElement('base')).target = '_blank';}},
  6389. 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;}',
  6390. pager: {
  6391. nextL: 'css;a.next_page',
  6392. pageE: 'css;ul#post-list-posts > li',
  6393. replaceE: 'css;#paginator',
  6394. scrollD: 1000
  6395. }
  6396. }, // 动漫壁纸
  6397. nastol: {
  6398. host: 'www.nastol.com.ua',
  6399. pager: {
  6400. nextL: '//a[./span[@class="nav-next"]]',
  6401. pageE: 'css;#dle-content > div',
  6402. replaceE: 'css;.navigation',
  6403. scrollD: 1000
  6404. }
  6405. }, // 壁纸
  6406. hdqwalls: {
  6407. host: 'hdqwalls.com',
  6408. pager: {
  6409. nextL: 'css;a#next',
  6410. pageE: 'css;.wallpapers_container > div.wall-resp',
  6411. replaceE: 'css;ul.pagination',
  6412. scrollD: 1000
  6413. }
  6414. }, // 壁纸
  6415. xinpianchang: {
  6416. host: 'www.xinpianchang.com',
  6417. style: '.lazy-img {opacity: 1 !important;}',
  6418. pager: {
  6419. nextL: 'css;.page > a[title="下一页"]',
  6420. pageE: 'css;div[class*="-container"] div[class*="-con"] > ul > li, div[class*="-container"] div[class*="-con"] > div[class*="-wrap"] > ul > li',
  6421. insertP: ['css;div[class*="-container"] div[class*="-con"] > ul, div[class*="-container"] div[class*="-con"] > div[class*="-wrap"] > ul', 3],
  6422. replaceE: 'css;.page',
  6423. scrollD: 2000
  6424. },
  6425. function: {
  6426. bF: src_bF,
  6427. bFp: [0, 'img[_src]', '_src']
  6428. }
  6429. }, // 新片场
  6430. tujigu: {
  6431. host: ['www.tuji001.com', 'www.tujigu.net'],
  6432. functionS: ()=> {
  6433. if (indexOF('/a/')) {
  6434. curSite = DBSite.tujigu;
  6435. } else if (location.pathname != '/' && !indexOF('/search/')) {
  6436. curSite = DBSite.tujigu_list;
  6437. }},
  6438. style: '.content img {display: block !important;}',
  6439. pager: {
  6440. nextL: 'id("pages")/a[contains(text(), "下一页")]',
  6441. pageE: 'css;.content > img',
  6442. replaceE: 'css;#pages',
  6443. scrollD: 2000
  6444. }
  6445. }, // tujigu - 图片页
  6446. tujigu_list: {
  6447. pager: {
  6448. nextL: 'id("pages")/a[contains(text(), "下一页")]',
  6449. pageE: 'css;.hezi > ul > li',
  6450. insertP: ['//div[@class="hezi"][last()]/ul', 3],
  6451. replaceE: 'css;#pages',
  6452. scrollD: 1000
  6453. }
  6454. }, // tujigu - 分类页
  6455. mvtui: {
  6456. host: 'mvtui.com',
  6457. functionS: ()=> {if (indexOF('.html')) {curSite = DBSite.mvtui;} else {curSite = DBSite.mvtui_list;}},
  6458. pager: {
  6459. nextL: 'css;.article-paging span.current+a',
  6460. pageE: 'css;.article-content > p',
  6461. replaceE: 'css;.article-paging',
  6462. scrollD: 3000
  6463. }
  6464. }, // mvtui - 图片页
  6465. mvtui_list: {
  6466. pager: {
  6467. nextL: 'css;li.next-page a',
  6468. pageE: 'css;#posts > div',
  6469. replaceE: 'css;.pagination',
  6470. scrollD: 1500
  6471. },
  6472. function: {
  6473. bF: src_bF,
  6474. bFp: [0, 'img[data-src]', 'data-src']
  6475. }
  6476. }, // mvtui - 分类页
  6477. mzitu: {
  6478. host: 'www.mzitu.com',
  6479. functionS: ()=> {if (indexOF(/\/\d+/)) {curSite = DBSite.mzitu;getCSS('.main-image a[href]').href = 'javascript:void(0);'} else {curSite = DBSite.mzitu_list;}},
  6480. pager: {
  6481. nextL: '//div[@class="pagenavi"]/a[contains(string(), "下一页")]',
  6482. pageE: 'css;.main-image img',
  6483. replaceE: 'css;.pagenavi',
  6484. scrollD: 1500
  6485. }
  6486. }, // mzitu - 图片页
  6487. mzitu_list: {
  6488. pager: {
  6489. nextL: 'css;.next.page-numbers',
  6490. pageE: 'css;.postlist > ul > li',
  6491. replaceE: 'css;.pagination',
  6492. scrollD: 1000
  6493. },
  6494. function: {
  6495. bF: src_bF,
  6496. bFp: [0, 'img[data-original]', 'data-original']
  6497. }
  6498. }, // mzitu - 分类/搜索页
  6499. xiurenji: {
  6500. host: /\.xiuren[a-z]+\./,
  6501. functionS: ()=> {insStyle('img[src$=".gif"]:not([src*="logo"]) {display: none !important;}');
  6502. if (indexOF('.html') && !indexOF('/index')) {
  6503. curSite = DBSite.xiurenji;
  6504. } else if (indexOF('search')) {
  6505. curSite = DBSite.xiurenji_search;
  6506. } else {
  6507. curSite = DBSite.xiurenji_list;
  6508. }},
  6509. pager: {
  6510. nextL: '//div[@class="page"]/a[text()="下页"]',
  6511. pageE: 'css;div.content > p > *',
  6512. replaceE: 'css;.page',
  6513. scrollD: 1500
  6514. }
  6515. }, // xiurenji - 图片页
  6516. xiurenji_list: {
  6517. pager: {
  6518. nextL: '//div[@class="page"]/a[text()="下页"]',
  6519. pageE: 'css;li.i_list',
  6520. replaceE: 'css;.page',
  6521. scrollD: 1000
  6522. }
  6523. }, // xiurenji - 分类页
  6524. xiurenji_search: {
  6525. pager: {
  6526. nextL: 'css;.page > a.current+a',
  6527. pageE: 'css;.node > *',
  6528. replaceE: 'css;.page',
  6529. scrollD: 700
  6530. }
  6531. }, // xiurenji - 搜索页
  6532. jpxgmn: {
  6533. host: 'www.jpxgyw.net',
  6534. functionS: ()=> {
  6535. if (indexOF('.html')) {
  6536. curSite = DBSite.jpxgmn;
  6537. } else if (lp != '/' && indexOF('/search/')) {
  6538. curSite = DBSite.jpxgmn; curSite.pager.pageE = 'css;.related_posts > ul';
  6539. }},
  6540. pager: {
  6541. nextL: 'css;.pagination a.current+a',
  6542. pageE: 'css;.article-content img',
  6543. replaceE: 'css;.pagination',
  6544. interval: 500,
  6545. scrollD: 2000
  6546. }
  6547. }, // jpxgmn
  6548. tvv: {
  6549. host: /\.tvv\.tw/,
  6550. functionS: ()=> {if (lp == '/' || indexOF('/page/') || indexOF('/category/')) {curSite = DBSite.tvv;}},
  6551. 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;}',
  6552. pager: {
  6553. nextL: 'css;a.next',
  6554. pageE: 'css;.blog-listing',
  6555. replaceE: 'css;.pagination',
  6556. scrollD: 2000
  6557. }
  6558. }, // tvv
  6559. mm131: {
  6560. host: ['www.mm131.net', 'www.mmm131.com'],
  6561. functionS: ()=> {if (indexOF('.html')) {curSite = DBSite.mm131;} else {curSite = DBSite.mm131_list;}},
  6562. retry: 300,
  6563. pager: {
  6564. nextL: '//div[@class="content-page"]/a[contains(text(), "下一页")]',
  6565. pageE: 'css;.content-pic img',
  6566. replaceE: 'css;.content-page',
  6567. scrollD: 2000
  6568. }
  6569. }, // MM131 - 图片页
  6570. mm131_list: {
  6571. pager: {
  6572. nextL: '//dd[@class="page"]/a[contains(text(), "下一页")]',
  6573. pageE: 'css;dl.list-left > dd:not([class="page"])',
  6574. replaceE: 'css;.page',
  6575. scrollD: 1000
  6576. }
  6577. }, // MM131 - 分类页
  6578. mm131_m: {
  6579. host: 'm.mmm131.com',
  6580. 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;}},
  6581. retry: true,
  6582. pager: {
  6583. nextL: '//div[@class="paging"]/a[text()="下一张" or text()="下一页"]',
  6584. pageE: 'css;.post-content img',
  6585. replaceE: 'css;.paging',
  6586. scrollD: 2000
  6587. }
  6588. }, // MM131 - 手机版 - 图片页
  6589. mm131_m_list: {
  6590. pager: {
  6591. nextL: 'css;#xbtn',
  6592. pageE: 'css;#content > article',
  6593. replaceE: 'css;#webpage',
  6594. scrollD: 2000
  6595. },
  6596. function: {
  6597. bF: src_bF,
  6598. bFp: [0, 'img[data-img]', 'data-img']
  6599. }
  6600. }, // MM131 - 手机版 - 分类页
  6601. mm131_m_: {
  6602. pager: {
  6603. type: 2,
  6604. nextL: 'css;#webpage>span[onclick]',
  6605. isHidden: true,
  6606. interval: 500,
  6607. scrollD: 2000
  6608. }
  6609. }, // MM131 - 手机版 - 首页
  6610. mrcong: {
  6611. host: 'mrcong.com',
  6612. functionS: ()=> {if (lp == '/' || indexOF('/tag/')) {curSite = DBSite.mrcong_list;} else {curSite = DBSite.mrcong;}},
  6613. pager: {
  6614. nextL: 'css;.post-page-numbers.current+a.post-page-numbers',
  6615. pageE: 'css;#fukie2 > p > img',
  6616. replaceE: 'css;.page-link',
  6617. scrollD: 3000
  6618. }
  6619. }, // MrCong - 图片页
  6620. mrcong_list: {
  6621. pager: {
  6622. type: 3,
  6623. nextL: 'css;.current+a.page',
  6624. pageE: 'css;article.item-list',
  6625. scrollE: 'css;.pagination',
  6626. replaceE: 'css;.pagination',
  6627. scrollD: 2000
  6628. }
  6629. }, // MrCong - 分类页
  6630. buondua: {
  6631. host: 'buondua.com',
  6632. functionS: ()=> {if (indexOF(/-photos-\d+/)) {curSite = DBSite.buondua;} else {curSite = DBSite.buondua_list;}},
  6633. pager: {
  6634. type: 3,
  6635. nextL: '//nav[@class="pagination"]//span[./a[contains(@class, "is-current")]]/following-sibling::span[1]/a',
  6636. pageE: 'css;.article-fulltext > p',
  6637. scrollE: 'css;nav.pagination',
  6638. replaceE: 'css;nav.pagination',
  6639. scrollD: 1500
  6640. },
  6641. function: {
  6642. bF: src_bF,
  6643. bFp: [0, 'img[data-src]', 'data-src']
  6644. }
  6645. }, // Buon Dua - 图片页
  6646. buondua_list: {
  6647. pager: {
  6648. type: 3,
  6649. nextL: 'css;.pagination-next',
  6650. pageE: 'css;.items-row.column, .collection-item.column',
  6651. scrollE: 'css;nav.pagination',
  6652. replaceE: 'css;nav.pagination',
  6653. scrollD: 1200
  6654. },
  6655. function: {
  6656. bF: src_bF,
  6657. bFp: [0, 'img[data-src]', 'data-src']
  6658. }
  6659. }, // Buon Dua - 分类页
  6660. fnvshen: {
  6661. host: 'www.fnvshen.com',
  6662. functionS: ()=> {
  6663. if (indexOF('/gallery/') || indexOF('/tag/')) {
  6664. curSite = DBSite.fnvshen_list;
  6665. } else if (indexOF('/g/')) {
  6666. curSite = DBSite.fnvshen;
  6667. } else if (indexOF(/\/article\/\d+\//)) {
  6668. curSite = DBSite.fnvshen_article;
  6669. } else if (indexOF('/article/')) {
  6670. curSite = DBSite.fnvshen_article_list;
  6671. }},
  6672. pager: {
  6673. nextL: 'css;#pages > span +a:not(.a1)',
  6674. pageE: 'css;#hgallery > img',
  6675. replaceE: 'css;#pages',
  6676. scrollD: 1500
  6677. }
  6678. }, // fnvshen - 图片页
  6679. fnvshen_list: {
  6680. style: '.yalayi_box {display: none !important; margin: -4px 0 !important;}',
  6681. pager: {
  6682. nextL: '//div[@class="pagesYY"]//a[contains(text(), "下一页")]',
  6683. pageE: 'css;#listdiv > ul > li',
  6684. replaceE: 'css;.pagesYY',
  6685. scrollD: 1000
  6686. },
  6687. function: {
  6688. bF: src_bF,
  6689. bFp: [0, 'img[data-original]', 'data-original']
  6690. }
  6691. }, // fnvshen - 分类页
  6692. fnvshen_article_list: {
  6693. pager: {
  6694. nextL: '//div[@class="pagesYY"]//a[contains(text(), "下一页")]',
  6695. pageE: 'css;li.other_girlli',
  6696. replaceE: 'css;.pagesYY',
  6697. scrollD: 1000
  6698. }
  6699. }, //fnvshen - 文章列表
  6700. fnvshen_article: {
  6701. pager: {
  6702. nextL: 'css;.pagesYY a.cur+a',
  6703. pageE: 'css;#articleDiv',
  6704. insertP: ['css;#articleDiv', 6],
  6705. replaceE: 'css;.pagesYY',
  6706. scrollD: 1000
  6707. }
  6708. }, // fnvshen - 文章内
  6709. nvshen: {
  6710. host: 'www.99nvshen.com',
  6711. functionS: ()=> {
  6712. if (indexOF('/galleryList/') || indexOF('/modelList/')) {
  6713. curSite = DBSite.nvshen; curSite.pager.pageE = 'css;.book-list > div.col-sm-4';
  6714. } else if (indexOF('/gallery/')) {
  6715. curSite = DBSite.nvshen; curSite.pager.interval = 1500; curSite.pager.scrollD = 2500;
  6716. }},
  6717. pager: {
  6718. nextL: 'css;ul.pagination a[aria-label="Next"]',
  6719. pageE: 'css;a.gallery-detail-img',
  6720. replaceE: 'css;ul.pagination',
  6721. scrollD: 1500
  6722. }
  6723. }, // nvshen
  6724. xrmn5: {
  6725. host: 'www.xrmn5.cc',
  6726. functionS: ()=> {if (indexOF(/\d+\.html/)) {
  6727. curSite = DBSite.xrmn5;
  6728. } else if (indexOF('/search')) {
  6729. curSite = DBSite.xrmn5_search;
  6730. } else {
  6731. curSite = DBSite.xrmn5_list;
  6732. }},
  6733. pager: {
  6734. nextL: '//div[contains(@class, "page")]//a[contains(text(), "下页")]',
  6735. pageE: 'css;.content_left > p > img',
  6736. replaceE: 'css;.page',
  6737. scrollD: 3000
  6738. }
  6739. }, // xrmn5 - 图片页
  6740. xrmn5_list: {
  6741. pager: {
  6742. nextL: '//div[contains(@class, "page")]//a[contains(text(), "下页")]',
  6743. pageE: 'css;ul.update_area_lists > li',
  6744. replaceE: 'css;.page',
  6745. scrollD: 2000
  6746. }
  6747. }, // xrmn5 - 分类页
  6748. xrmn5_search: {
  6749. pager: {
  6750. nextL: 'css;.page a.current+a',
  6751. pageE: 'css;div.sousuo',
  6752. replaceE: 'css;.page',
  6753. scrollD: 2000
  6754. }
  6755. }, // xrmn5 - 搜索页
  6756. jpmn8: {
  6757. host: 'www.jpmn8.com',
  6758. functionS: ()=> {if (indexOF(/\/\d+\.html/)) {curSite = DBSite.jpmn8;} else if (location.pathname != '/') {curSite = DBSite.jpmn8_list;}},
  6759. style: 'img[onload] {min-height: 500px;}',
  6760. pager: {
  6761. nextL: '//div[@class="pagination1"]//a[text()="下一页"]',
  6762. pageE: 'css;img[onload]',
  6763. replaceE: 'css;.pagination1',
  6764. scrollD: 3000
  6765. }
  6766. }, // jpmn8 - 图片页
  6767. jpmn8_list: {
  6768. pager: {
  6769. nextL: '//div[@class="pagination1"]//a[text()="下一页"]',
  6770. pageE: 'css;article.excerpt',
  6771. replaceE: 'css;.pagination1',
  6772. scrollD: 1500
  6773. }
  6774. }, // jpmn8 - 分类页
  6775. ku66: {
  6776. host: 'www.ku66.net',
  6777. functionS: ()=> {if (/\/\d+\.html/.test(location.pathname)) {curSite = DBSite.ku66;} else {curSite = DBSite.ku66_list;}},
  6778. style: '.content img {min-height: 500px;}',
  6779. pager: {
  6780. nextL: '//div[@class="NewPages"]//a[text()="下一页"]',
  6781. pageE: 'css;.content > img',
  6782. insertP: ['css;.content', 3],
  6783. replaceE: 'css;.NewPages',
  6784. scrollD: 4000
  6785. }
  6786. }, // ku66 - 图片页
  6787. ku66_list: {
  6788. pager: {
  6789. nextL: '//div[@class="NewPages"]//a[text()="下一页"]',
  6790. pageE: 'css;.TypeList > ul > li',
  6791. insertP: ['css;.TypeList > ul', 3],
  6792. replaceE: 'css;.NewPages',
  6793. scrollD: 1000
  6794. }
  6795. }, // ku66 - 分类页
  6796. ku66_m: {
  6797. host: 'm.ku66.net',
  6798. functionS: ()=> {if (/\/\d+\.html/.test(location.pathname)) {curSite = DBSite.ku66_m;} else {curSite = DBSite.ku66_m_list;}},
  6799. style: '.ArticleImageBox img {min-height: 200px;}',
  6800. pager: {
  6801. nextL: '//div[@class="article_page"]//a[text()="下一页"]',
  6802. pageE: 'css;.ArticleImageBox > *',
  6803. replaceE: 'css;.article_page',
  6804. scrollD: 4000
  6805. }
  6806. }, // ku66 - 手机版 - 图片页
  6807. ku66_m_list: {
  6808. pager: {
  6809. nextL: '//div[@class="article_page"]//a[text()="下一页"]',
  6810. pageE: 'css;.PictureList > ul > li',
  6811. replaceE: 'css;.article_page',
  6812. scrollD: 1000
  6813. }
  6814. }, // ku66 - 手机版 - 分类页
  6815. ku137: {
  6816. host: 'www.ku137.net',
  6817. functionS: ()=> {if (indexOF(/\/\d+\.html/)) {curSite = DBSite.ku137;} else if (location.pathname != '/') {curSite = DBSite.ku137_list;}},
  6818. style: '.Title9, .dibu1, .dibu2 {display: none !important;} .content img {min-height: 500px;}',
  6819. pager: {
  6820. nextL: '//div[@class="page"]/a[text()="下一页"]',
  6821. pageE: 'css;.content > img',
  6822. replaceE: 'css;.page',
  6823. scrollD: 3000
  6824. }
  6825. }, // ku137 - 图片页
  6826. ku137_list: {
  6827. pager: {
  6828. nextL: '//div[@class="page"]/a[text()="下一页"]',
  6829. pageE: 'css;.m-list > ul > li',
  6830. replaceE: 'css;.page',
  6831. scrollD: 1500
  6832. }
  6833. }, // ku137 - 分类页
  6834. ku137_m: {
  6835. host: 'm.ku137.net',
  6836. functionS: ()=> {if (indexOF(/\/\d+\.html/)) {curSite = DBSite.ku137_m;} else if (location.pathname != '/') {curSite = DBSite.ku137_m_list;}},
  6837. style: '.ArticleImageBox img {min-height: 300px;}',
  6838. pager: {
  6839. nextL: '//div[@class="article_page"]//a[text()="下一页"]',
  6840. pageE: 'css;.ArticleImageBox > *',
  6841. replaceE: 'css;.article_page',
  6842. scrollD: 3000
  6843. }
  6844. }, // ku137 - 手机版 - 图片页
  6845. ku137_m_list: {
  6846. pager: {
  6847. nextL: '//div[@class="article_page"]//a[text()="下一页"]',
  6848. pageE: 'css;.PictureList > ul > li',
  6849. replaceE: 'css;.article_page',
  6850. scrollD: 1500
  6851. }
  6852. }, // ku137 - 手机版 - 分类页
  6853. mnttz: {
  6854. host: 'www.mnttz.com',
  6855. functionS: ()=> {if (indexOF(/\/\d+\.html/)) {curSite = DBSite.mnttz;} else {curSite = DBSite.mnttz_list;}},
  6856. style: 'img.content_img {min-height: 500px;}',
  6857. pager: {
  6858. nextL: 'css;.article-paging > span+a',
  6859. pageE: 'css;img.content_img',
  6860. replaceE: 'css;.article-paging',
  6861. scrollD: 3000
  6862. }
  6863. }, // mnttz - 图片页
  6864. mnttz_list: {
  6865. pager: {
  6866. nextL: 'css;li.next-page > a',
  6867. pageE: 'css;article.excerpt',
  6868. replaceE: 'css;.pagination',
  6869. scrollD: 1500
  6870. },
  6871. function: {
  6872. bF: src_bF,
  6873. bFp: [0, 'img[data-src]', 'data-src']
  6874. }
  6875. }, // mnttz - 分类页
  6876. kingdom: {
  6877. host: /kingdom-en\.com/,
  6878. functionS: ()=> {if (indexOF(/\/\d+\.html/)) {curSite = DBSite.kingdom;} else if (lp != '/') {curSite = DBSite.kingdom_list;}},
  6879. style: '.pic_center img {min-height: 300px;} .arcmain > .title, .footer, .index-list-title, .listmain_st {display: none !important;}',
  6880. pager: {
  6881. nextL: 'css;a.page_next',
  6882. pageE: 'css;.pic_center img',
  6883. replaceE: 'css;.pagenav',
  6884. scrollD: 4000
  6885. }
  6886. }, // kingdom - 图片页
  6887. kingdom_list: {
  6888. pager: {
  6889. nextL: 'css;a.page_next',
  6890. pageE: 'css;li.media',
  6891. replaceE: 'css;.pagination',
  6892. scrollD: 1000
  6893. },
  6894. function: {
  6895. bF: src_bF,
  6896. bFp: [0, 'img[data-src]', 'data-src']
  6897. }
  6898. }, // kingdom - 分类页
  6899. kissgoddess: {
  6900. host: /kissgoddess\./,
  6901. functionS: ()=> {if (indexOF('/album/') || indexOF('/category/')) curSite = DBSite.kissgoddess;},
  6902. style: '.td-gallery-content > img {min-height: 300px;}',
  6903. pager: {
  6904. nextL: 'css;a.a1:last-of-type',
  6905. pageE: 'css;.td-gallery-content > img, .td-category-span',
  6906. replaceE: 'css;#pages',
  6907. scrollD: 3000
  6908. },
  6909. function: {
  6910. bF: src_bF,
  6911. bFp: [0, 'img[data-original]', 'data-original']
  6912. }
  6913. }, // Kiss Goddess - 图片页
  6914. planetminecraft: {
  6915. host: 'www.planetminecraft.com',
  6916. functionS: ()=> {if (!indexOF('/forums/') && !indexOF('/posts/')) {curSite = DBSite.planetminecraft;}},
  6917. style: '.resource .r-preview>a img[loading=lazy]:not(.lazyloaded) {visibility: initial !important;}',
  6918. pager: {
  6919. nextL: 'css;a.pagination_next',
  6920. pageE: 'css;.resource_block > ul.resource_list > li',
  6921. replaceE: 'css;.pagination',
  6922. scrollD: 3000
  6923. }
  6924. }, // Planet Minecraft
  6925. cadtutor: {
  6926. host: 'www.cadtutor.net',
  6927. functionS: ()=> {
  6928. if (indexOF('/forum/forum/')) {
  6929. curSite = DBSite.cadtutor;
  6930. } else if (indexOF('/forum/topic/') && GM_getValue('menu_thread')) {
  6931. curSite = DBSite.cadtutor_post;
  6932. } else if (indexOF('/forum/search/')) {
  6933. curSite = DBSite.cadtutor_search;
  6934. }},
  6935. pager: {
  6936. nextL: 'css;a[rel="next"]',
  6937. pageE: 'css;ol.ipsDataList > li:not([data-rowid])~li',
  6938. replaceE: 'css;ul.ipsPagination',
  6939. scrollD: 2000
  6940. }
  6941. }, // CADTutor - 列表页
  6942. cadtutor_post: {
  6943. pager: {
  6944. nextL: 'css;a[rel="next"]',
  6945. pageE: 'css;#elPostFeed > form > *:not(input):not(.after-first-post)',
  6946. replaceE: 'css;ul.ipsPagination',
  6947. scrollD: 2000
  6948. }
  6949. }, // CADTutor - 帖子内
  6950. cadtutor_search: {
  6951. pager: {
  6952. nextL: 'css;a[rel="next"]',
  6953. pageE: 'css;ol.ipsStream > li',
  6954. replaceE: 'css;ul.ipsPagination',
  6955. scrollD: 2000
  6956. }
  6957. }, // CADTutor - 搜索页
  6958. theswamp: {
  6959. host: 'www.theswamp.org',
  6960. functionS: ()=> {
  6961. if (!location.search) return
  6962. if (indexOF('board=', 's')) {
  6963. curSite = DBSite.theswamp;
  6964. } else if (indexOF('topic=', 's') && GM_getValue('menu_thread')) {
  6965. curSite = DBSite.theswamp_post;
  6966. }},
  6967. pager: {
  6968. nextL: 'css;.pagelinks > strong+a',
  6969. pageE: 'css;#messageindex tbody > tr:not([class])',
  6970. replaceE: 'css;.pagelinks',
  6971. scrollD: 2000
  6972. }
  6973. }, // TheSwamp - 列表页
  6974. theswamp_post: {
  6975. pager: {
  6976. nextL: 'css;.pagelinks > strong+a',
  6977. pageE: 'css;#forumposts form > *',
  6978. replaceE: 'css;.pagelinks',
  6979. scrollD: 2000
  6980. }
  6981. } // TheSwamp - 帖子内
  6982. };
  6983. // 生成 SiteTypeID
  6984. DBSite = Object.assign(GM_getValue('menu_customRules'), DBSite)
  6985. setSiteTypeID();
  6986. // 用于脚本判断(针对部分特殊的网站)
  6987. SiteType = {
  6988. BAIDU_TIEBA: DBSite.baidu_tieba.SiteTypeID
  6989. };
  6990. }
  6991.  
  6992.  
  6993. // --------------------------------------------------------
  6994.  
  6995.  
  6996. // 自动无缝翻页
  6997. function pageLoading() {
  6998. if (curSite.SiteTypeID == 0) return
  6999. windowScroll(function (direction, e) {
  7000. // 下滑 且 未暂停翻页 且 SiteTypeID > 0 时,才准备翻页
  7001. if (direction != 'down' || !pausePage || curSite.SiteTypeID == 0) return
  7002. if (!curSite.pager.type) curSite.pager.type = 1
  7003. // 翻页模式 5 且为框架内时,要判断顶层是否通过页码暂停翻页了
  7004. if (curSite.pager.type == 5 && self != top && window.top.document.xiu_pausePage == false) return
  7005.  
  7006. let scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop,
  7007. scrollHeight = window.innerHeight || document.documentElement.clientHeight,
  7008. scrollD = curSite.pager.scrollD;
  7009. // <<<<< 翻页类型 3(依靠 [基准元素] 与 [浏览器可视区域底部] 之间的距离缩小来触发翻页)>>>>>
  7010. if (curSite.pager.type === 3) {
  7011. let scrollE = getOne(curSite.pager.scrollE);
  7012. //console.log(scrollE.offsetTop, scrollE.offsetTop - (scrollTop + scrollHeight), scrollD, scrollTop + scrollHeight, curSite.SiteTypeID)
  7013. if (scrollE.offsetTop - (scrollTop + scrollHeight) <= scrollD) {intervalPause(); checkURL(getPageElems);}
  7014.  
  7015. } else if (document.documentElement.scrollHeight <= scrollHeight + scrollTop + scrollD) {
  7016. // <<<<< 翻页类型 1(由脚本实现自动无缝翻页)>>>>>
  7017. if (curSite.pager.type === 1) {
  7018. intervalPause(); checkURL(getPageElems);
  7019.  
  7020. // <<<<< 翻页类型 2(网站自带了自动无缝翻页功能,只需要点击下一页按钮即可)>>>>>
  7021. } else if (curSite.pager.type === 2) {
  7022. let autopbn = getOne(curSite.pager.nextL);
  7023. if (!autopbn) return
  7024. if (curSite.pager.isHidden && isHidden(autopbn)) return // 如果 isHidden = true,那么需要判断元素是否隐藏
  7025. if (curSite.pager.nextText) {
  7026. // 按钮文本,当按钮文本 = 该文本时,才会点击按钮加载下一页
  7027. if (autopbn.innerText === curSite.pager.nextText) {autopbn.click(); pageNum.now = pageNum._now + 1;}
  7028. } else if (curSite.pager.nextTextOf) {
  7029. // 按钮文本的一部分,当按钮文本包含该文本时,才会点击按钮加载下一页
  7030. if (autopbn.innerText.indexOf(curSite.pager.nextTextOf) > -1) {autopbn.click(); pageNum.now = pageNum._now + 1;}
  7031. } else if (curSite.pager.nextHTML) {
  7032. // 按钮内元素,当按钮内元素 = 该元素内容时,才会点击按钮加载下一页
  7033. if (autopbn.innerHTML === curSite.pager.nextHTML) {autopbn.click(); pageNum.now = pageNum._now + 1;}
  7034. } else {
  7035. // 对于没有按钮文字变化的按钮,可以指定间隔时间(默认 300ms)
  7036. if (!curSite.pager.interval) curSite.pager.interval = 300;
  7037. intervalPause();
  7038. // 如果没有指定按钮文字就直接点击
  7039. autopbn.click(); pageNum.now = pageNum._now + 1;
  7040. }
  7041.  
  7042. // <<<<< 翻页类型 4(部分简单的动态加载类网站)>>>>>
  7043. } else if (curSite.pager.type === 4) {
  7044. // 为百度贴吧的发帖考虑,预留底部一小部分...
  7045. if (!(curSite.SiteTypeID === SiteType.BAIDU_TIEBA && document.documentElement.scrollHeight <= scrollHeight + scrollTop + 200)) {
  7046. intervalPause(); if (typeof curSite.pager.nextL == 'function') {curSite.pager.nextL();} else if (getNextE(curSite.pager.nextL)) {getPageElems_(curSite.pageUrl);}
  7047. }
  7048.  
  7049. // <<<<< 翻页类型 5(插入 iframe 方式来加载下一页)>>>>>
  7050. } else if (curSite.pager.type === 5) {
  7051. checkURL(insIframe);
  7052.  
  7053. // <<<<< 翻页类型 6(通过 iframe 获取下一页动态加载内容)>>>>>
  7054. } else if (curSite.pager.type === 6) {checkURL(insIframe_);}
  7055. }
  7056. });
  7057.  
  7058. function intervalPause() {
  7059. if (curSite.pager.interval) {
  7060. pausePage = false
  7061. setTimeout(function(){pausePage = true;}, curSite.pager.interval)
  7062. }
  7063. }
  7064. }
  7065.  
  7066. // 翻页类型 1/3
  7067. function getPageElems(url) {
  7068. GM_xmlhttpRequest({
  7069. url: url,
  7070. method: 'GET',
  7071. overrideMimeType: 'text/html; charset=' + document.charset,
  7072. headers: {
  7073. 'Referer': location.href,
  7074. 'User-Agent': navigator.userAgent
  7075. },
  7076. timeout: 10000,
  7077. onload: function (response) {
  7078. try {
  7079. //console.log('URL:' + url, '最终 URL:' + response.finalUrl, '返回内容:' + response.responseText)
  7080. processElems(createDocumentByString(response.responseText));
  7081. } catch (e) {
  7082. console.log(e);
  7083. }
  7084. }
  7085. });
  7086. }
  7087. // 翻页类型 4
  7088. function getPageElems_(url, type = '', method = 'GET', data = '', type2) {
  7089. let mimeType;
  7090. switch (type) {
  7091. case 'json':
  7092. mimeType = 'application/json; charset=' + document.charset; break;
  7093. case 'text':
  7094. mimeType = 'text/plain; charset=' + document.charset; break;
  7095. default:
  7096. mimeType = 'text/html; charset=' + document.charset;
  7097. }
  7098.  
  7099. GM_xmlhttpRequest({
  7100. url: url,
  7101. method: method,
  7102. data: data,
  7103. responseType: type,
  7104. overrideMimeType: mimeType,
  7105. headers: {
  7106. 'Referer': location.href,
  7107. 'Content-Type': (method === 'POST') ? 'application/x-www-form-urlencoded':'',
  7108. 'User-Agent': navigator.userAgent
  7109. },
  7110. timeout: 10000,
  7111. onload: function (response) {
  7112. try {
  7113. //console.log('最终 URL:' + response.finalUrl, '返回内容:' + response.responseText)
  7114. switch (type) {
  7115. case 'json':
  7116. curSite.pager.insertE(response.response, type2);
  7117. break;
  7118. case 'text':
  7119. curSite.pager.insertE(response.responseText, type2)
  7120. break;
  7121. default:
  7122. curSite.pager.insertE(createDocumentByString(response.responseText), type2)
  7123. }
  7124. } catch (e) {
  7125. console.log(e);
  7126. }
  7127. }
  7128. });
  7129. }
  7130. // 翻页类型 5(插入 iframe 方式加载下一页,无限套娃)
  7131. function insIframe(src) {
  7132. // 停用当前页面翻页
  7133. if (curSite.SiteTypeID == 0) return
  7134. curSite.SiteTypeID = 0;
  7135.  
  7136. // 创建 iframe
  7137. let iframe = document.createElement('iframe');
  7138. iframe.style = 'position: absolute; width: 100%; height: 100%; border: none;';
  7139. iframe.id = 'xiu_iframe';
  7140. iframe.src = src;
  7141.  
  7142. var beforeScrollTop = document.documentElement.scrollTop || document.body.scrollTop
  7143. // 当滚动条到底部时(即完全显示 iframe 框架),隐藏当前页面的滚动条
  7144. window.addEventListener('scroll', function () {
  7145. let scrollTop = document.documentElement.scrollTop || document.body.scrollTop,
  7146. clientHeight = document.documentElement.clientHeight || document.body.clientHeight,
  7147. scrollHeight = document.documentElement.scrollHeight || document.body.scrollHeight,
  7148. afterScrollTop = document.documentElement.scrollTop || document.body.scrollTop,
  7149. delta = afterScrollTop - beforeScrollTop;
  7150. if (delta == 0) return false;
  7151. beforeScrollTop = afterScrollTop;
  7152.  
  7153. //console.log(delta, scrollHeight - (scrollTop + clientHeight + 10), '1111')
  7154. if (delta > 0 && scrollTop + clientHeight + 10 >= scrollHeight && !getCSS('#xiu-scroll')) {
  7155. let newStyle = document.createElement('style'); newStyle.id = 'xiu-scroll';
  7156. newStyle.textContent = 'html::-webkit-scrollbar, body::-webkit-scrollbar {width: 0 !important;height: 0 !important;} html, body {scrollbar-width: none !important;}';
  7157. if (curSite.pager.style) newStyle.textContent += curSite.pager.style;
  7158. document.documentElement.appendChild(newStyle);
  7159. iframe.focus();
  7160. iframe.document.body.focus();
  7161. //iframe.document.body.click();
  7162. } else if (delta < 0 && getCSS('#xiu-scroll')) {
  7163. getCSS('#xiu-scroll').remove();
  7164. }
  7165. }, false);
  7166.  
  7167. // 加载完成后才继续
  7168. iframe.onload = function() {
  7169. // 添加历史记录
  7170. if (curSite.history !== false) addHistory(iframe.contentWindow.document, iframe.contentWindow.document.title);
  7171. // 当前页码 + 1
  7172. if (!curSite.hiddenPN) {
  7173. let autopageNumber = getCSS('#Autopage_number', window.top.document)
  7174. if (autopageNumber) {autopageNumber.textContent = parseInt(autopageNumber.textContent) + 1;}
  7175. }
  7176. }
  7177.  
  7178. // 插入 iframe
  7179. document.documentElement.appendChild(iframe);
  7180. }
  7181. // 翻页类型 6(通过 iframe 获取下一页动态加载内容,只有一个娃)
  7182. function insIframe_(src) {
  7183. // 暂停翻页
  7184. if (!pausePage) return
  7185. pausePage = false
  7186. //console.log(src)
  7187. // 如果不存在,则创建一个 iframe
  7188. let iframe = document.getElementById('xiu_iframe');
  7189. if (!iframe) {
  7190. iframe = document.createElement('iframe');
  7191. iframe.style = 'position: absolute; top: -9999px; left: -9999px; width: 100%; height: 100%; border: none; z-index: -999; /*visibility: hidden;*/';
  7192. iframe.id = 'xiu_iframe';
  7193. iframe.src = src;
  7194. }
  7195.  
  7196. // 加载完成后才继续
  7197. iframe.onload = function() {
  7198. //iframe.contentWindow.scrollTo(0, 999999); // 滚动到底部,以触发网页的滚动条相关加载事件
  7199. //iframe.contentWindow.scrollTo({top: 9999999, behavior: 'smooth'});
  7200. if (!curSite.pager.loadTime) curSite.pager.loadTime = 100; // 默认 100ms
  7201. //console.log(curSite.pager.loadTime, curSite.pager.loadTime/30)
  7202. //console.time('sort');
  7203. let time1 = 0 ,time2 = setInterval(function(){
  7204. let scrollHeight = (iframe.contentWindow.document.documentElement.scrollHeight || iframe.contentWindow.document.body.scrollHeight)/10
  7205. iframe.contentWindow.scrollTo(0, 999999);
  7206. iframe.contentWindow.scrollTo(0, scrollHeight*time1);
  7207. //console.log(time1, iframe.contentWindow.document.documentElement.scrollHeight || iframe.contentWindow.document.body.scrollHeight)
  7208. if (++time1 == 10) {
  7209. //console.timeEnd('sort');
  7210. clearInterval(time2);
  7211. processElems(iframe.contentWindow.document); // 插入/替换元素等
  7212. //console.log(iframe.contentWindow.document.documentElement.scrollHeight || iframe.contentWindow.document.body.scrollHeight)
  7213. pausePage = true; // 恢复翻页
  7214. }
  7215. }, curSite.pager.loadTime/10)
  7216. }
  7217.  
  7218. // 插入 iframe(如果已存在则直接改 src)
  7219. if (document.getElementById('xiu_iframe')) {
  7220. iframe.src = src;
  7221. } else {
  7222. document.documentElement.appendChild(iframe);
  7223. }
  7224. }
  7225.  
  7226.  
  7227. // XHR 后处理结果,插入、替换元素等(适用于翻页类型 1/3/6)
  7228. function processElems(response) {
  7229. if (!curSite.pager.insertP) {curSite.pager.insertP = [curSite.pager.pageE, 5]}
  7230. let pageElems = getAll(curSite.pager.pageE, response, response), toElement;
  7231. if (curSite.pager.insertP[1] === 5) { // 插入 pageE 列表最后一个元素的后面
  7232. toElement = getAll(curSite.pager.insertP[0]).pop();
  7233. } else {
  7234. toElement = getOne(curSite.pager.insertP[0]);
  7235. }
  7236. //console.log(curSite.pager.pageE, pageElems, curSite.pager.insertP, toElement)
  7237.  
  7238. if (pageElems.length > 0 && toElement) {
  7239. // 如果有插入前函数就执行函数
  7240. if (curSite.function && curSite.function.bF) {
  7241. if (curSite.function.bFp) { // 如果指定了参数
  7242. if (typeof(curSite.function.bF) == 'string') { // 如果是字符串,说明是自定义规则
  7243. //console.log(curSite.function.bF, curSite.function.bFp)
  7244. pageElems = window.autoPage[curSite.function.bF](pageElems, curSite.function.bFp);
  7245. } else {
  7246. pageElems = curSite.function.bF(pageElems, curSite.function.bFp);
  7247. }
  7248. } else {
  7249. //console.log(curSite.function.bF)
  7250. if (typeof(curSite.function.bF) == 'string') { // 如果是字符串,说明是自定义规则
  7251. pageElems = window.autoPage[curSite.function.bF](pageElems);
  7252. } else {
  7253. pageElems = curSite.function.bF(pageElems);
  7254. }
  7255. }
  7256. }
  7257.  
  7258. // 插入位置
  7259. let addTo = getAddTo(curSite.pager.insertP[1]);
  7260.  
  7261. // 插入新页面元素
  7262. if (curSite.pager.insertP[1] === 6) { // 插入到目标内部末尾(针对文本,比如小说网页)
  7263. let afterend = '';
  7264. if (curSite.pager.insertP6Br) afterend += '<br/><br/>'
  7265. pageElems.forEach(function (one) {afterend += one.innerHTML;});
  7266. toElement.insertAdjacentHTML(addTo, afterend);
  7267. } else {
  7268. if (curSite.pager.insertP[1] === 2 || curSite.pager.insertP[1] === 4 || curSite.pager.insertP[1] === 5) pageElems.reverse(); // 插入到 [元素内头部]、[目标本身后面] 时,需要反转顺序
  7269. pageElems.forEach(function (one) {toElement.insertAdjacentElement(addTo, one);});
  7270. }
  7271.  
  7272. // 当前页码 + 1
  7273. pageNum.now = pageNum._now + 1
  7274.  
  7275. // 添加历史记录
  7276. if (curSite.history !== false) addHistory(response);
  7277.  
  7278. // 替换待替换元素
  7279. if (curSite.pager.replaceE) replaceElems(response);
  7280.  
  7281. // 插入 <script> 标签
  7282. if (curSite.pager.scriptT || curSite.pager.scriptT == 0) {
  7283. switch (curSite.pager.scriptT) {
  7284. case 0: // 下一页的所有 <script> 标签
  7285. insScript('css;script', toElement, response); break;
  7286. case 1: // 下一页的所有 <script> 标签(不包括 src 链接)
  7287. insScript('css;script:not([src])', toElement, response); break;
  7288. case 2: // 下一页主体元素 (pageE) 的同级 <script> 标签
  7289. insScript(null, toElement, pageElems); break;
  7290. case 3: // 下一页主体元素 (pageE) 的子元素 <script> 标签
  7291. insScript('css;script:not([src])', toElement, pageElems); break;
  7292. }
  7293. }
  7294.  
  7295. // 如果有插入后函数就执行函数
  7296. if (curSite.function && curSite.function.aF) {
  7297. if (curSite.function.aFp) { // 如果指定了参数
  7298. curSite.function.aF(curSite.function.aFp);
  7299. } else {
  7300. if (typeof(curSite.function.aF) == 'string') { // 如果是字符串,说明是自定义规则
  7301. //console.log(curSite.function.aF)
  7302. if (window.autoPage[curSite.function.aF]) {
  7303. window.autoPage[curSite.function.aF]();
  7304. } else {
  7305. new Function (curSite.function.aF)();
  7306. }
  7307. } else {
  7308. curSite.function.aF();
  7309. }
  7310. }
  7311. }
  7312. } else { // 获取主体元素失败后,尝试重新获取
  7313. console.log(curSite.pager.pageE, pageElems, curSite.pager.insertP, toElement)
  7314. if (curSite.retry) {
  7315. console.warn('[自动无缝翻页] 获取主体元素失败,尝试重新获取...')
  7316. setTimeout(function(){curSite.pageUrl = '';}, curSite.retry)
  7317. } else { // 尝试替换元素看能不能继续翻页下去
  7318. if (curSite.pager.replaceE) {
  7319. if (replaceElems(response)) { // 如果替换成功
  7320. console.log('[自动无缝翻页] 获取主体元素失败,尝试替换元素成功!')
  7321. pageNum.now = pageNum._now + 1; // 当前页码 + 1
  7322. if (curSite.history !== false) addHistory(response); // 添加历史记录
  7323. } else {console.error('[自动无缝翻页] 获取主体元素失败,尝试替换元素失败...')}
  7324. }
  7325. }
  7326. }
  7327. }
  7328. // 通用型插入前函数(加载图片)
  7329. function src_bF(pageElems, css) {
  7330. pageElems.forEach(function (one) {
  7331. if (css[0] == 0) { // src 图片
  7332. if (one.tagName == 'IMG' && one.getAttribute(css[2])) one.src = one.getAttribute(css[2]);
  7333. one.querySelectorAll(css[1]).forEach(function (now) {
  7334. now.src = now.getAttribute(css[2]);
  7335. });
  7336. } else if (css[0] == 1) { // 背景图片
  7337. if (one.tagName == 'IMG' && one.getAttribute(css[2])) one.style.backgroundImage = 'url("' + one.getAttribute(css[2]) + '")';
  7338. one.querySelectorAll(css[1]).forEach(function (now) {
  7339. now.style.backgroundImage = 'url("' + now.getAttribute(css[2]) + '")';
  7340. });
  7341. }
  7342. });
  7343. return pageElems
  7344. }
  7345. // 文字型插入前函数(正则过滤)
  7346. function xs_bF(pageElems, reg) {
  7347. pageElems.forEach(function (one) {
  7348. one.innerHTML = one.innerHTML.replace(reg[0], reg[1])
  7349. });
  7350. return pageElems
  7351. }
  7352.  
  7353. // 通用型获取下一页地址(从 元素 中获取页码)
  7354. function getNextE(css) {
  7355. if (!css) css = curSite.pager.nextL;
  7356. let next = getOne(css);
  7357. if (next && next.nodeType === 1 && next.href && next.href.slice(0,4) === 'http' && next.href != curSite.pageUrl) {
  7358. if (curSite.pager.forceHTTPS && location.protocol === 'https:') {
  7359. curSite.pageUrl = next.href.replace(/^http:/,'https:');
  7360. } else {
  7361. curSite.pageUrl = next.href;
  7362. }
  7363. //console.log(curSite.pageUrl)
  7364. return true
  7365. }
  7366. return false
  7367. }
  7368. // 通用型获取下一页地址(从 元素 中获取页码,URL 替换 page= 参数)
  7369. function getNextEP(css, pf, reg) {
  7370. let nextNum = getOne(css), url = '';
  7371. if (nextNum && nextNum.textContent) {
  7372. nextNum = nextNum.textContent.replaceAll(' ','');
  7373. if (location.search) {
  7374. if (indexOF(pf, 's')) {
  7375. url = location.search.replace(reg, pf + nextNum);
  7376. } else {
  7377. url = location.search + '&' + pf + nextNum;
  7378. }
  7379. } else {
  7380. url = '?' + pf + nextNum;
  7381. }
  7382. url = location.origin + location.pathname + url;
  7383. }
  7384. return url
  7385. }
  7386. // 通用型获取下一页地址(从 元素 中获取页码,URL 替换 pathname 路径)
  7387. function getNextEPN(css, reg, a, b = '') {
  7388. let nextNum = getOne(css), url = '';
  7389. if (nextNum && nextNum.textContent) {
  7390. nextNum = nextNum.textContent.replaceAll(' ','');
  7391. if (location.pathname) {
  7392. if (indexOF(reg)) {
  7393. url = location.pathname.replace(reg, a + nextNum + b);
  7394. } else {
  7395. url = location.pathname + a + nextNum + b;
  7396. }
  7397. } else {
  7398. url = location.pathname + a + nextNum + b;
  7399. }
  7400. url = location.origin + url;
  7401. }
  7402. return url
  7403. }
  7404. // 通用型获取下一页地址(从 URL 中获取页码,URL 替换 pathname 路径)
  7405. function getNextUPN(reg1, reg, a, b = '', initP = '2', endP) {
  7406. let nextNum = reg1.exec(location.pathname);
  7407. if (nextNum) {
  7408. nextNum = String(parseInt(nextNum[0])+1);
  7409. if (endP && (parseInt(nextNum[0]) > parseInt(endP))) return ''
  7410. } else {
  7411. nextNum = initP;
  7412. if (endP && (parseInt(nextNum[0]) >= parseInt(endP))) return ''
  7413. }
  7414. let url = '';
  7415. if (location.pathname) {
  7416. if (indexOF(reg)) {
  7417. url = location.pathname.replace(reg, a + nextNum + b);
  7418. } else {
  7419. url = location.pathname + a + nextNum + b;
  7420. }
  7421. } else {
  7422. url = location.pathname + a + nextNum + b;
  7423. }
  7424. url = location.origin + url;
  7425. return url
  7426. }
  7427. // 通用型获取下一页地址(从 URL 中获取页码,URL 替换 page= 参数)
  7428. function getNextUP(pf, reg, lp = location.pathname, initP = '2', endP) {
  7429. let nextNum = getSearch(pf.replace('=',''));
  7430. if (nextNum) {
  7431. nextNum = String(parseInt(nextNum)+1);
  7432. if (endP && (parseInt(nextNum) > parseInt(endP))) return ''
  7433. } else {
  7434. nextNum = initP;
  7435. if (endP && (parseInt(nextNum) >= parseInt(endP))) return ''
  7436. }
  7437. let url = '';
  7438. if (location.search) {
  7439. if (indexOF(pf, 's')) {
  7440. url = location.search.replace(reg, pf + nextNum);
  7441. } else {
  7442. url = location.search + '&' + pf + nextNum;
  7443. }
  7444. } else {
  7445. url = '?' + pf + nextNum;
  7446. }
  7447. url = location.origin + lp + url;
  7448. return url
  7449. }
  7450. // 通用型获取下一页地址(从 form input 中获取,返回 GET URL)
  7451. function getNextF(css) {
  7452. let form = getOne(css), value = '';
  7453. if (form) {
  7454. form.querySelectorAll('input[name]').forEach(function(input) {value += input.name + '=' + input.value + '&';}) // 生成表单参数
  7455. value = encodeURI(value.replace(/&$/,'')); // 清理最后一个 & 符号
  7456. if (form.action && value) return (form.action + '?' + value)
  7457. }
  7458. return '';
  7459. }
  7460.  
  7461.  
  7462. // 检查 URL
  7463. function checkURL(func) {
  7464. if (typeof curSite.pager.nextL == 'function') {
  7465. let tempUrl = curSite.pager.nextL();
  7466. if (!tempUrl || (tempUrl && tempUrl.slice(0,4) != 'http') || tempUrl === curSite.pageUrl ) return;
  7467. curSite.pageUrl = tempUrl;
  7468. func(curSite.pageUrl);
  7469. } else if (curSite.pager.nextL && curSite.pager.nextL.search(/^js;/i) === 0) { // 自定义翻页规则中执行 JavaScript 代码的
  7470. let tempUrl = new Function (curSite.pager.nextL.slice(3))();
  7471. if (!tempUrl || (tempUrl && tempUrl.slice(0,4) != 'http') || tempUrl === curSite.pageUrl ) return;
  7472. curSite.pageUrl = tempUrl;
  7473. func(curSite.pageUrl);
  7474. } else if (getNextE()) {
  7475. func(curSite.pageUrl);
  7476. }
  7477. //console.log(curSite.pageUrl);
  7478. }
  7479. // 替换元素
  7480. function replaceElems(pageElems, o = curSite.pager.replaceE, r = curSite.pager.replaceE) {
  7481. let oriE = getAll(o),
  7482. repE = getAll(r, pageElems, pageElems);
  7483. //console.log(oriE, repE)
  7484. if (oriE.length != 0 && repE.length != 0 && oriE.length === repE.length) {
  7485. for (let i = 0; i < oriE.length; i++) {
  7486. oriE[i].outerHTML = repE[i].outerHTML;
  7487. }
  7488. return true
  7489. }
  7490. return false
  7491. }
  7492. // 添加历史记录
  7493. function addHistory(pageElems, title, url) {
  7494. if (!curSite.pageUrl) return
  7495. // 对于自带类似功能 或者 覆盖了 history 原生函数的网站,则跳过不再添加历史记录
  7496. if (window.top.history.toString() !== '[object History]') return
  7497.  
  7498. //console.log(pageElems.querySelector('title'), curSite.pageUrl)
  7499. title = title || pageElems.querySelector('title').textContent || window.top.document.title;
  7500. url = url || curSite.pageUrl;
  7501. window.top.document.title = title;
  7502. window.top.document.xiu_nowUrl = curSite.pageUrl;
  7503. window.top.history.pushState('xiu_history', title, url);
  7504. }
  7505. // 插入 <Script>
  7506. function insScript(selector, toElement = document.body, contextNode = document) {
  7507. let scriptElems = contextNode;
  7508. if (selector) {
  7509. if (contextNode instanceof Array) {
  7510. scriptElems = []; contextNode.forEach(function (one) {scriptElems = scriptElems.concat(getAll(selector, one, one));})
  7511. } else {
  7512. scriptElems = getAll(selector, contextNode, contextNode);
  7513. }
  7514. }
  7515. scriptElems.forEach(function (one) {
  7516. if (one.tagName === 'SCRIPT') {
  7517. if (one.src) {
  7518. toElement.appendChild(document.createElement('script')).src = one.src;
  7519. } else {
  7520. toElement.appendChild(document.createElement('script')).textContent = one.textContent;
  7521. }
  7522. }
  7523. });
  7524. }
  7525. // 插入 <Style>
  7526. function insStyle(style) {
  7527. document.documentElement.appendChild(document.createElement('style')).textContent = style;
  7528. }
  7529.  
  7530.  
  7531. // 获取元素(CSS/Xpath)来自:https://github.com/machsix/Super-preloader
  7532. function getCSS(css, contextNode = document) {
  7533. return contextNode.querySelector(css);
  7534. }
  7535. function getAllCSS(css, contextNode = document) {
  7536. return [].slice.call(contextNode.querySelectorAll(css));
  7537. }
  7538. function getXpath(xpath, contextNode, doc = document) {
  7539. contextNode = contextNode || doc;
  7540. try {
  7541. const result = doc.evaluate(xpath, contextNode, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
  7542. // 应该总是返回一个元素节点
  7543. return result.singleNodeValue && result.singleNodeValue.nodeType === 1 && result.singleNodeValue;
  7544. } catch (err) {
  7545. throw new Error(`无效 Xpath: ${xpath}`);
  7546. }
  7547. }
  7548. function getAllXpath(xpath, contextNode, doc = document) {
  7549. contextNode = contextNode || doc;
  7550. const result = [];
  7551. try {
  7552. const query = doc.evaluate(xpath, contextNode, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
  7553. for (let i = 0; i < query.snapshotLength; i++) {
  7554. const node = query.snapshotItem(i);
  7555. // 如果是 Element 节点
  7556. if (node.nodeType === 1) result.push(node);
  7557. }
  7558. } catch (err) {
  7559. throw new Error(`无效 Xpath: ${xpath}`);
  7560. }
  7561. return result;
  7562. }
  7563. function getOne(selector, contextNode = undefined, doc = document) {
  7564. if (!selector) return;
  7565. contextNode = contextNode || doc;
  7566. if (selector.search(/^css;/i) === 0) {
  7567. return getCSS(selector.slice(4), contextNode);
  7568. } else {
  7569. return getXpath(selector, contextNode, doc);
  7570. }
  7571. }
  7572. function getAll(selector, contextNode = undefined, doc = document) {
  7573. if (!selector) return [];
  7574. contextNode = contextNode || doc;
  7575. if (selector.search(/^css;/i) === 0) {
  7576. return getAllCSS(selector.slice(4), contextNode);
  7577. } else {
  7578. return getAllXpath(selector, contextNode, doc);
  7579. }
  7580. }
  7581. function createDocumentByString(e) {
  7582. if (e) {
  7583. if ('HTML' !== document.documentElement.nodeName) return (new DOMParser).parseFromString(e, 'application/xhtml+xml');
  7584. var t;
  7585. try { t = (new DOMParser).parseFromString(e, 'text/html');} catch (e) {}
  7586. if (t) return t;
  7587. if (document.implementation.createHTMLDocument) {
  7588. t = document.implementation.createHTMLDocument('ADocument');
  7589. } else {
  7590. 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) {}
  7591. }
  7592. if (t) {
  7593. var r = document.createRange(),
  7594. n = r.createContextualFragment(e);
  7595. r.selectNodeContents(document.body);
  7596. t.body.appendChild(n);
  7597. 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);
  7598. return t;
  7599. }
  7600. } else console.error('没有找到要转成 DOM 的字符串');
  7601. }
  7602.  
  7603.  
  7604. // 强制新标签页打开链接(翻页模式 5/6)
  7605. function forceTarget() {
  7606. document.body.addEventListener('click', function(e) {
  7607. if (e.target.tagName === 'A') {
  7608. forceTarget_(e.target, e);
  7609. } else {
  7610. let path = e.path || e.composedPath();
  7611. for (let i = 1; i < path.length - 3; i++) {
  7612. //console.log(path[i])
  7613. if (path[i].tagName === 'A') {
  7614. forceTarget_(path[i], e);
  7615. break;
  7616. }
  7617. }
  7618. }
  7619. });
  7620.  
  7621. function forceTarget_(target, e){
  7622. if (target.href && target.target != '_blank' && !(target.getAttribute('onclick')) && target.href.slice(0,4) == 'http' && target.getAttribute('href').slice(0,1) != '#') {
  7623. e.preventDefault(); // 阻止默认打开链接事件
  7624. //console.log(target.href);
  7625. //window.top.location.href = target.href;
  7626. window.GM_openInTab(target.href, {active: true,insert: true,setParent: true});
  7627. }
  7628. }
  7629. //document.head.appendChild(document.createElement('base')).target = '_top';
  7630. }
  7631. // 判断元素是否隐藏(隐藏返回 true)
  7632. function isHidden(el){
  7633. return (el.offsetParent === null);
  7634. }
  7635. // 判断 URL 是否存在指定文本
  7636. function indexOF(e, l = 'p', low = false){
  7637. switch (l) {
  7638. case 'h':
  7639. l = location.href; break;
  7640. case 'p':
  7641. l = location.pathname; break;
  7642. case 's':
  7643. l = location.search; break;
  7644. }
  7645. //console.log(l,e,l.indexOf(e))
  7646. if (low) {e = e.toLowerCase(); l = l.toLowerCase();} // 全部转为小写
  7647. if (e instanceof RegExp) {
  7648. if (e.test(l)) return true
  7649. } else {
  7650. if (l.indexOf(e) > -1) return true
  7651. }
  7652. return false
  7653. }
  7654. // 获取 Search 指定参数
  7655. function getSearch(variable) {
  7656. let query = window.location.search.substring(1),
  7657. vars = query.split('&');
  7658. for (var i=0;i<vars.length;i++) {
  7659. var pair = vars[i].split('=');
  7660. if(pair[0] == variable){return pair[1];}
  7661. }
  7662. return '';
  7663. }
  7664. // 启用/禁用 (当前网站)
  7665. function menu_disable(type) {
  7666. switch(type) {
  7667. case 'check':
  7668. return check(); break;
  7669. case 'add':
  7670. add(); break;
  7671. case 'del':
  7672. del(); break;
  7673. }
  7674.  
  7675. function check() { // 存在返回真,不存在返回假
  7676. if (GM_getValue('menu_disable').indexOf(location.hostname) == -1) return false // 不存在返回假
  7677. return true
  7678. }
  7679.  
  7680. function add() {
  7681. if (check()) return
  7682. let list = GM_getValue('menu_disable'); // 读取网站列表
  7683. list.push(location.hostname); // 追加网站域名
  7684. GM_setValue('menu_disable', list); // 写入配置
  7685. location.reload(); // 刷新网页
  7686. }
  7687.  
  7688. function del() {
  7689. if (!check()) return
  7690. let list = GM_getValue('menu_disable'), // 读取网站列表
  7691. index = list.indexOf(location.hostname);
  7692. list.splice(index, 1); // 删除网站域名
  7693. GM_setValue('menu_disable', list); // 写入配置
  7694. location.reload(); // 刷新网页
  7695. }
  7696. }
  7697. // 左键双击网页空白处暂停翻页
  7698. function pausePageEvent() {
  7699. if (!GM_getValue('menu_pause_page')) return
  7700. if (curSite.SiteTypeID === 0) return
  7701. if (curSite.pager && curSite.pager.type == 5) window.top.document.xiu_pausePage = pausePage
  7702. document.body.addEventListener('dblclick', function () {
  7703. if (pausePage) {GM_notification({text: `❌ 已暂停本页 [自动无缝翻页]\n (再次双击可恢复)`, timeout: 2000});} else {GM_notification({text: `✅ 已恢复本页 [自动无缝翻页]\n (再次双击可暂停)`, timeout: 2000});}
  7704. pausePage = !pausePage;
  7705. if (curSite.pager && curSite.pager.type == 5) window.top.document.xiu_pausePage = pausePage
  7706. });
  7707. }
  7708. // 自定义翻页规则
  7709. function customRules() {
  7710. if (getCSS('#Autopage_customRules')) return
  7711.  
  7712. // 插入网页
  7713. 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: 50px 10px 10px 10px !important; position: fixed !important; opacity: 0.9 !important; z-index: 9999 !important; background-color: #eee !important;">
  7714. <h1><strong>自定义翻页规则(优先于脚本内置规则)</strong></h1>
  7715. <ul style="list-style: disc !important; margin-left: 35px !important;">
  7716. <li>翻页规则为 JSON 格式,因此大家需要先去了解一下 JSON 的基本格式(如:两边都需要双引号、最后一个末尾不能加逗号等)。</li>
  7717. <li>具体的翻页规则说明、示例,为了方便更新及补充,我都写到 <a href="https://greasyfork.org/scripts/419215" target="_blank">Greasyfork</a> 及 <a href="https://github.com/XIU2/UserScript/issues/176" target="_blank">Github</a> 里面了。</li>
  7718. <li>该脚本最初只是自用的,没有考虑到自定义翻页规则,因此我只能勉强实现该功能,但局限性比较多,只适用于简单的网站。</li>
  7719. <li>脚本会自动格式化规则,因此无需手动缩进、换行。</li>
  7720. </ul>
  7721. <p style="color: #ff3535 !important;">注意:不要完全照搬脚本内置规则,因为和标准 JSON 格式有所差别,如:必须两边内容都加双引号(不能用单引号)。</p>
  7722.  
  7723. <textarea id="Autopage_customRules_textarea" style="min-width:50% !important; min-height:200px !important; display: block !important; margin: 10px 0 10px 0;" placeholder="啊啊啊啊&#13;&#10;呃呃呃呃">${JSON.stringify(GM_getValue('menu_customRules', {}), null, '\t')}</textarea>
  7724. <button id="Autopage_customRules_save">保存并刷新</button><button id="Autopage_customRules_cancel">取消</button>
  7725. </div>`
  7726. document.documentElement.insertAdjacentHTML('beforeend', _html);
  7727. if (curSite.pager && curSite.pager.type == 5) window.top.document.xiu_pausePage = pausePage
  7728. // 点击事件
  7729. getCSS('#Autopage_customRules_save').onclick = function () {
  7730. let rules = getCSS('#Autopage_customRules_textarea').value;
  7731. console.log(rules)
  7732. if (!rules) rules = '{}'
  7733. try {
  7734. rules = JSON.parse(rules)
  7735. console.log(rules)
  7736. GM_setValue('menu_customRules', rules)
  7737. location.reload();
  7738. } catch (e) {
  7739. console.error('自定义规则存在格式错误:\n' + e + '\n\n注意事项:\n规则中冒号 : 左右的内容都需要加上双引号 " 而不能用单引号 \',如果内容中含有双引号则需要对双引号转义(即 \" 这样)或者改用单引号')
  7740. window.alert('自定义规则存在格式错误:\n' + e + '\n\n注意事项:\n规则中冒号 : 左右的内容都需要加上双引号 " 而不能用单引号 \',如果内容中含有双引号则需要对双引号转义(即 \" 这样)或者改用单引号');
  7741. }
  7742. }
  7743. getCSS('#Autopage_customRules_cancel').onclick = function () {getCSS('#Autopage_customRules').remove();}
  7744. //status = getCSS('#Autopage_customRules');
  7745. }
  7746. // 显示页码
  7747. function pageNumber(type) {
  7748. 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}
  7749. let status = getCSS('#Autopage_number');
  7750. switch (type) {
  7751. case 'add':
  7752. add(); break;
  7753. case 'del':
  7754. del(); break;
  7755. case 'set':
  7756. set(); break;
  7757. }
  7758.  
  7759. function add(){
  7760. if (status) {
  7761. if (status.style.display === 'none') {status.style.display = 'flex';}
  7762. return
  7763. }
  7764. // 插入网页
  7765. 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.5;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.9;transform: translateX(0);}</style>`,
  7766. _html = `<div id="Autopage_number" title="1. 此处数字为 [当前页码] (可在脚本菜单中关闭)&#10;&#10;2. 鼠标左键点击此处 [临时暂停本页自动无缝翻页](再次点击可恢复)">${pageNum._now}</div>`
  7767. document.documentElement.insertAdjacentHTML('beforeend', _style + _html);
  7768. // 解决 远景论坛 会清理掉前面插入的 CSS 样式的问题
  7769. if (location.hostname === 'bbs.pcbeta.com') {setTimeout(function(){document.documentElement.insertAdjacentHTML('beforeend', _style);}, 500);}
  7770. if (curSite.pager && curSite.pager.type == 5) window.top.document.xiu_pausePage = pausePage
  7771. // 点击事件(临时暂停翻页)
  7772. getCSS('#Autopage_number').onclick = function () {
  7773. if (pausePage) {this.style = 'color: #FF5722 !important; font-style: italic !important;';} else {this.style = '';}
  7774. pausePage = !pausePage;
  7775. if (curSite.pager && curSite.pager.type == 5) window.top.document.xiu_pausePage = pausePage
  7776. };
  7777. status = getCSS('#Autopage_number');
  7778. set();
  7779. }
  7780. // 监听储存当前页码的对象值的变化
  7781. function set(){
  7782. Object.defineProperty(pageNum, 'now', {
  7783. set: function(value) {
  7784. this._now = value;
  7785. if (status) status.textContent = value;
  7786. }
  7787. });
  7788. }
  7789. function del(){
  7790. if (!status) return
  7791. status.style.display = 'none';
  7792. }
  7793. }
  7794. // 菜单开关
  7795. function menu_switch(menu_status, Name, Tips) {
  7796. if (menu_status === true){
  7797. GM_setValue(Name, false);
  7798. } else {
  7799. GM_setValue(Name, true);
  7800. }
  7801. if (Name === 'menu_page_number') {
  7802. if (menu_status === true){pageNumber('del');} else {pageNumber('add');}
  7803. registerMenuCommand(); // 重新注册脚本菜单
  7804. } else {
  7805. location.reload();}
  7806. };
  7807. // 生成 SiteTypeID
  7808. function setSiteTypeID() {
  7809. let num = 0
  7810. for (let val in DBSite) {
  7811. DBSite[val].SiteTypeID = num = num + 1;
  7812. }
  7813. }
  7814. // 获取 Cookie
  7815. function getCookie(name) {
  7816. if (!name) return ''
  7817. let arr = document.cookie.split(';');
  7818. name += '='
  7819. for (let i=0; i<arr.length; i++) {
  7820. let now = arr[i].trim();
  7821. if (now.indexOf(name) == 0) return now.substring(name.length, now.length);
  7822. }
  7823. return '';
  7824. }
  7825. // 插入位置
  7826. function getAddTo(num) {
  7827. switch (num) {
  7828. case 1:
  7829. return 'beforebegin'; break;
  7830. case 2:
  7831. return 'afterbegin'; break;
  7832. case 3:
  7833. case 6:
  7834. return 'beforeend'; break;
  7835. case 4:
  7836. case 5:
  7837. return 'afterend'; break;
  7838. }
  7839. }
  7840. // 滚动条事件
  7841. function windowScroll(fn1) {
  7842. var beforeScrollTop = document.documentElement.scrollTop || document.body.scrollTop,
  7843. fn = fn1 || function () {};
  7844. setTimeout(function () { // 延时 1 秒执行,避免刚载入到页面就触发翻页事件
  7845. window.addEventListener('scroll', function (e) {
  7846. var afterScrollTop = document.documentElement.scrollTop || document.body.scrollTop,
  7847. delta = afterScrollTop - beforeScrollTop;
  7848. if (delta == 0) return false;
  7849. fn(delta > 0 ? 'down' : 'up', e);
  7850. beforeScrollTop = afterScrollTop;
  7851. }, false);
  7852. }, 1000)
  7853. }
  7854. // 自定义 urlchange 事件(用来监听 URL 变化)
  7855. function addUrlChangeEvent() {
  7856. history.pushState = ( f => function pushState(){
  7857. var ret = f.apply(this, arguments);
  7858. window.dispatchEvent(new Event('pushstate'));
  7859. window.dispatchEvent(new Event('urlchange'));
  7860. return ret;
  7861. })(history.pushState);
  7862.  
  7863. history.replaceState = ( f => function replaceState(){
  7864. var ret = f.apply(this, arguments);
  7865. window.dispatchEvent(new Event('replacestate'));
  7866. window.dispatchEvent(new Event('urlchange'));
  7867. return ret;
  7868. })(history.replaceState);
  7869.  
  7870. window.addEventListener('popstate',()=>{
  7871. window.dispatchEvent(new Event('urlchange'))
  7872. });
  7873. }
  7874. })();