From 77686b1e2f017921294c51de82c113dabaf944cc Mon Sep 17 00:00:00 2001 From: the1812 Date: Mon, 10 Feb 2020 11:25:06 +0800 Subject: [PATCH] Add media query for narrow width --- bilibili-evolved.offline.user.js | 10 +-- bilibili-evolved.preview-offline.user.js | 10 +-- bilibili-evolved.preview.user.js | 8 +-- bilibili-evolved.user.js | 8 +-- min/bundle.json | 8 +-- min/bundle.zip | Bin 1651810 -> 1652297 bytes min/minimal-home.vue.min.js | 2 +- min/simple-home-feeds.vue.min.js | 2 +- min/simple-home-normal-category.vue.min.js | 2 +- min/video-list.vue.min.js | 2 +- .../minimal-home/minimal-home.vue | 12 ++++ .../simplify-home/minimal-home/video-list.vue | 13 +++- .../simple-home-normal-category.vue | 1 + .../simple-home/simple-home-feeds.vue | 59 ++---------------- 14 files changed, 55 insertions(+), 82 deletions(-) diff --git a/bilibili-evolved.offline.user.js b/bilibili-evolved.offline.user.js index 356bafe1c..00feb4e3b 100644 --- a/bilibili-evolved.offline.user.js +++ b/bilibili-evolved.offline.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name Bilibili Evolved (Offline) -// @version 573.78 +// @version 573.82 // @description Bilibili Evolved 的离线版, 所有功能都已内置于脚本中. // @author Grant Howard, Coulomb-G // @copyright 2019, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G) @@ -1258,7 +1258,7 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/medal-helper.min.css"] = `.medal-popup *{transition:.2s}.medal-popup ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,1fr)}.round-corner .medal-popup ul>li{border-radius:var(--corner-radius)}.medal-popup ul>li.active{box-shadow:0 0 0 1px var(--theme-color)}.medal-popup ul>li:hover{background-color:rgba(0,0,0,.16)}.medal-popup label{display:flex;align-items:center;justify-content:center;cursor:pointer;padding:8px}.medal-popup label>*{flex-shrink:0}.medal-popup input[type=radio]{display:none;width:0;margin:0;padding:0}.medal-popup input[type=radio]~i{opacity:0;transform:scale(.8);margin:0}.medal-popup input[type=radio]~.fans-medal-item{margin:0 4px}.medal-popup input[type=radio]:checked~i{opacity:1}.title-image{display:inline-block;vertical-align:middle;height:20px}.fans-medal-item{display:inline-block;height:14px;line-height:14px;color:#fff;border:1px solid #61decb;border-left:0;white-space:nowrap;border-radius:2px;flex-shrink:0;font-size:12px}.fans-medal-item .label{width:40px;text-align:center;padding:0 2px;color:#fff}.fans-medal-item .level{width:16px;background-color:#fff;text-align:center;color:#61decb}.fans-medal-item .label,.fans-medal-item .level{cursor:pointer;position:relative;display:block;float:left}.level-1{border-color:#61decb}.level-1 .label{background-color:#61decb}.level-1 .level{color:#61decb}.level-2{border-color:#61decb}.level-2 .label{background-color:#61decb}.level-2 .level{color:#61decb}.level-3{border-color:#61decb}.level-3 .label{background-color:#61decb}.level-3 .level{color:#61decb}.level-4{border-color:#61decb}.level-4 .label{background-color:#61decb}.level-4 .level{color:#61decb}.level-5{border-color:#5896de}.level-5 .label{background-color:#5896de}.level-5 .level{color:#5896de}.level-6{border-color:#5896de}.level-6 .label{background-color:#5896de}.level-6 .level{color:#5896de}.level-7{border-color:#5896de}.level-7 .label{background-color:#5896de}.level-7 .level{color:#5896de}.level-8{border-color:#5896de}.level-8 .label{background-color:#5896de}.level-8 .level{color:#5896de}.level-9{border-color:#a068f1}.level-9 .label{background-color:#a068f1}.level-9 .level{color:#a068f1}.level-10{border-color:#a068f1}.level-10 .label{background-color:#a068f1}.level-10 .level{color:#a068f1}.level-11{border-color:#a068f1}.level-11 .label{background-color:#a068f1}.level-11 .level{color:#a068f1}.level-12{border-color:#a068f1}.level-12 .label{background-color:#a068f1}.level-12 .level{color:#a068f1}.level-13{border-color:#ff86b2}.level-13 .label{background-color:#ff86b2}.level-13 .level{color:#ff86b2}.level-14{border-color:#ff86b2}.level-14 .label{background-color:#ff86b2}.level-14 .level{color:#ff86b2}.level-15{border-color:#ff86b2}.level-15 .label{background-color:#ff86b2}.level-15 .level{color:#ff86b2}.level-16{border-color:#ff86b2}.level-16 .label{background-color:#ff86b2}.level-16 .level{color:#ff86b2}.level-17{border-color:#f6be18}.level-17 .label{background-color:#f6be18}.level-17 .level{color:#f6be18}.level-18{border-color:#f6be18}.level-18 .label{background-color:#f6be18}.level-18 .level{color:#f6be18}.level-19{border-color:#f6be18}.level-19 .label{background-color:#f6be18}.level-19 .level{color:#f6be18}.level-20{border-color:#f6be18}.level-20 .label{background-color:#f6be18}.level-20 .level{color:#f6be18}`; offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/medal-helper.min.html"] = `
更换勋章
更换头衔
`; offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/medal-helper.min.js"] = (()=>{return(e,t)=>{const i=()=>{const e=document.URL.match(/live\.bilibili\.com\/(\d+)/);if(!e){return}const t=parseInt(e[1]);if(isNaN(t)){console.warn(`roomID not found`);return}return t};class a{constructor(e=false,t=0){this.isActive=e;this.id=t}static parseJson(e,t){const i=JSON.parse(e);if(i.code!==0){logError(`${t.errorMessage} 错误码:${i.code} ${i.message||""}`);return t.errorAction(i)}return t.successAction(i)}}class s extends a{constructor(e){const{medal_id:t,status:i,level:a,medalName:s,uname:r,roomid:n}=e;super(i===1,t);this.level=a;this.name=s;this.upName=r;this.roomID=n}static async getList(){return a.parseJson(await Ajax.getTextWithCredentials("https://api.live.bilibili.com/i/api/medal?page=1&pageSize=256"),{successAction:e=>e.data.fansMedalList.map(e=>new s(e)),errorAction:()=>[],errorMessage:"无法获取勋章列表."})}static getContainer(){return document.querySelector("#medal-helper .medal-popup ul")}getItemTemplate(e){if(!e){e=this}return`\n
  • \n\n
  • `}async activate(){if(this.isActive){return true}return a.parseJson(await Ajax.getTextWithCredentials(`https://api.live.bilibili.com/i/ajaxWearFansMedal?medal_id=${this.id}`),{successAction:()=>{this.isActive=true;return true},errorAction:()=>false,errorMessage:"佩戴勋章失败."})}async deactivate(){if(!this.isActive){return true}return a.parseJson(await Ajax.getTextWithCredentials(`https://api.live.bilibili.com/i/ajaxCancelWear`),{successAction:()=>{this.isActive=false;return true},errorAction:()=>false,errorMessage:"卸下勋章失败."})}}class r extends a{constructor(e){const{id:t,cid:i,wear:a,css:s,name:n,source:c}=e;super(a,s);this.tid=t;this.cid=i;this.name=n;this.source=c;r.getImageMap().then(e=>{this.imageUrl=e[this.id]})}static async getImageMap(){if(r.imageMap===undefined){return a.parseJson(await Ajax.getTextWithCredentials("https://api.live.bilibili.com/rc/v1/Title/webTitles"),{successAction(e){r.imageMap={};e.data.forEach(e=>{r.imageMap[e.identification]=e.web_pic_url});return r.imageMap},errorAction:()=>{return{}},errorMessage:"获取头衔图片失败."})}else{return r.imageMap}}static async getList(){return a.parseJson(await Ajax.getTextWithCredentials("https://api.live.bilibili.com/i/api/ajaxTitleInfo?page=1&pageSize=256&had=1"),{successAction:e=>e.data.list.map(e=>new r(e)),errorAction:()=>[],errorMessage:"无法获取头衔列表."})}static getContainer(){return document.querySelector("#title-helper .medal-popup ul")}getItemTemplate(e){if(!e){e=this}return`\n
  • \n\n
  • `}async activate(){if(this.isActive){return true}return a.parseJson(await Ajax.postTextWithCredentials(`https://api.live.bilibili.com/i/ajaxWearTitle`,`id=${this.tid}&cid=${this.cid}&csrf=${getCsrf()}&csrf_token=${getCsrf()}`),{successAction:()=>{this.isActive=true;return true},errorAction:()=>false,errorMessage:"佩戴头衔失败."})}async deactivate(){if(!this.isActive){return true}return a.parseJson(await Ajax.postTextWithCredentials(`https://api.live.bilibili.com/i/ajaxCancelWearTitle`,""),{successAction:()=>{this.isActive=false;return true},errorAction:()=>false,errorMessage:"卸下头衔失败."})}}async function n(t,i){const a=t();const r=await i();const n=async()=>{const e=await i();e.forEach(e=>{const t=a.querySelector(`li[data-id='${e.id}']`);if(e.isActive){t.classList.add("active")}else{t.classList.remove("active")}t.querySelector(`input`).checked=e.isActive})};r.forEach(t=>{const i=t.getItemTemplate();a.insertAdjacentHTML("beforeend",i);const c=a.querySelector(`li[data-id='${t.id}']`);const l=c.querySelector(`input`);c.addEventListener("click",i=>{if(i.target===l){return}if(t.isActive){t.deactivate().then(n)}else{const i=r.find(e=>e.isActive);if(i){i.isActive=false}t.activate().then(()=>{if(t instanceof s){e.defaultMedalID=t.id}}).then(n)}})})}if(e.autoMatchMedal){(async()=>{const t=document.URL.match(/live\.bilibili\.com\/(\d+)/);if(!t){return}const i=parseInt(t[1]);if(isNaN(i)){console.warn(`roomID not found`);return}const a=await s.getList();if(!e.defaultMedalID){const t=a.find(e=>e.isActive);if(t){e.defaultMedalID=t.id;console.log(`set defaultMedalID to activeMedal (${t.id})`)}}const r=e.defaultMedalID?a.find(t=>t.id===e.defaultMedalID):a.find(e=>e.isActive);const n=a.find(e=>e.roomID===i);if(!n){if(r){await r.activate();console.log(`no matchMedal, fallback to defaultMedal (${r.id})`)}}else{await n.activate();console.log(`activated matchMedal (${n.id})`)}})()}return{export:{Badge:a,Medal:s,Title:r},widget:{condition:()=>document.domain==="live.bilibili.com",content:t.import("medalHelperHtml"),success:async()=>{document.querySelectorAll(".medal-helper").forEach(e=>{const t=e.querySelector(".medal-popup");e.addEventListener("click",e=>{if(!t.contains(e.target)){t.classList.toggle("opened")}})});n(s.getContainer,s.getList);await r.getImageMap();n(r.getContainer,r.getList)}}}}})(); -offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/minimal-home.vue.min.js"] = (()=>{return(i,e)=>{const a=`
    {{tab.displayName}}
    `;e.applyStyleFromText(`.minimal-home{--card-width:600px;--card-height:120px;--card-margin:16px;--card-column-count:2;transform:translateX(calc(var(--card-margin)/ 2))}.minimal-home,.minimal-home *{box-sizing:border-box;transition:color .2s ease-out,opacity .2s ease-out,transform .2s ease-out,background-color .2s ease-out}.minimal-home .logo{font-size:40px;color:var(--theme-color)}.minimal-home .minimal-home-header{display:flex;align-items:center;justify-content:space-between}.minimal-home .minimal-home-header .home-tabs{display:flex;flex-grow:1;justify-content:center;margin-right:var(--card-margin)}.minimal-home .minimal-home-header .home-tabs .tab{color:#000;opacity:.75;position:relative;cursor:pointer}.minimal-home .minimal-home-header .home-tabs .tab:not(:first-child){margin-left:32px}body.dark .minimal-home .minimal-home-header .home-tabs .tab{color:#eee}.minimal-home .minimal-home-header .home-tabs .tab.active{transform:scale(1.2);opacity:1;font-weight:700}.minimal-home .minimal-home-header .home-tabs .tab::after{content:"";position:absolute;bottom:-8px;left:50%;transform:translateX(-50%) scaleX(0);height:3px;width:24px;background-color:var(--theme-color);border-radius:2px;transition:.2s ease-out}.minimal-home .minimal-home-header .home-tabs .tab.active::after{transform:translateX(-50%) scaleX(1)}.minimal-home .minimal-home-content{margin-top:32px;min-height:100vh;width:calc(var(--card-column-count) * (var(--card-width) + var(--card-margin)))}.minimal-home .minimal-home-content .minimal-home-content-transition-enter-active,.minimal-home .minimal-home-content .minimal-home-content-transition-leave-active{transition:.3s ease-out}.minimal-home .minimal-home-content .minimal-home-content-transition-enter,.minimal-home .minimal-home-content .minimal-home-content-transition-leave-to{opacity:0;transform:scale(.95)}.minimal-home .minimal-home-footer{padding:24px 0;display:flex;justify-content:space-around;align-items:center;margin-right:var(--card-margin)}.minimal-home .minimal-home-footer .footer-button{display:flex;align-items:center;padding:8px 12px 8px 8px;background-color:#8882;color:#000;border-radius:24px;font-size:11pt;cursor:pointer}.minimal-home .minimal-home-footer .footer-button .be-icon{margin-right:8px}body.dark .minimal-home .minimal-home-footer .footer-button{color:#eee}.minimal-home .minimal-home-footer .footer-button:hover{background-color:#8884}@media screen and (max-width:1300px){.minimal-home{--card-column-count:1}}@media screen and (min-width:2000px){.minimal-home{--card-column-count:3}.minimal-home .cards.show-rank .video-card:nth-child(16),.minimal-home .cards.show-rank .video-card:nth-child(24),.minimal-home .cards.show-rank .video-card:nth-child(8){margin-right:calc(var(--card-margin) * 2 + var(--card-width))}}`,"minimal-home-style");const o=[{name:"video",displayName:"视频动态",active:true,more:"https://t.bilibili.com/?tab=8",showRank:false},{name:"ranking",displayName:"热门视频",active:false,more:"https://www.bilibili.com/ranking",showRank:true}];return{export:Object.assign({template:a},{components:{Icon:()=>e.importAsync("icon.vue"),VideoList:()=>e.importAsync("video-list.vue")},data(){return{tabs:o,content:"VideoList",logoImage:null}},computed:{activeTab(){return this.tabs.find(i=>i.active)},rankDays(){return this.activeTab.rankDays||0}},async mounted(){},methods:{changeTab(i){if(i.active){window.open(i.more,"_blank");return}const e=this.activeTab;e.active=false;i.active=true},goToTop(){scrollTo(0,0)},viewMore(){open(this.activeTab.more,"_blank")}}})}}})(); +offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/minimal-home.vue.min.js"] = (()=>{return(i,a)=>{const e=`
    {{tab.displayName}}
    `;a.applyStyleFromText(`.minimal-home{--card-width:600px;--card-height:120px;--card-margin:16px;--card-column-count:2;transform:translateX(calc(var(--card-margin)/ 2))}.minimal-home,.minimal-home *{box-sizing:border-box;transition:color .2s ease-out,opacity .2s ease-out,transform .2s ease-out,background-color .2s ease-out}.minimal-home .logo{font-size:40px;color:var(--theme-color)}.minimal-home .minimal-home-header{display:flex;align-items:center;justify-content:space-between}.minimal-home .minimal-home-header .home-tabs{display:flex;flex-grow:1;justify-content:center;margin-right:var(--card-margin)}.minimal-home .minimal-home-header .home-tabs .tab{color:#000;opacity:.75;position:relative;cursor:pointer}.minimal-home .minimal-home-header .home-tabs .tab:not(:first-child){margin-left:32px}body.dark .minimal-home .minimal-home-header .home-tabs .tab{color:#eee}.minimal-home .minimal-home-header .home-tabs .tab.active{transform:scale(1.2);opacity:1;font-weight:700}.minimal-home .minimal-home-header .home-tabs .tab::after{content:"";position:absolute;bottom:-8px;left:50%;transform:translateX(-50%) scaleX(0);height:3px;width:24px;background-color:var(--theme-color);border-radius:2px;transition:.2s ease-out}.minimal-home .minimal-home-header .home-tabs .tab.active::after{transform:translateX(-50%) scaleX(1)}.minimal-home .minimal-home-content{margin-top:32px;min-height:100vh;width:calc(var(--card-column-count) * (var(--card-width) + var(--card-margin)))}.minimal-home .minimal-home-content .minimal-home-content-transition-enter-active,.minimal-home .minimal-home-content .minimal-home-content-transition-leave-active{transition:.3s ease-out}.minimal-home .minimal-home-content .minimal-home-content-transition-enter,.minimal-home .minimal-home-content .minimal-home-content-transition-leave-to{opacity:0;transform:scale(.95)}.minimal-home .minimal-home-footer{padding:24px 0;display:flex;justify-content:space-around;align-items:center;margin-right:var(--card-margin)}.minimal-home .minimal-home-footer .footer-button{display:flex;align-items:center;padding:8px 12px 8px 8px;background-color:#8882;color:#000;border-radius:24px;font-size:11pt;cursor:pointer}.minimal-home .minimal-home-footer .footer-button .be-icon{margin-right:8px}body.dark .minimal-home .minimal-home-footer .footer-button{color:#eee}.minimal-home .minimal-home-footer .footer-button:hover{background-color:#8884}@media screen and (max-width:1300px){.minimal-home{--card-column-count:1}}@media screen and (max-width:680px){.minimal-home{--card-column-count:2;--card-width:210px;--card-height:240px}}@media screen and (max-width:470px){.minimal-home{--card-column-count:1}}@media screen and (min-width:2000px){.minimal-home{--card-column-count:3}.minimal-home .cards.show-rank .video-card:nth-child(16),.minimal-home .cards.show-rank .video-card:nth-child(24),.minimal-home .cards.show-rank .video-card:nth-child(8){margin-right:calc(var(--card-margin) * 2 + var(--card-width))}}`,"minimal-home-style");const o=[{name:"video",displayName:"视频动态",active:true,more:"https://t.bilibili.com/?tab=8",showRank:false},{name:"ranking",displayName:"热门视频",active:false,more:"https://www.bilibili.com/ranking",showRank:true}];return{export:Object.assign({template:e},{components:{Icon:()=>a.importAsync("icon.vue"),VideoList:()=>a.importAsync("video-list.vue")},data(){return{tabs:o,content:"VideoList",logoImage:null}},computed:{activeTab(){return this.tabs.find(i=>i.active)},rankDays(){return this.activeTab.rankDays||0}},async mounted(){},methods:{changeTab(i){if(i.active){window.open(i.more,"_blank");return}const a=this.activeTab;a.active=false;i.active=true},goToTop(){scrollTo(0,0)},viewMore(){open(this.activeTab.more,"_blank")}}})}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/mini-player-touch-move.min.css"] = `#bofqi.mini-player .drag-bar{touch-action:none!important;height:40px!important;line-height:40px!important;top:-40px!important}#bofqi.mini-player .drag-bar i:last-child{margin:10px!important}`; offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/mini-player-touch-move.min.js"] = (()=>{return(e,o)=>{const i=async(e=true)=>{if(!["//www.bilibili.com/bangumi/play/","//www.bilibili.com/video/"].some(e=>document.URL.includes(e))){return}const i=await SpinQuery.select("#bofqi");if(!i){console.warn("mini player touch move: player not found");return}const{enableTouchMove:n,disableTouchMove:l}=await o.importAsync("touch-move");if(e){o.applyStyle("miniPlayerTouchMoveStyle");n(i,{minMoveDistance:0})}else{o.removeStyle("miniPlayerTouchMoveStyle");l(i)}};i(true);return{reload:()=>i(true),unload:()=>i(false)}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/narrow-danmaku.min.js"] = (()=>{return(e,l)=>{const i=``;l.applyStyleFromText(i);return{reload:()=>l.applyStyleFromText(i),unload:()=>document.getElementById("narrow-danmaku-style").remove()}}})(); @@ -1300,8 +1300,8 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simple-home.vue.min.js"] = (()=>{return(e,o)=>{const t=`
    `;o.applyStyleFromText(`.simple-home{--title-color:black;color:#444;display:grid;grid-template-areas:"blackboards trendings trendings" "feeds feeds info" "categories categories categories";grid-template-columns:repeat(3,auto);grid-template-rows:repeat(3,auto);column-gap:32px;row-gap:16px}.simple-home,.simple-home *{transition:.2s ease-out}body.dark .simple-home{--title-color:white;color:#ddd}.simple-home .jump-dots{grid-area:dots;align-self:center;justify-self:center}.simple-home .jump-dots label{display:block}.simple-home .jump-dots label:not(:last-child){margin-bottom:6px}.simple-home .jump-dots .jump-dot{background-color:#ddd;width:8px;height:20px;border-radius:8px;cursor:pointer}body.dark .simple-home .jump-dots .jump-dot{background-color:#444}.simple-home .hidden-input{display:none}.simple-home .hidden-input:checked:nth-of-type(1)~.jump-dots label:nth-child(1) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(1)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 0 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(2)~.jump-dots label:nth-child(2) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(2)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 1 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(3)~.jump-dots label:nth-child(3) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(3)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 2 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(4)~.jump-dots label:nth-child(4) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(4)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 3 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(5)~.jump-dots label:nth-child(5) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(5)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 4 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(6)~.jump-dots label:nth-child(6) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(6)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 5 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(7)~.jump-dots label:nth-child(7) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(7)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 6 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(8)~.jump-dots label:nth-child(8) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(8)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 7 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(9)~.jump-dots label:nth-child(9) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(9)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 8 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(10)~.jump-dots label:nth-child(10) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(10)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 9 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(11)~.jump-dots label:nth-child(11) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(11)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 10 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(12)~.jump-dots label:nth-child(12) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(12)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 11 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(13)~.jump-dots label:nth-child(13) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(13)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 12 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(14)~.jump-dots label:nth-child(14) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(14)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 13 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(15)~.jump-dots label:nth-child(15) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(15)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 14 * var(--blackboard-height)))}.simple-home .more,.simple-home .toggle-reorder{cursor:pointer;padding:4px 12px 4px 8px;display:flex;align-items:center;border-radius:16px;font-size:13px;font-weight:700}.simple-home .more .be-icon,.simple-home .toggle-reorder .be-icon{margin-right:8px;transition:.3s cubic-bezier(.25,.46,.45,.94);font-size:22px;font-weight:400}.simple-home .more:not(.toggle-reorder):hover .be-icon,.simple-home .toggle-reorder:not(.toggle-reorder):hover .be-icon{transform:rotate(180deg)}.simple-home .more,.simple-home .more.hover,.simple-home .toggle-reorder,.simple-home .toggle-reorder.hover{color:inherit!important;background-color:#ddd!important}body.dark .simple-home .more,body.dark .simple-home .more:hover,body.dark .simple-home .toggle-reorder,body.dark .simple-home .toggle-reorder:hover{color:inherit!important;background-color:#333!important}.simple-home .header{grid-area:header;display:flex;justify-content:space-between;align-items:center}.simple-home .header .title{color:var(--title-color);font-weight:700;font-size:22px}.simple-home .header .tabs{display:flex;align-items:center}.simple-home .header .tabs .tab{cursor:pointer;position:relative;white-space:nowrap}.simple-home .header .tabs .tab .tab-name{opacity:.5;font-size:14px}.simple-home .header .tabs .tab:not(:last-child){margin-right:24px}.simple-home .header .tabs .tab::after{content:"";width:calc(80%);height:3px;border-radius:2px;position:absolute;background-color:var(--theme-color);left:10%;bottom:-6px;transform:scaleX(0);transition:.2s ease-out}.simple-home .header .tabs .tab.active::after{transform:scaleX(1)}.simple-home .header .tabs .tab.active .tab-name{font-weight:700;opacity:1;transform:scale(1.1)}.simple-home .sub-header{color:var(--title-color);font-weight:700;font-size:18px;display:flex;align-items:center}.simple-home .sub-header::before{content:"";display:block;width:12px;height:12px;background-color:var(--theme-color);border-radius:50%;margin-right:8px}.simple-home .blackboards{grid-area:blackboards;justify-self:start}.simple-home .trendings{grid-area:trendings;transform:translateX(8px);justify-self:end}.simple-home .info-row{grid-area:info;justify-self:end}.simple-home .feeds{grid-area:feeds;transform:translateX(-8px);justify-self:start}.simple-home .categories{grid-area:categories;padding-bottom:32px}@media screen and (max-width:900px){.simple-home{grid-template-areas:"blackboards" "trendings" "info" "feeds" "categories";grid-template-columns:1fr;grid-template-rows:repeat(5,auto)}.simple-home .blackboards,.simple-home .categories,.simple-home .feeds,.simple-home .info-row,.simple-home .trendings{justify-self:center}}`,"simple-home-style");return{export:Object.assign({template:t},{components:{Blackboards:()=>o.importAsync("blackboard.vue"),TrendingVideos:()=>o.importAsync("trending-videos.vue"),InfoRow:()=>o.importAsync("online-info-row.vue"),Feeds:()=>o.importAsync("simple-home-feeds.vue"),Categories:()=>o.importAsync("simple-home-categories.vue")}})}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simple-home-bangumi-category.vue.min.js"] = (()=>{return(i,e)=>{const a=`
    `;e.applyStyleFromText(`.simple-home .bangumi-category{display:grid;--total-height:1010px;--rank-width:350px;--rank-height:calc(var(--rank-width) / 16 * 10);grid-template:"timeline rank" 1fr/1fr var(--rank-width);grid-row-gap:24px;row-gap:24px;grid-column-gap:32px;column-gap:32px;position:relative}@media screen and (min-width:1800px){.simple-home .bangumi-category{--rank-width:365px}}@media screen and (min-width:1500px){.simple-home .bangumi-category{--rank-width:365px}}@media screen and (min-width:1200px){.simple-home .bangumi-category{--rank-width:365px}}@media screen and (min-width:1700px){.simple-home .bangumi-category{--rank-width:380px}}@media screen and (min-width:1400px){.simple-home .bangumi-category{--rank-width:380px}}@media screen and (min-width:1100px){.simple-home .bangumi-category{--rank-width:380px}}@media screen and (min-width:1600px){.simple-home .bangumi-category{--rank-width:395px}}@media screen and (min-width:1300px){.simple-home .bangumi-category{--rank-width:395px}}@media screen and (min-width:1000px){.simple-home .bangumi-category{--rank-width:395px}}.simple-home .bangumi-category,.simple-home .bangumi-category *,.simple-home .bangumi-category ::after,.simple-home .bangumi-category ::before{transition:.2s ease-out}.simple-home .bangumi-category .loading{opacity:0;pointer-events:none;border-radius:16px;position:absolute}.simple-home .bangumi-category .timeline{grid-area:timeline}.simple-home .bangumi-category.timeline-loading .timeline.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.simple-home .bangumi-category.timeline-loading .timeline:not(.loading){opacity:0;pointer-events:none}.simple-home .bangumi-category .rank{height:var(--total-height);grid-area:rank}.simple-home .bangumi-category.rank-loading .rank.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.simple-home .bangumi-category.rank-loading .rank:not(.loading){opacity:0;pointer-events:none}`,"simple-home-bangumi-category-style");return{export:Object.assign({template:a},{components:{BangumiTimeline:()=>e.importAsync("bangumi-timeline.vue"),RankList:()=>e.importAsync("rank-list.vue")},props:["rid"],data(){return{timeline:{error:false,loading:true},rank:{error:false,loading:true,videos:[]}}},computed:{timelineType(){return this.rid===13?"global":"chinese"}},watch:{rid(){this.loadRankList()}},methods:{async loadRankList(){const{RegionCodes:i}=await e.importAsync("category-regions");const a=this.rid===i.bangumi?`https://api.bilibili.com/pgc/web/rank/list?season_type=1&day=3`:`https://api.bilibili.com/pgc/web/rank/list?season_type=4&day=3`;try{const i=await Ajax.getJson(a);if(i.code!==0){throw new Error(i.message)}const e=i.result.list.map(i=>{return{id:i.season_id,href:i.url,coverUrl:i.new_ep.cover.replace("http:","https:"),title:i.title,points:i.pts,epTitle:i.new_ep.index_show,playCount:i.stat.view,danmakuCount:i.stat.danmaku,watchlater:null}});this.rank.videos=e.slice(0,10)}catch(i){logError(i);this.rank.error=true}finally{this.rank.loading=false}}},mounted(){this.loadRankList()}})}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simple-home-categories.vue.min.js"] = (()=>{return(e,t)=>{const r=`
    分区
    {{t.name}}
    {{reordering ? '完成' : '排序'}}
    `;t.applyStyleFromText(`.simple-home .categories{--loading-from:#d4d4d4;--loading-to:#ddd;--slideshow-ratio:0.6;--rank-width:370px;--rank-height:calc(var(--rank-width) / 16 * 10);--card-height:280px;--card-width:calc(var(--card-height) * (42 / 25));display:flex;flex-direction:column}body.dark .simple-home .categories{--loading-from:#333;--loading-to:#262626}@keyframes category-loading{from{background-color:var(--loading-from)}to{background-color:var(--loading-to)}}@media screen and (max-width:1800px){.simple-home .categories{--card-height:272px;--rank-width:350px}}@media screen and (max-width:1700px){.simple-home .categories{--card-height:264px;--rank-width:330px}}@media screen and (max-width:1600px){.simple-home .categories{--card-height:256px;--rank-width:310px}}@media screen and (max-width:1500px){.simple-home .categories{--card-height:248px;--rank-width:290px}}@media screen and (max-width:1400px){.simple-home .categories{--card-height:240px;--rank-width:270px}}@media screen and (max-width:1300px){.simple-home .categories{--card-height:232px;--rank-width:250px}}@media screen and (max-width:1200px){.simple-home .categories{--card-height:224px;--rank-width:230px}}@media screen and (max-width:1100px){.simple-home .categories{--card-height:216px;--rank-width:210px}}@media screen and (max-width:1000px){.simple-home .categories{--card-height:208px;--rank-width:190px}}@media screen and (max-width:900px){.simple-home .categories{--card-height:200px;--rank-width:170px}}@media screen and (max-width:800px){.simple-home .categories{--card-height:192px;--rank-width:150px}}@media screen and (max-width:700px){.simple-home .categories{--card-height:184px;--rank-width:130px}}.simple-home .categories,.simple-home .categories *,.simple-home .categories ::after,.simple-home .categories ::before{transition:.2s ease-out}.simple-home .categories .header .tabs{display:flex;flex:1 1 0;margin:0 32px;justify-content:flex-start;overflow:auto;width:0;height:42px;scrollbar-width:none!important}.simple-home .categories .header .tabs::-webkit-scrollbar{height:0!important;width:0!important}.simple-home .categories .header .tabs .tab{transition:none;margin-right:24px}.simple-home .categories .area-header{grid-area:header;display:flex;align-items:center;justify-content:flex-start;font-weight:700;font-size:11pt;padding-bottom:12px}.simple-home .categories .area-header::before{content:"";display:inline-flex;height:10px;width:10px;background-color:var(--theme-color);border-radius:50%;margin-right:8px}.simple-home .categories .category-content{margin-top:12px;margin-bottom:36px}.simple-home .categories .category-content-enter,.simple-home .categories .category-content-leave-to{opacity:0}`,"simple-home-categories-style");const i={anime:"动画",bangumi:"番剧",china:"国创",manga:"漫画",music:"音乐",dance:"舞蹈",game:"游戏",tech:"科技",digital:"数码",life:"生活",kichiku:"鬼畜",fashion:"时尚",ads:"广告",entertainment:"娱乐",column:"专栏",movie:"电影",tv:"TV剧",film:"影视",documentary:"纪录片"};return{export:Object.assign({template:r},{components:{Icon:()=>t.importAsync("icon.vue"),NormalCategory:()=>t.importAsync("simple-home-normal-category.vue"),BangumiCategory:()=>t.importAsync("simple-home-bangumi-category.vue")},data(){return{tabs:Object.entries(i).map(([e,t])=>{return{key:e,name:t}}),selectedTab:Object.entries(e.simpleHomeCategoryOrders).sort((e,t)=>e[1]-t[1])[0][0],reordering:false,reorder:null,regionCodes:null}},async mounted(){const r=this.$refs.reorderContainer;const{RegionCodes:i}=await t.importAsync("category-regions");this.regionCodes=i;const{Reorder:a}=await t.importAsync("reorder");const o=new a(r);this.reorder=o;o.addEventListener("reorder",t=>{const r=t.detail;for(const t of r){const{element:r,order:i}=t;e.simpleHomeCategoryOrders[r.getAttribute("data-key")]=i}e.simpleHomeCategoryOrders=e.simpleHomeCategoryOrders})},methods:{getOrder(t){return e.simpleHomeCategoryOrders[t]}},computed:{content(){if(["bangumi","china"].includes(this.selectedTab)){return"BangumiCategory"}else if(this.selectedTab==="manga"){return null}else if(this.selectedTab==="column"){return null}else{return"NormalCategory"}},rid(){if(!this.regionCodes){return-1}else{return this.regionCodes[this.selectedTab]}}}})}}})(); -offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simple-home-feeds.vue.min.js"] = (()=>{return(e,t)=>{const a=`
    没有动态哦(´・_・\`)
    `;t.applyStyleFromText(`.simple-home .feeds{justify-self:start;display:grid;grid-template-areas:"header header" "contents contents";grid-template-columns:repeat(2,auto);grid-template-rows:repeat(2,auto);row-gap:16px;column-gap:16px}.simple-home .feeds .header,.simple-home .feeds .sub-header{padding:0 8px}.simple-home .feeds .header .tab:nth-child(2),.simple-home .feeds .sub-header .tab:nth-child(2){margin-left:32px}.simple-home .feeds .header .online,.simple-home .feeds .sub-header .online{padding:8px 16px;height:32px;border-radius:16px;background-color:#8882;color:inherit;font-size:12px;display:flex;align-items:center;box-sizing:border-box}.simple-home .feeds .contents{grid-area:contents;display:flex;overflow:auto;--card-width:200px;--card-height:250px;--card-count:3;width:calc((var(--card-width) + 16px) * var(--card-count));padding-bottom:16px;scroll-snap-type:x mandatory;scrollbar-width:none!important;min-height:calc(var(--card-height) + 16px)}@media screen and (min-width:1100px){.simple-home .feeds .contents{--card-count:3}}@media screen and (min-width:1300px){.simple-home .feeds .contents{--card-count:4}}@media screen and (min-width:1550px){.simple-home .feeds .contents{--card-count:5}}.simple-home .feeds .contents::-webkit-scrollbar{width:0!important;height:0!important}.simple-home .feeds .contents .card-wrapper{padding:0 8px;scroll-snap-align:start;flex-shrink:0}.simple-home .feeds .contents .empty{display:flex;align-items:center;justify-content:center;width:100%;font-size:16px}`,"simple-home-feeds-style");const i=[{name:"视频",type:"video",url:"https://t.bilibili.com/?tab=8"},{name:"番剧",type:"bangumi",url:"https://t.bilibili.com/?tab=512"}];return{export:Object.assign({template:a},{components:{VideoCard:()=>t.importAsync("video-card.vue"),Icon:()=>t.importAsync("icon.vue")},data(){return{online:"--",tabs:i,currentTab:i[0],feedCards:[]}},watch:{currentTab(e){this.updateFeedCards(e)}},methods:{async updateFeedCards(e){const{getVideoFeeds:a}=await t.importAsync("feeds-apis");this.feedCards=await a(e.type)},changeTab(e){if(this.currentTab===e){open(e.url,"_blank")}else{this.currentTab=e}}},async mounted(){this.updateFeedCards(this.currentTab);const e=await Ajax.getJson("https://api.bilibili.com/x/web-interface/online");if(e.code===0){this.online=e.data.web_online}}})}}})(); -offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simple-home-normal-category.vue.min.js"] = (()=>{return(t,i)=>{const e=`
    `;i.applyStyleFromText(`.category-view{display:grid;grid-template:"new-activity rank" 1fr "new-post rank" 1fr/1fr calc(1.5 * var(--rank-width) + 10px);grid-row-gap:24px;row-gap:24px;grid-column-gap:32px;column-gap:32px;position:relative}.category-view,.category-view *,.category-view ::after,.category-view ::before{transition:.2s ease-out}.category-view .loading{opacity:0;pointer-events:none;border-radius:16px;position:absolute}.category-view .new-activity{align-self:start;grid-area:new-activity}.category-view .new-post{align-self:end;grid-area:new-post}.category-view.new-activity-loading .new-activity.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.new-activity-loading .new-activity:not(.loading){opacity:0;pointer-events:none}.category-view.new-post-loading .new-post.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.new-post-loading .new-post:not(.loading){opacity:0;pointer-events:none}.category-view .rank{grid-area:rank}.category-view.rank-loading .rank.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.rank-loading .rank:not(.loading){opacity:0;pointer-events:none}@media screen and (max-width:1300px){.category-view{grid-template:"new-activity" 1fr "new-post" 1fr "rank" auto/1fr}.category-view .rank{justify-self:center}}`,"simple-home-normal-category-style");return{export:Object.assign({template:e},{components:{SlideshowCards:()=>i.importAsync("slideshow-cards.vue"),RankList:()=>i.importAsync("rank-list.vue")},store:store,props:{rid:{type:Number,required:true}},data(){return{newActivity:{error:false,loading:true,videos:[]},newPost:{error:false,loading:true,videos:[]},rank:{error:false,loading:true,videos:[]},loaded:false}},computed:{...Vuex.mapState(["watchlaterList"])},methods:{async loadCards(t,i,e){if(e===undefined){e=(t=>{const i=getUID();const e=_.get(t,"data.archives",[]);return e.map(t=>{return{id:t.aid,aid:t.aid,coverUrl:t.pic.replace("http:","https:"),title:t.title,upName:t.owner.name,upFaceUrl:t.owner.face.replace("http:","https:"),upID:t.owner.mid,playCount:t.stat.view,danmakuCount:t.stat.danmaku,like:t.stat.like,coins:t.stat.coin,description:t.desc,type:t.tname,watchlater:i?this.watchlaterList.includes(t.aid):null}})})}try{this[t].loading=true;const a=await Ajax.getJson(i);if(a.code!==0){this[t].error=true}this[t].videos=e(a)}catch(i){logError(i);this[t].error=true}finally{this[t].loading=false}},async loadNewActivity(){await this.loadCards("newActivity",`https://api.bilibili.com/x/web-interface/dynamic/region?ps=10&rid=${this.rid}`)},async loadNewPost(){await this.loadCards("newPost",`https://api.bilibili.com/x/web-interface/newlist?ps=10&rid=${this.rid}`)},async loadRank(){await this.loadCards("rank",`https://api.bilibili.com/x/web-interface/ranking/region?rid=${this.rid}&day=3&original=0`,t=>{const i=getUID();const e=t.data;return e.map(t=>{return{id:t.aid,aid:parseInt(t.aid),title:t.title,playCount:t.play,favorites:t.favorites,upID:t.mid,upName:t.author,description:t.description,coverUrl:t.pic.replace("http:","https:"),coins:t.coins,durationText:t.duration,points:t.pts,watchlater:i?this.watchlaterList.includes(parseInt(t.aid)):null}})})},...Vuex.mapActions(["toggleWatchlater"]),updateVideos(){this.loadNewActivity();this.loadNewPost();this.loadRank()}},watch:{rid(t){if(t>0){if(this.loaded){this.updateVideos()}}else{console.warn(`rid=${t}`)}}},mounted(){const t=new IntersectionObserver(()=>{this.updateVideos();this.loaded=true;t.disconnect()});t.observe(this.$el)}})}}})(); +offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simple-home-feeds.vue.min.js"] = (()=>{return(e,t)=>{const a=`
    没有动态哦(´・_・\`)
    `;t.applyStyleFromText(`.simple-home .feeds{justify-self:start;display:grid;grid-template-areas:"header header" "contents contents";grid-template-columns:repeat(2,auto);grid-template-rows:repeat(2,auto);row-gap:16px;column-gap:16px}.simple-home .feeds .header,.simple-home .feeds .sub-header{padding:0 8px}.simple-home .feeds .header .tab:nth-child(2),.simple-home .feeds .sub-header .tab:nth-child(2){margin-left:32px}.simple-home .feeds .header .online,.simple-home .feeds .sub-header .online{padding:8px 16px;height:32px;border-radius:16px;background-color:#8882;color:inherit;font-size:12px;display:flex;align-items:center;box-sizing:border-box}.simple-home .feeds .contents{grid-area:contents;display:flex;overflow:auto;--card-width:200px;--card-height:250px;--card-count:2;width:calc((var(--card-width) + 16px) * var(--card-count));padding-bottom:16px;scroll-snap-type:x mandatory;scrollbar-width:none!important;min-height:calc(var(--card-height) + 16px)}@media screen and (max-width:900px){.simple-home .feeds .contents{--card-count:3}}@media screen and (min-width:1100px){.simple-home .feeds .contents{--card-count:3}}@media screen and (min-width:1300px){.simple-home .feeds .contents{--card-count:4}}@media screen and (min-width:1550px){.simple-home .feeds .contents{--card-count:5}}.simple-home .feeds .contents::-webkit-scrollbar{width:0!important;height:0!important}.simple-home .feeds .contents .card-wrapper{padding:0 8px;scroll-snap-align:start;flex-shrink:0}.simple-home .feeds .contents .empty{display:flex;align-items:center;justify-content:center;width:100%;font-size:16px}`,"simple-home-feeds-style");const i=[{name:"视频",type:"video",url:"https://t.bilibili.com/?tab=8"},{name:"番剧",type:"bangumi",url:"https://t.bilibili.com/?tab=512"}];return{export:Object.assign({template:a},{components:{VideoCard:()=>t.importAsync("video-card.vue"),Icon:()=>t.importAsync("icon.vue")},data(){return{online:"--",tabs:i,currentTab:i[0],feedCards:[]}},watch:{currentTab(e){this.updateFeedCards(e)}},methods:{async updateFeedCards(e){const{getVideoFeeds:a}=await t.importAsync("feeds-apis");this.feedCards=await a(e.type)},changeTab(e){if(this.currentTab===e){open(e.url,"_blank")}else{this.currentTab=e}}},async mounted(){this.updateFeedCards(this.currentTab);const e=await Ajax.getJson("https://api.bilibili.com/x/web-interface/online");if(e.code===0){this.online=e.data.web_online}}})}}})(); +offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simple-home-normal-category.vue.min.js"] = (()=>{return(t,i)=>{const e=`
    `;i.applyStyleFromText(`.category-view{display:grid;grid-template:"new-activity rank" 1fr "new-post rank" 1fr/1fr calc(1.5 * var(--rank-width) + 10px);grid-row-gap:24px;row-gap:24px;grid-column-gap:32px;column-gap:32px;position:relative}.category-view,.category-view *,.category-view ::after,.category-view ::before{transition:.2s ease-out}.category-view .loading{opacity:0;pointer-events:none;border-radius:16px;position:absolute}.category-view .new-activity{align-self:start;grid-area:new-activity}.category-view .new-post{align-self:end;grid-area:new-post}.category-view.new-activity-loading .new-activity.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.new-activity-loading .new-activity:not(.loading){opacity:0;pointer-events:none}.category-view.new-post-loading .new-post.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.new-post-loading .new-post:not(.loading){opacity:0;pointer-events:none}.category-view .rank{grid-area:rank}.category-view.rank-loading .rank.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.rank-loading .rank:not(.loading){opacity:0;pointer-events:none}@media screen and (max-width:1300px){.category-view{grid-template:"new-activity" 1fr "new-post" 1fr "rank" auto/1fr}.category-view .rank{display:none;justify-self:center}}`,"simple-home-normal-category-style");return{export:Object.assign({template:e},{components:{SlideshowCards:()=>i.importAsync("slideshow-cards.vue"),RankList:()=>i.importAsync("rank-list.vue")},store:store,props:{rid:{type:Number,required:true}},data(){return{newActivity:{error:false,loading:true,videos:[]},newPost:{error:false,loading:true,videos:[]},rank:{error:false,loading:true,videos:[]},loaded:false}},computed:{...Vuex.mapState(["watchlaterList"])},methods:{async loadCards(t,i,e){if(e===undefined){e=(t=>{const i=getUID();const e=_.get(t,"data.archives",[]);return e.map(t=>{return{id:t.aid,aid:t.aid,coverUrl:t.pic.replace("http:","https:"),title:t.title,upName:t.owner.name,upFaceUrl:t.owner.face.replace("http:","https:"),upID:t.owner.mid,playCount:t.stat.view,danmakuCount:t.stat.danmaku,like:t.stat.like,coins:t.stat.coin,description:t.desc,type:t.tname,watchlater:i?this.watchlaterList.includes(t.aid):null}})})}try{this[t].loading=true;const a=await Ajax.getJson(i);if(a.code!==0){this[t].error=true}this[t].videos=e(a)}catch(i){logError(i);this[t].error=true}finally{this[t].loading=false}},async loadNewActivity(){await this.loadCards("newActivity",`https://api.bilibili.com/x/web-interface/dynamic/region?ps=10&rid=${this.rid}`)},async loadNewPost(){await this.loadCards("newPost",`https://api.bilibili.com/x/web-interface/newlist?ps=10&rid=${this.rid}`)},async loadRank(){await this.loadCards("rank",`https://api.bilibili.com/x/web-interface/ranking/region?rid=${this.rid}&day=3&original=0`,t=>{const i=getUID();const e=t.data;return e.map(t=>{return{id:t.aid,aid:parseInt(t.aid),title:t.title,playCount:t.play,favorites:t.favorites,upID:t.mid,upName:t.author,description:t.description,coverUrl:t.pic.replace("http:","https:"),coins:t.coins,durationText:t.duration,points:t.pts,watchlater:i?this.watchlaterList.includes(parseInt(t.aid)):null}})})},...Vuex.mapActions(["toggleWatchlater"]),updateVideos(){this.loadNewActivity();this.loadNewPost();this.loadRank()}},watch:{rid(t){if(t>0){if(this.loaded){this.updateVideos()}}else{console.warn(`rid=${t}`)}}},mounted(){const t=new IntersectionObserver(()=>{this.updateVideos();this.loaded=true;t.disconnect()});t.observe(this.$el)}})}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simplify-home.min.css"] = `#app>.bili-header-m.stardust-common>.bili-wrapper,#app>.bili-wrapper,#app>.elevator-module,.bili-header-m .head-banner .head-content .head-logo,.international-footer,.international-header .b-wrap,.international-home>:not(.international-header){display:none!important}`; offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simplify-home.min.js"] = (()=>{return(e,i)=>{(async()=>{if(document.URL.replace(window.location.search,"")!=="https://www.bilibili.com/"){i.removeStyle("simplifyHomeStyle");return}document.body.insertAdjacentHTML("beforeend",`\n\n`);const m=new Vue({el:"simplify-home",components:{SimplifyHome:()=>i.importAsync("simplify-home.vue")},data:{homeStyle:e.simplifyHomeStyle}});addSettingsListener("simplifyHomeStyle",e=>m.homeStyle=e,false)})()}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simplify-home.vue.min.js"] = (()=>{return(e,o)=>{const m=`
    `;o.applyStyleFromText(`.simplify-home{padding-top:32px;display:flex;align-items:flex-start;justify-content:center;min-height:100vh;background-color:#f4f4f4}body.dark .simplify-home{background-color:#181818}.simplify-home .simplify-home-component{max-width:100%}html{scroll-behavior:smooth}`,"simplify-home-style");return{export:Object.assign({template:m},{components:{"minimal-home":()=>o.importAsync("minimal-home.vue"),"simple-home":()=>o.importAsync("simple-home.vue")},computed:{activeComponent(){return this.homeStyle==="清爽"?"simple-home":"minimal-home"}},props:{homeStyle:String}})}}})(); @@ -1335,7 +1335,7 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-dash.min.js"] = (()=>{return(t,e)=>{const a=t=>{return{url:t.downloadUrl,backupUrls:t.backupUrls,length:t.duration,size:Math.trunc(t.bandWidth*t.duration/8)}};const d=e=>{console.log(e.videoDashes);const d=(()=>{const a=e=>e.videoCodec===t.downloadVideoDashCodec;if(e.videoDashes.some(a)){return e.videoDashes.filter(a).sort(ascendingSort(t=>t.bandWidth))[0]}else{return e.videoDashes.sort(ascendingSort(t=>t.bandWidth))[0]}})();const o=e.audioDashes.sort(descendingSort(t=>t.bandWidth))[0];return[a(d),a(o)]};const o=async(t,e)=>{const a=await Ajax.getJsonWithCredentials(t);const d=a.data||a.result||a;if(a.code!==0||!d.dash){throw new Error("DASH api failed")}const o=d.accept_quality;if(!o.includes(e)){throw new Error("没有找到请求的清晰度")}if(d.quality!==e){throw new Error("无法获取请求的清晰度, 请确认当前账号有相应的权限")}const r=d.accept_description;const s=r[o.indexOf(e)];const c=d.dash.duration;const n=d.dash.video.filter(t=>t.id===e).map(t=>{const a=(()=>{switch(t.codecid){case 12:return"HEVC/H.265";default:case 7:return"AVC/H.264"}})();const d={quality:e,qualityText:s,width:t.width,height:t.height,codecs:t.codecs,codecId:t.codecid,bandWidth:t.bandwidth,frameRate:t.frameRate,backupUrls:(t.backupUrl||t.backup_url||[]).forEach(t=>t.replace("http:","https:")),downloadUrl:(t.baseUrl||t.base_url||"").replace("http:","https:"),duration:c,videoCodec:a};return d});const i=d.dash.audio.map(t=>{return{bandWidth:t.bandwidth,codecs:t.codecs,codecId:t.codecid,backupUrls:(t.backupUrl||t.backup_url||[]).forEach(t=>t.replace("http:","https:")),downloadUrl:(t.baseUrl||t.base_url||"").replace("http:","https:"),duration:c}});return{videoDashes:n,audioDashes:i}};return{export:{getDashInfo:o,dashToFragments:d}}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-downloader-fragment.min.js"] = (()=>{return(r,e)=>{}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-info.min.js"] = (()=>{return(t,i)=>{class e{constructor(t){this.aid=t}async fetchInfo(){let t;if(this.cid){t=`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}&cid=${this.cid}`}else{t=`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}`}const i=JSON.parse(await Ajax.getText(t));if(i.code!==0){throw new Error(i.message)}const e=i.data;this.cid=e.cid;this.pageCount=e.videos;this.coverUrl=e.pic;this.tagId=e.tid;this.tagName=e.tname;this.title=e.title;this.description=e.desc;this.up={uid:e.owner.mid,name:e.owner.name,faceUrl:e.owner.face};this.pages=e.pages.map(t=>{return{cid:t.cid,title:t.part,pageNumber:t.page}});this.subtitles=e.subtitle.list.map(t=>{return{id:t.id,languageCode:t.lan,language:t.lan_doc,url:t.subtitle_url.replace("http:","https:")}});return this}async fetchDanmaku(){this.danmaku=new s(this.cid.toString());return this.danmaku.fetchInfo()}}class a{constructor(t,i){this.text=t;this.p=i}}class s{constructor(t){this.cid=t}async fetchInfo(){const t=await Ajax.getText(`https://api.bilibili.com/x/v1/dm/list.so?oid=${this.cid}`);this.rawXML=t;const i=(new DOMParser).parseFromString(t,"application/xml").documentElement;this.xml=i;this.danmakus=[...i.querySelectorAll("d[p]")].map(t=>{return new a(t.innerHTML,t.getAttribute("p"))})}}class n{constructor(t){this.ep=t;this.videos=[]}async fetchInfo(){const t=await Ajax.getText(`https://www.bilibili.com/bangumi/play/ep${this.ep}/`);const i=JSON.parse(t.match(/window\.__INITIAL_STATE__=(.*);\(function\(\){/)[1]);this.title=i.mediaInfo.title;this.cover=i.mediaInfo.cover;this.squareCover=i.mediaInfo.square_cover;this.aid=i.epInfo.aid;this.cid=i.epInfo.cid;this.videos=i.epList.map(async t=>{return{title:t.index_title,aid:t.aid,cid:t.cid,info:await new e(t.aid).fetchInfo()}});return this}}return{export:{VideoInfo:e,BangumiInfo:n,Danmaku:a,DanmakuInfo:s}}}})(); -offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-list.vue.min.js"] = (()=>{return(i,e)=>{const a=`
    加载中...
    空空如也哦 = ̄ω ̄=
    `;e.applyStyleFromText(`.minimal-home .video-list .empty,.minimal-home .video-list .loading{height:48px;display:flex;align-items:center;justify-content:center;font-size:11pt;color:#707070}.minimal-home .video-list .empty .mdi,.minimal-home .video-list .loading .mdi{margin-right:8px}body.dark .minimal-home .video-list .empty,body.dark .minimal-home .video-list .loading{color:#eee}.minimal-home .video-list .cards{display:flex;flex-wrap:wrap;align-items:flex-end}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1),.minimal-home .video-list .cards.show-rank .video-card:nth-child(17),.minimal-home .video-list .cards.show-rank .video-card:nth-child(9){margin-top:48px}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1)::before,.minimal-home .video-list .cards.show-rank .video-card:nth-child(17)::before,.minimal-home .video-list .cards.show-rank .video-card:nth-child(9)::before{position:absolute;top:-42px;left:0;font-size:14pt;font-weight:700}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1)::before{content:"今日"}.minimal-home .video-list .cards.show-rank .video-card:nth-child(9)::before{content:"三日"}.minimal-home .video-list .cards.show-rank .video-card:nth-child(17)::before{content:"一周"}`,"video-list-style");return{export:Object.assign({template:a},{components:{VideoCard:()=>e.importAsync("video-card.vue")},props:["showRank"],data(){return{cards:[],loading:true}},methods:{async getRankList(){const{getTrendingVideos:i}=await e.importAsync("trending-videos");const a=async e=>{const a=await i(e);this.cards.push(...a)};await Promise.all([1,3,7].map(a))},async getActivityVideos(){const i=await Ajax.getJsonWithCredentials(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${getUID()}&type_list=8`);if(i.code!==0){throw new Error(i.message)}this.cards=i.data.cards.filter(i=>{return i.desc.orig_dy_id===0}).map(i=>{const e=JSON.parse(i.card);const a=_.get(i,"display.topic_info.topic_details",[]).map(i=>{return{id:i.topic_id,name:i.topic_name}});return{id:i.desc.dynamic_id_str,aid:e.aid,title:e.title,upID:i.desc.user_profile.info.uid,upName:i.desc.user_profile.info.uname,upFaceUrl:i.desc.user_profile.info.face,coverUrl:e.pic,description:e.desc,timestamp:i.timestamp,time:new Date(i.timestamp*1e3),topics:a,dynamic:e.dynamic,like:formatCount(i.desc.like),duration:e.duration,durationText:formatDuration(e.duration,0),playCount:formatCount(e.stat.view),danmakuCount:formatCount(e.stat.danmaku),watchlater:true}})}},async mounted(){try{if(this.showRank){await this.getRankList()}else{await this.getActivityVideos()}}catch(i){Toast.error(i.message,this.showRank?"热门视频":"视频动态",3e3)}finally{this.loading=false}}})}}})(); +offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-list.vue.min.js"] = (()=>{return(i,e)=>{const a=`
    加载中...
    空空如也哦 = ̄ω ̄=
    `;e.applyStyleFromText(`.minimal-home .video-list .empty,.minimal-home .video-list .loading{height:48px;display:flex;align-items:center;justify-content:center;font-size:11pt;color:#707070}.minimal-home .video-list .empty .mdi,.minimal-home .video-list .loading .mdi{margin-right:8px}body.dark .minimal-home .video-list .empty,body.dark .minimal-home .video-list .loading{color:#eee}.minimal-home .video-list .cards{display:flex;flex-wrap:wrap;align-items:flex-end}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1),.minimal-home .video-list .cards.show-rank .video-card:nth-child(17),.minimal-home .video-list .cards.show-rank .video-card:nth-child(9){margin-top:48px}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1)::before,.minimal-home .video-list .cards.show-rank .video-card:nth-child(17)::before,.minimal-home .video-list .cards.show-rank .video-card:nth-child(9)::before{position:absolute;top:-42px;left:0;font-size:14pt;font-weight:700}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1)::before{content:"今日"}.minimal-home .video-list .cards.show-rank .video-card:nth-child(9)::before{content:"三日"}.minimal-home .video-list .cards.show-rank .video-card:nth-child(17)::before{content:"一周"}`,"video-list-style");return{export:Object.assign({template:a},{components:{VideoCard:()=>e.importAsync("video-card.vue")},props:["showRank"],data(){return{cards:[],useVerticalCards:false,loading:true}},methods:{async getRankList(){const{getTrendingVideos:i}=await e.importAsync("trending-videos");const a=async e=>{const a=await i(e);this.cards.push(...a)};await Promise.all([1,3,7].map(a))},async getActivityVideos(){const i=await Ajax.getJsonWithCredentials(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${getUID()}&type_list=8`);if(i.code!==0){throw new Error(i.message)}this.cards=i.data.cards.filter(i=>{return i.desc.orig_dy_id===0}).map(i=>{const e=JSON.parse(i.card);const a=_.get(i,"display.topic_info.topic_details",[]).map(i=>{return{id:i.topic_id,name:i.topic_name}});return{id:i.desc.dynamic_id_str,aid:e.aid,title:e.title,upID:i.desc.user_profile.info.uid,upName:i.desc.user_profile.info.uname,upFaceUrl:i.desc.user_profile.info.face,coverUrl:e.pic,description:e.desc,timestamp:i.timestamp,time:new Date(i.timestamp*1e3),topics:a,dynamic:e.dynamic,like:formatCount(i.desc.like),duration:e.duration,durationText:formatDuration(e.duration,0),playCount:formatCount(e.stat.view),danmakuCount:formatCount(e.stat.danmaku),watchlater:true}})}},async mounted(){try{const i=matchMedia("(max-width: 680px)");this.useVerticalCards=i.matches;i.addListener(i=>{this.useVerticalCards=i.matches});if(this.showRank){await this.getRankList()}else{await this.getActivityVideos()}}catch(i){Toast.error(i.message,this.showRank?"热门视频":"视频动态",3e3)}finally{this.loading=false}}})}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-story.min.js"] = (()=>{return(t,i)=>{class e{constructor(t){this.title=t.option;this.nodeID=t.node_id;this.cid=t.cid;this.default=t.is_default===1}}class s{constructor(t,i,e){this.title=t.title;this.nodeID=t.node_id;this.aid=i;this.cid=t.cid;this.graphVersion=e;this.choices=[];this.choiceTime=-1}async getChoices(){if(this.choices.length>0){return}const t=`https://api.bilibili.com/x/stein/nodeinfo?aid=${this.aid}&node_id=${this.nodeID}&graph_version=504`;const i=await Ajax.getJsonWithCredentials(t);if(i.code!==0){console.error(`获取选项失败: ${i.message}`);return}this.choices=i.data.edges.choices.map(t=>new e(t))}}class o{constructor(t,i){this.nodeList=t;if(i){this.startingNode=i}else{[this.startingNode]=t}}async getAllChoices(){return await Promise.all(this.nodeList.map(t=>t.getChoices()))}}const n=async(t,i)=>{const n=`https://api.bilibili.com/x/stein/nodeinfo?aid=${t}&graph_version=${i}`;const c=await Ajax.getJsonWithCredentials(n);if(c.code!==0){return c.message}const a=c.data.story_list.map(e=>new s(e,t,i));const d=a.find(t=>t.nodeID===c.data.node_id);if(!d){return"获取起始结点失败"}d.choiceTime=c.data.edges.show_time;const r=c.data.edges.choices.map(t=>new e(t));d.choices=r;return new o(a,d)};return{export:{StoryChoice:e,StoryNode:s,Story:o,getStoryNodes:n}}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/view-cover.min.js"] = (()=>{return(e,t)=>{const{VideoInfo:i}=t.import("video-info");const{getFriendlyTitle:n}=t.import("title");class o{constructor(e){this.url=e;if(document.querySelector(".image-viewer")===null){this.createContainer()}this.viewer=document.querySelector(".image-viewer-container");this.downloadImage();addSettingsListener("filenameFormat",()=>{this.viewer.querySelector(".download").setAttribute("download",this.filename)})}createContainer(){document.body.insertAdjacentHTML("beforeend",t.import("imageViewerHtml"));document.querySelector(".image-viewer-container .close").addEventListener("click",()=>this.hide());t.applyStyle("imageViewerStyle")}downloadImage(){document.querySelector("#view-cover").style.display=this.url?"flex":"none";if(this.url===""){return}const e=new XMLHttpRequest;e.open("GET",this.url.replace("http:","https:"),true);e.responseType="blob";e.onload=(()=>{const t=URL.createObjectURL(e.response);if(this.imageData){URL.revokeObjectURL(this.imageData)}this.imageData=t;const i=this.viewer.querySelector(".download");i.setAttribute("href",t);i.setAttribute("download",this.filename);this.viewer.querySelector(".copy-link").addEventListener("click",()=>GM.setClipboard(this.url));this.viewer.querySelector(".new-tab").setAttribute("href",this.url);this.viewer.querySelector(".image").src=t});e.send()}show(){this.viewer.classList.add("opened")}hide(){this.viewer.classList.remove("opened")}get filename(){return n(document.URL.includes("/www.bilibili.com/bangumi/"))+this.url.substring(this.url.lastIndexOf("."))}}return(()=>{if(!document.URL.includes("live.bilibili.com")){return{widget:{content:`\n\n\n查看封面\n`,condition:async()=>{const e=await SpinQuery.select(()=>(unsafeWindow||window).aid);return Boolean(e)},success:async()=>{async function e(){const e=(unsafeWindow||window).aid;const t=new i(e);try{await t.fetchInfo()}catch(e){return""}return t.coverUrl}let t=new o(await e());document.querySelector("#view-cover").addEventListener("click",()=>{t.show()});const n=async()=>{t=new o(await e())};Observer.videoChange(n)}}}}else{return{widget:{content:`\n\n\n查看封面\n`,condition:async()=>{const e=await SpinQuery.select(()=>document.querySelector(".header-info-ctnr .room-cover"));return Boolean(e)},success:async()=>{const e=document.querySelector(".header-info-ctnr .room-cover");const t=e.getAttribute("href").match(/space\.bilibili\.com\/([\d]+)/);if(t&&t[1]){const e=t[1];const i=`https://api.live.bilibili.com/room/v1/Room/getRoomInfoOld?mid=${e}`;const n=await Ajax.getJson(i);const r=n.data.cover;const s=new o(r);document.querySelector("#view-cover").addEventListener("click",()=>{s.show()})}}}}}})()}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/watchlater.min.js"] = (()=>{return(e,t)=>{const i=e=>{const t=e.match(/(av[\d]+)\/p([\d]+)/);if(t){return`https://www.bilibili.com/video/${t[1]}/?p=${t[2]}`}else{return"javascript:;"}};const r=e=>{const t=e.map(e=>{const t=e.getAttribute("href");if(!t){return"javascript:;"}if(t.match(/.*watchlater.*|javascript:;/g)){return i(t)}if(t.indexOf("video/av")!==-1){return t}});e.forEach((e,i)=>{e.setAttribute("href",t[i]);e.setAttribute("target","_blank")})};const a=(...e)=>{for(const t of e){SpinQuery.select(()=>document.querySelectorAll(t),e=>r([...e]))}};SpinQuery.select(".watch-later-list").then(()=>{Observer.childListSubtree("#viewlater-app",()=>{SpinQuery.condition(()=>document.URL.match(/(av[\d]+)\/p([\d]+)/),e=>e&&document.URL.indexOf("watchlater")!==-1,()=>{const e=i(document.URL);if(e!==null){window.location.assign(e)}});SpinQuery.select("#viewlater-app .s-btn[href='#/']",e=>e.remove());a(".av-pic",".av-about>a")})});SpinQuery.select("li.nav-item[report-id*=watchlater]").then(()=>{Observer.childListSubtree("li.nav-item[report-id*=watchlater]",()=>{a(".av-item>a",".av-about>a","div.watch-later-m>ul>div>li>a");SpinQuery.select(".read-more.mr",e=>e.remove());SpinQuery.select(".read-more-grp>.read-more",e=>{e.style.width="auto";e.style.float="none"})})});SpinQuery.select(".van-popper-favorite").then(async e=>{if(!e){return}const t=Observer.childListSubtree(e,()=>{const i=e.querySelector(".play-all");if(i){const e="//www.bilibili.com/watchlater/#/list";Observer.attributes(i,()=>{if(i.getAttribute("href")==="//www.bilibili.com/watchlater/"){i.setAttribute("href",e);i.firstChild.classList.remove("bili-icon_dingdao_bofang");i.firstChild.classList.add("bili-icon_xinxi_yuedushu");i.lastChild.nodeValue="查看全部"}else if(i.getAttribute("href")!==e){i.firstChild.classList.add("bili-icon_dingdao_bofang");i.firstChild.classList.remove("bili-icon_xinxi_yuedushu");i.lastChild.nodeValue="播放全部"}});t.forEach(e=>e.stop())}})})}})(); diff --git a/bilibili-evolved.preview-offline.user.js b/bilibili-evolved.preview-offline.user.js index 2e8088a44..827127d23 100644 --- a/bilibili-evolved.preview-offline.user.js +++ b/bilibili-evolved.preview-offline.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name Bilibili Evolved (Preview Offline) -// @version 573.78 +// @version 573.82 // @description Bilibili Evolved 的预览离线版, 可以抢先体验新功能, 并且所有功能都已内置于脚本中. // @author Grant Howard, Coulomb-G // @copyright 2019, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G) @@ -1258,7 +1258,7 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/medal-helper.min.css"] = `.medal-popup *{transition:.2s}.medal-popup ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,1fr)}.round-corner .medal-popup ul>li{border-radius:var(--corner-radius)}.medal-popup ul>li.active{box-shadow:0 0 0 1px var(--theme-color)}.medal-popup ul>li:hover{background-color:rgba(0,0,0,.16)}.medal-popup label{display:flex;align-items:center;justify-content:center;cursor:pointer;padding:8px}.medal-popup label>*{flex-shrink:0}.medal-popup input[type=radio]{display:none;width:0;margin:0;padding:0}.medal-popup input[type=radio]~i{opacity:0;transform:scale(.8);margin:0}.medal-popup input[type=radio]~.fans-medal-item{margin:0 4px}.medal-popup input[type=radio]:checked~i{opacity:1}.title-image{display:inline-block;vertical-align:middle;height:20px}.fans-medal-item{display:inline-block;height:14px;line-height:14px;color:#fff;border:1px solid #61decb;border-left:0;white-space:nowrap;border-radius:2px;flex-shrink:0;font-size:12px}.fans-medal-item .label{width:40px;text-align:center;padding:0 2px;color:#fff}.fans-medal-item .level{width:16px;background-color:#fff;text-align:center;color:#61decb}.fans-medal-item .label,.fans-medal-item .level{cursor:pointer;position:relative;display:block;float:left}.level-1{border-color:#61decb}.level-1 .label{background-color:#61decb}.level-1 .level{color:#61decb}.level-2{border-color:#61decb}.level-2 .label{background-color:#61decb}.level-2 .level{color:#61decb}.level-3{border-color:#61decb}.level-3 .label{background-color:#61decb}.level-3 .level{color:#61decb}.level-4{border-color:#61decb}.level-4 .label{background-color:#61decb}.level-4 .level{color:#61decb}.level-5{border-color:#5896de}.level-5 .label{background-color:#5896de}.level-5 .level{color:#5896de}.level-6{border-color:#5896de}.level-6 .label{background-color:#5896de}.level-6 .level{color:#5896de}.level-7{border-color:#5896de}.level-7 .label{background-color:#5896de}.level-7 .level{color:#5896de}.level-8{border-color:#5896de}.level-8 .label{background-color:#5896de}.level-8 .level{color:#5896de}.level-9{border-color:#a068f1}.level-9 .label{background-color:#a068f1}.level-9 .level{color:#a068f1}.level-10{border-color:#a068f1}.level-10 .label{background-color:#a068f1}.level-10 .level{color:#a068f1}.level-11{border-color:#a068f1}.level-11 .label{background-color:#a068f1}.level-11 .level{color:#a068f1}.level-12{border-color:#a068f1}.level-12 .label{background-color:#a068f1}.level-12 .level{color:#a068f1}.level-13{border-color:#ff86b2}.level-13 .label{background-color:#ff86b2}.level-13 .level{color:#ff86b2}.level-14{border-color:#ff86b2}.level-14 .label{background-color:#ff86b2}.level-14 .level{color:#ff86b2}.level-15{border-color:#ff86b2}.level-15 .label{background-color:#ff86b2}.level-15 .level{color:#ff86b2}.level-16{border-color:#ff86b2}.level-16 .label{background-color:#ff86b2}.level-16 .level{color:#ff86b2}.level-17{border-color:#f6be18}.level-17 .label{background-color:#f6be18}.level-17 .level{color:#f6be18}.level-18{border-color:#f6be18}.level-18 .label{background-color:#f6be18}.level-18 .level{color:#f6be18}.level-19{border-color:#f6be18}.level-19 .label{background-color:#f6be18}.level-19 .level{color:#f6be18}.level-20{border-color:#f6be18}.level-20 .label{background-color:#f6be18}.level-20 .level{color:#f6be18}`; offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/medal-helper.min.html"] = `
    更换勋章
    更换头衔
    `; offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/medal-helper.min.js"] = (()=>{return(e,t)=>{const i=()=>{const e=document.URL.match(/live\.bilibili\.com\/(\d+)/);if(!e){return}const t=parseInt(e[1]);if(isNaN(t)){console.warn(`roomID not found`);return}return t};class a{constructor(e=false,t=0){this.isActive=e;this.id=t}static parseJson(e,t){const i=JSON.parse(e);if(i.code!==0){logError(`${t.errorMessage} 错误码:${i.code} ${i.message||""}`);return t.errorAction(i)}return t.successAction(i)}}class s extends a{constructor(e){const{medal_id:t,status:i,level:a,medalName:s,uname:r,roomid:n}=e;super(i===1,t);this.level=a;this.name=s;this.upName=r;this.roomID=n}static async getList(){return a.parseJson(await Ajax.getTextWithCredentials("https://api.live.bilibili.com/i/api/medal?page=1&pageSize=256"),{successAction:e=>e.data.fansMedalList.map(e=>new s(e)),errorAction:()=>[],errorMessage:"无法获取勋章列表."})}static getContainer(){return document.querySelector("#medal-helper .medal-popup ul")}getItemTemplate(e){if(!e){e=this}return`\n
  • \n\n
  • `}async activate(){if(this.isActive){return true}return a.parseJson(await Ajax.getTextWithCredentials(`https://api.live.bilibili.com/i/ajaxWearFansMedal?medal_id=${this.id}`),{successAction:()=>{this.isActive=true;return true},errorAction:()=>false,errorMessage:"佩戴勋章失败."})}async deactivate(){if(!this.isActive){return true}return a.parseJson(await Ajax.getTextWithCredentials(`https://api.live.bilibili.com/i/ajaxCancelWear`),{successAction:()=>{this.isActive=false;return true},errorAction:()=>false,errorMessage:"卸下勋章失败."})}}class r extends a{constructor(e){const{id:t,cid:i,wear:a,css:s,name:n,source:c}=e;super(a,s);this.tid=t;this.cid=i;this.name=n;this.source=c;r.getImageMap().then(e=>{this.imageUrl=e[this.id]})}static async getImageMap(){if(r.imageMap===undefined){return a.parseJson(await Ajax.getTextWithCredentials("https://api.live.bilibili.com/rc/v1/Title/webTitles"),{successAction(e){r.imageMap={};e.data.forEach(e=>{r.imageMap[e.identification]=e.web_pic_url});return r.imageMap},errorAction:()=>{return{}},errorMessage:"获取头衔图片失败."})}else{return r.imageMap}}static async getList(){return a.parseJson(await Ajax.getTextWithCredentials("https://api.live.bilibili.com/i/api/ajaxTitleInfo?page=1&pageSize=256&had=1"),{successAction:e=>e.data.list.map(e=>new r(e)),errorAction:()=>[],errorMessage:"无法获取头衔列表."})}static getContainer(){return document.querySelector("#title-helper .medal-popup ul")}getItemTemplate(e){if(!e){e=this}return`\n
  • \n\n
  • `}async activate(){if(this.isActive){return true}return a.parseJson(await Ajax.postTextWithCredentials(`https://api.live.bilibili.com/i/ajaxWearTitle`,`id=${this.tid}&cid=${this.cid}&csrf=${getCsrf()}&csrf_token=${getCsrf()}`),{successAction:()=>{this.isActive=true;return true},errorAction:()=>false,errorMessage:"佩戴头衔失败."})}async deactivate(){if(!this.isActive){return true}return a.parseJson(await Ajax.postTextWithCredentials(`https://api.live.bilibili.com/i/ajaxCancelWearTitle`,""),{successAction:()=>{this.isActive=false;return true},errorAction:()=>false,errorMessage:"卸下头衔失败."})}}async function n(t,i){const a=t();const r=await i();const n=async()=>{const e=await i();e.forEach(e=>{const t=a.querySelector(`li[data-id='${e.id}']`);if(e.isActive){t.classList.add("active")}else{t.classList.remove("active")}t.querySelector(`input`).checked=e.isActive})};r.forEach(t=>{const i=t.getItemTemplate();a.insertAdjacentHTML("beforeend",i);const c=a.querySelector(`li[data-id='${t.id}']`);const l=c.querySelector(`input`);c.addEventListener("click",i=>{if(i.target===l){return}if(t.isActive){t.deactivate().then(n)}else{const i=r.find(e=>e.isActive);if(i){i.isActive=false}t.activate().then(()=>{if(t instanceof s){e.defaultMedalID=t.id}}).then(n)}})})}if(e.autoMatchMedal){(async()=>{const t=document.URL.match(/live\.bilibili\.com\/(\d+)/);if(!t){return}const i=parseInt(t[1]);if(isNaN(i)){console.warn(`roomID not found`);return}const a=await s.getList();if(!e.defaultMedalID){const t=a.find(e=>e.isActive);if(t){e.defaultMedalID=t.id;console.log(`set defaultMedalID to activeMedal (${t.id})`)}}const r=e.defaultMedalID?a.find(t=>t.id===e.defaultMedalID):a.find(e=>e.isActive);const n=a.find(e=>e.roomID===i);if(!n){if(r){await r.activate();console.log(`no matchMedal, fallback to defaultMedal (${r.id})`)}}else{await n.activate();console.log(`activated matchMedal (${n.id})`)}})()}return{export:{Badge:a,Medal:s,Title:r},widget:{condition:()=>document.domain==="live.bilibili.com",content:t.import("medalHelperHtml"),success:async()=>{document.querySelectorAll(".medal-helper").forEach(e=>{const t=e.querySelector(".medal-popup");e.addEventListener("click",e=>{if(!t.contains(e.target)){t.classList.toggle("opened")}})});n(s.getContainer,s.getList);await r.getImageMap();n(r.getContainer,r.getList)}}}}})(); -offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/minimal-home.vue.min.js"] = (()=>{return(i,e)=>{const a=`
    {{tab.displayName}}
    `;e.applyStyleFromText(`.minimal-home{--card-width:600px;--card-height:120px;--card-margin:16px;--card-column-count:2;transform:translateX(calc(var(--card-margin)/ 2))}.minimal-home,.minimal-home *{box-sizing:border-box;transition:color .2s ease-out,opacity .2s ease-out,transform .2s ease-out,background-color .2s ease-out}.minimal-home .logo{font-size:40px;color:var(--theme-color)}.minimal-home .minimal-home-header{display:flex;align-items:center;justify-content:space-between}.minimal-home .minimal-home-header .home-tabs{display:flex;flex-grow:1;justify-content:center;margin-right:var(--card-margin)}.minimal-home .minimal-home-header .home-tabs .tab{color:#000;opacity:.75;position:relative;cursor:pointer}.minimal-home .minimal-home-header .home-tabs .tab:not(:first-child){margin-left:32px}body.dark .minimal-home .minimal-home-header .home-tabs .tab{color:#eee}.minimal-home .minimal-home-header .home-tabs .tab.active{transform:scale(1.2);opacity:1;font-weight:700}.minimal-home .minimal-home-header .home-tabs .tab::after{content:"";position:absolute;bottom:-8px;left:50%;transform:translateX(-50%) scaleX(0);height:3px;width:24px;background-color:var(--theme-color);border-radius:2px;transition:.2s ease-out}.minimal-home .minimal-home-header .home-tabs .tab.active::after{transform:translateX(-50%) scaleX(1)}.minimal-home .minimal-home-content{margin-top:32px;min-height:100vh;width:calc(var(--card-column-count) * (var(--card-width) + var(--card-margin)))}.minimal-home .minimal-home-content .minimal-home-content-transition-enter-active,.minimal-home .minimal-home-content .minimal-home-content-transition-leave-active{transition:.3s ease-out}.minimal-home .minimal-home-content .minimal-home-content-transition-enter,.minimal-home .minimal-home-content .minimal-home-content-transition-leave-to{opacity:0;transform:scale(.95)}.minimal-home .minimal-home-footer{padding:24px 0;display:flex;justify-content:space-around;align-items:center;margin-right:var(--card-margin)}.minimal-home .minimal-home-footer .footer-button{display:flex;align-items:center;padding:8px 12px 8px 8px;background-color:#8882;color:#000;border-radius:24px;font-size:11pt;cursor:pointer}.minimal-home .minimal-home-footer .footer-button .be-icon{margin-right:8px}body.dark .minimal-home .minimal-home-footer .footer-button{color:#eee}.minimal-home .minimal-home-footer .footer-button:hover{background-color:#8884}@media screen and (max-width:1300px){.minimal-home{--card-column-count:1}}@media screen and (min-width:2000px){.minimal-home{--card-column-count:3}.minimal-home .cards.show-rank .video-card:nth-child(16),.minimal-home .cards.show-rank .video-card:nth-child(24),.minimal-home .cards.show-rank .video-card:nth-child(8){margin-right:calc(var(--card-margin) * 2 + var(--card-width))}}`,"minimal-home-style");const o=[{name:"video",displayName:"视频动态",active:true,more:"https://t.bilibili.com/?tab=8",showRank:false},{name:"ranking",displayName:"热门视频",active:false,more:"https://www.bilibili.com/ranking",showRank:true}];return{export:Object.assign({template:a},{components:{Icon:()=>e.importAsync("icon.vue"),VideoList:()=>e.importAsync("video-list.vue")},data(){return{tabs:o,content:"VideoList",logoImage:null}},computed:{activeTab(){return this.tabs.find(i=>i.active)},rankDays(){return this.activeTab.rankDays||0}},async mounted(){},methods:{changeTab(i){if(i.active){window.open(i.more,"_blank");return}const e=this.activeTab;e.active=false;i.active=true},goToTop(){scrollTo(0,0)},viewMore(){open(this.activeTab.more,"_blank")}}})}}})(); +offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/minimal-home.vue.min.js"] = (()=>{return(i,a)=>{const e=`
    {{tab.displayName}}
    `;a.applyStyleFromText(`.minimal-home{--card-width:600px;--card-height:120px;--card-margin:16px;--card-column-count:2;transform:translateX(calc(var(--card-margin)/ 2))}.minimal-home,.minimal-home *{box-sizing:border-box;transition:color .2s ease-out,opacity .2s ease-out,transform .2s ease-out,background-color .2s ease-out}.minimal-home .logo{font-size:40px;color:var(--theme-color)}.minimal-home .minimal-home-header{display:flex;align-items:center;justify-content:space-between}.minimal-home .minimal-home-header .home-tabs{display:flex;flex-grow:1;justify-content:center;margin-right:var(--card-margin)}.minimal-home .minimal-home-header .home-tabs .tab{color:#000;opacity:.75;position:relative;cursor:pointer}.minimal-home .minimal-home-header .home-tabs .tab:not(:first-child){margin-left:32px}body.dark .minimal-home .minimal-home-header .home-tabs .tab{color:#eee}.minimal-home .minimal-home-header .home-tabs .tab.active{transform:scale(1.2);opacity:1;font-weight:700}.minimal-home .minimal-home-header .home-tabs .tab::after{content:"";position:absolute;bottom:-8px;left:50%;transform:translateX(-50%) scaleX(0);height:3px;width:24px;background-color:var(--theme-color);border-radius:2px;transition:.2s ease-out}.minimal-home .minimal-home-header .home-tabs .tab.active::after{transform:translateX(-50%) scaleX(1)}.minimal-home .minimal-home-content{margin-top:32px;min-height:100vh;width:calc(var(--card-column-count) * (var(--card-width) + var(--card-margin)))}.minimal-home .minimal-home-content .minimal-home-content-transition-enter-active,.minimal-home .minimal-home-content .minimal-home-content-transition-leave-active{transition:.3s ease-out}.minimal-home .minimal-home-content .minimal-home-content-transition-enter,.minimal-home .minimal-home-content .minimal-home-content-transition-leave-to{opacity:0;transform:scale(.95)}.minimal-home .minimal-home-footer{padding:24px 0;display:flex;justify-content:space-around;align-items:center;margin-right:var(--card-margin)}.minimal-home .minimal-home-footer .footer-button{display:flex;align-items:center;padding:8px 12px 8px 8px;background-color:#8882;color:#000;border-radius:24px;font-size:11pt;cursor:pointer}.minimal-home .minimal-home-footer .footer-button .be-icon{margin-right:8px}body.dark .minimal-home .minimal-home-footer .footer-button{color:#eee}.minimal-home .minimal-home-footer .footer-button:hover{background-color:#8884}@media screen and (max-width:1300px){.minimal-home{--card-column-count:1}}@media screen and (max-width:680px){.minimal-home{--card-column-count:2;--card-width:210px;--card-height:240px}}@media screen and (max-width:470px){.minimal-home{--card-column-count:1}}@media screen and (min-width:2000px){.minimal-home{--card-column-count:3}.minimal-home .cards.show-rank .video-card:nth-child(16),.minimal-home .cards.show-rank .video-card:nth-child(24),.minimal-home .cards.show-rank .video-card:nth-child(8){margin-right:calc(var(--card-margin) * 2 + var(--card-width))}}`,"minimal-home-style");const o=[{name:"video",displayName:"视频动态",active:true,more:"https://t.bilibili.com/?tab=8",showRank:false},{name:"ranking",displayName:"热门视频",active:false,more:"https://www.bilibili.com/ranking",showRank:true}];return{export:Object.assign({template:e},{components:{Icon:()=>a.importAsync("icon.vue"),VideoList:()=>a.importAsync("video-list.vue")},data(){return{tabs:o,content:"VideoList",logoImage:null}},computed:{activeTab(){return this.tabs.find(i=>i.active)},rankDays(){return this.activeTab.rankDays||0}},async mounted(){},methods:{changeTab(i){if(i.active){window.open(i.more,"_blank");return}const a=this.activeTab;a.active=false;i.active=true},goToTop(){scrollTo(0,0)},viewMore(){open(this.activeTab.more,"_blank")}}})}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/mini-player-touch-move.min.css"] = `#bofqi.mini-player .drag-bar{touch-action:none!important;height:40px!important;line-height:40px!important;top:-40px!important}#bofqi.mini-player .drag-bar i:last-child{margin:10px!important}`; offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/mini-player-touch-move.min.js"] = (()=>{return(e,o)=>{const i=async(e=true)=>{if(!["//www.bilibili.com/bangumi/play/","//www.bilibili.com/video/"].some(e=>document.URL.includes(e))){return}const i=await SpinQuery.select("#bofqi");if(!i){console.warn("mini player touch move: player not found");return}const{enableTouchMove:n,disableTouchMove:l}=await o.importAsync("touch-move");if(e){o.applyStyle("miniPlayerTouchMoveStyle");n(i,{minMoveDistance:0})}else{o.removeStyle("miniPlayerTouchMoveStyle");l(i)}};i(true);return{reload:()=>i(true),unload:()=>i(false)}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/narrow-danmaku.min.js"] = (()=>{return(e,l)=>{const i=``;l.applyStyleFromText(i);return{reload:()=>l.applyStyleFromText(i),unload:()=>document.getElementById("narrow-danmaku-style").remove()}}})(); @@ -1300,8 +1300,8 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simple-home.vue.min.js"] = (()=>{return(e,o)=>{const t=`
    `;o.applyStyleFromText(`.simple-home{--title-color:black;color:#444;display:grid;grid-template-areas:"blackboards trendings trendings" "feeds feeds info" "categories categories categories";grid-template-columns:repeat(3,auto);grid-template-rows:repeat(3,auto);column-gap:32px;row-gap:16px}.simple-home,.simple-home *{transition:.2s ease-out}body.dark .simple-home{--title-color:white;color:#ddd}.simple-home .jump-dots{grid-area:dots;align-self:center;justify-self:center}.simple-home .jump-dots label{display:block}.simple-home .jump-dots label:not(:last-child){margin-bottom:6px}.simple-home .jump-dots .jump-dot{background-color:#ddd;width:8px;height:20px;border-radius:8px;cursor:pointer}body.dark .simple-home .jump-dots .jump-dot{background-color:#444}.simple-home .hidden-input{display:none}.simple-home .hidden-input:checked:nth-of-type(1)~.jump-dots label:nth-child(1) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(1)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 0 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(2)~.jump-dots label:nth-child(2) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(2)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 1 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(3)~.jump-dots label:nth-child(3) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(3)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 2 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(4)~.jump-dots label:nth-child(4) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(4)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 3 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(5)~.jump-dots label:nth-child(5) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(5)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 4 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(6)~.jump-dots label:nth-child(6) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(6)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 5 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(7)~.jump-dots label:nth-child(7) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(7)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 6 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(8)~.jump-dots label:nth-child(8) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(8)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 7 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(9)~.jump-dots label:nth-child(9) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(9)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 8 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(10)~.jump-dots label:nth-child(10) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(10)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 9 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(11)~.jump-dots label:nth-child(11) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(11)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 10 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(12)~.jump-dots label:nth-child(12) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(12)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 11 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(13)~.jump-dots label:nth-child(13) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(13)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 12 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(14)~.jump-dots label:nth-child(14) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(14)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 13 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(15)~.jump-dots label:nth-child(15) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(15)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 14 * var(--blackboard-height)))}.simple-home .more,.simple-home .toggle-reorder{cursor:pointer;padding:4px 12px 4px 8px;display:flex;align-items:center;border-radius:16px;font-size:13px;font-weight:700}.simple-home .more .be-icon,.simple-home .toggle-reorder .be-icon{margin-right:8px;transition:.3s cubic-bezier(.25,.46,.45,.94);font-size:22px;font-weight:400}.simple-home .more:not(.toggle-reorder):hover .be-icon,.simple-home .toggle-reorder:not(.toggle-reorder):hover .be-icon{transform:rotate(180deg)}.simple-home .more,.simple-home .more.hover,.simple-home .toggle-reorder,.simple-home .toggle-reorder.hover{color:inherit!important;background-color:#ddd!important}body.dark .simple-home .more,body.dark .simple-home .more:hover,body.dark .simple-home .toggle-reorder,body.dark .simple-home .toggle-reorder:hover{color:inherit!important;background-color:#333!important}.simple-home .header{grid-area:header;display:flex;justify-content:space-between;align-items:center}.simple-home .header .title{color:var(--title-color);font-weight:700;font-size:22px}.simple-home .header .tabs{display:flex;align-items:center}.simple-home .header .tabs .tab{cursor:pointer;position:relative;white-space:nowrap}.simple-home .header .tabs .tab .tab-name{opacity:.5;font-size:14px}.simple-home .header .tabs .tab:not(:last-child){margin-right:24px}.simple-home .header .tabs .tab::after{content:"";width:calc(80%);height:3px;border-radius:2px;position:absolute;background-color:var(--theme-color);left:10%;bottom:-6px;transform:scaleX(0);transition:.2s ease-out}.simple-home .header .tabs .tab.active::after{transform:scaleX(1)}.simple-home .header .tabs .tab.active .tab-name{font-weight:700;opacity:1;transform:scale(1.1)}.simple-home .sub-header{color:var(--title-color);font-weight:700;font-size:18px;display:flex;align-items:center}.simple-home .sub-header::before{content:"";display:block;width:12px;height:12px;background-color:var(--theme-color);border-radius:50%;margin-right:8px}.simple-home .blackboards{grid-area:blackboards;justify-self:start}.simple-home .trendings{grid-area:trendings;transform:translateX(8px);justify-self:end}.simple-home .info-row{grid-area:info;justify-self:end}.simple-home .feeds{grid-area:feeds;transform:translateX(-8px);justify-self:start}.simple-home .categories{grid-area:categories;padding-bottom:32px}@media screen and (max-width:900px){.simple-home{grid-template-areas:"blackboards" "trendings" "info" "feeds" "categories";grid-template-columns:1fr;grid-template-rows:repeat(5,auto)}.simple-home .blackboards,.simple-home .categories,.simple-home .feeds,.simple-home .info-row,.simple-home .trendings{justify-self:center}}`,"simple-home-style");return{export:Object.assign({template:t},{components:{Blackboards:()=>o.importAsync("blackboard.vue"),TrendingVideos:()=>o.importAsync("trending-videos.vue"),InfoRow:()=>o.importAsync("online-info-row.vue"),Feeds:()=>o.importAsync("simple-home-feeds.vue"),Categories:()=>o.importAsync("simple-home-categories.vue")}})}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simple-home-bangumi-category.vue.min.js"] = (()=>{return(i,e)=>{const a=`
    `;e.applyStyleFromText(`.simple-home .bangumi-category{display:grid;--total-height:1010px;--rank-width:350px;--rank-height:calc(var(--rank-width) / 16 * 10);grid-template:"timeline rank" 1fr/1fr var(--rank-width);grid-row-gap:24px;row-gap:24px;grid-column-gap:32px;column-gap:32px;position:relative}@media screen and (min-width:1800px){.simple-home .bangumi-category{--rank-width:365px}}@media screen and (min-width:1500px){.simple-home .bangumi-category{--rank-width:365px}}@media screen and (min-width:1200px){.simple-home .bangumi-category{--rank-width:365px}}@media screen and (min-width:1700px){.simple-home .bangumi-category{--rank-width:380px}}@media screen and (min-width:1400px){.simple-home .bangumi-category{--rank-width:380px}}@media screen and (min-width:1100px){.simple-home .bangumi-category{--rank-width:380px}}@media screen and (min-width:1600px){.simple-home .bangumi-category{--rank-width:395px}}@media screen and (min-width:1300px){.simple-home .bangumi-category{--rank-width:395px}}@media screen and (min-width:1000px){.simple-home .bangumi-category{--rank-width:395px}}.simple-home .bangumi-category,.simple-home .bangumi-category *,.simple-home .bangumi-category ::after,.simple-home .bangumi-category ::before{transition:.2s ease-out}.simple-home .bangumi-category .loading{opacity:0;pointer-events:none;border-radius:16px;position:absolute}.simple-home .bangumi-category .timeline{grid-area:timeline}.simple-home .bangumi-category.timeline-loading .timeline.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.simple-home .bangumi-category.timeline-loading .timeline:not(.loading){opacity:0;pointer-events:none}.simple-home .bangumi-category .rank{height:var(--total-height);grid-area:rank}.simple-home .bangumi-category.rank-loading .rank.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.simple-home .bangumi-category.rank-loading .rank:not(.loading){opacity:0;pointer-events:none}`,"simple-home-bangumi-category-style");return{export:Object.assign({template:a},{components:{BangumiTimeline:()=>e.importAsync("bangumi-timeline.vue"),RankList:()=>e.importAsync("rank-list.vue")},props:["rid"],data(){return{timeline:{error:false,loading:true},rank:{error:false,loading:true,videos:[]}}},computed:{timelineType(){return this.rid===13?"global":"chinese"}},watch:{rid(){this.loadRankList()}},methods:{async loadRankList(){const{RegionCodes:i}=await e.importAsync("category-regions");const a=this.rid===i.bangumi?`https://api.bilibili.com/pgc/web/rank/list?season_type=1&day=3`:`https://api.bilibili.com/pgc/web/rank/list?season_type=4&day=3`;try{const i=await Ajax.getJson(a);if(i.code!==0){throw new Error(i.message)}const e=i.result.list.map(i=>{return{id:i.season_id,href:i.url,coverUrl:i.new_ep.cover.replace("http:","https:"),title:i.title,points:i.pts,epTitle:i.new_ep.index_show,playCount:i.stat.view,danmakuCount:i.stat.danmaku,watchlater:null}});this.rank.videos=e.slice(0,10)}catch(i){logError(i);this.rank.error=true}finally{this.rank.loading=false}}},mounted(){this.loadRankList()}})}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simple-home-categories.vue.min.js"] = (()=>{return(e,t)=>{const r=`
    分区
    {{t.name}}
    {{reordering ? '完成' : '排序'}}
    `;t.applyStyleFromText(`.simple-home .categories{--loading-from:#d4d4d4;--loading-to:#ddd;--slideshow-ratio:0.6;--rank-width:370px;--rank-height:calc(var(--rank-width) / 16 * 10);--card-height:280px;--card-width:calc(var(--card-height) * (42 / 25));display:flex;flex-direction:column}body.dark .simple-home .categories{--loading-from:#333;--loading-to:#262626}@keyframes category-loading{from{background-color:var(--loading-from)}to{background-color:var(--loading-to)}}@media screen and (max-width:1800px){.simple-home .categories{--card-height:272px;--rank-width:350px}}@media screen and (max-width:1700px){.simple-home .categories{--card-height:264px;--rank-width:330px}}@media screen and (max-width:1600px){.simple-home .categories{--card-height:256px;--rank-width:310px}}@media screen and (max-width:1500px){.simple-home .categories{--card-height:248px;--rank-width:290px}}@media screen and (max-width:1400px){.simple-home .categories{--card-height:240px;--rank-width:270px}}@media screen and (max-width:1300px){.simple-home .categories{--card-height:232px;--rank-width:250px}}@media screen and (max-width:1200px){.simple-home .categories{--card-height:224px;--rank-width:230px}}@media screen and (max-width:1100px){.simple-home .categories{--card-height:216px;--rank-width:210px}}@media screen and (max-width:1000px){.simple-home .categories{--card-height:208px;--rank-width:190px}}@media screen and (max-width:900px){.simple-home .categories{--card-height:200px;--rank-width:170px}}@media screen and (max-width:800px){.simple-home .categories{--card-height:192px;--rank-width:150px}}@media screen and (max-width:700px){.simple-home .categories{--card-height:184px;--rank-width:130px}}.simple-home .categories,.simple-home .categories *,.simple-home .categories ::after,.simple-home .categories ::before{transition:.2s ease-out}.simple-home .categories .header .tabs{display:flex;flex:1 1 0;margin:0 32px;justify-content:flex-start;overflow:auto;width:0;height:42px;scrollbar-width:none!important}.simple-home .categories .header .tabs::-webkit-scrollbar{height:0!important;width:0!important}.simple-home .categories .header .tabs .tab{transition:none;margin-right:24px}.simple-home .categories .area-header{grid-area:header;display:flex;align-items:center;justify-content:flex-start;font-weight:700;font-size:11pt;padding-bottom:12px}.simple-home .categories .area-header::before{content:"";display:inline-flex;height:10px;width:10px;background-color:var(--theme-color);border-radius:50%;margin-right:8px}.simple-home .categories .category-content{margin-top:12px;margin-bottom:36px}.simple-home .categories .category-content-enter,.simple-home .categories .category-content-leave-to{opacity:0}`,"simple-home-categories-style");const i={anime:"动画",bangumi:"番剧",china:"国创",manga:"漫画",music:"音乐",dance:"舞蹈",game:"游戏",tech:"科技",digital:"数码",life:"生活",kichiku:"鬼畜",fashion:"时尚",ads:"广告",entertainment:"娱乐",column:"专栏",movie:"电影",tv:"TV剧",film:"影视",documentary:"纪录片"};return{export:Object.assign({template:r},{components:{Icon:()=>t.importAsync("icon.vue"),NormalCategory:()=>t.importAsync("simple-home-normal-category.vue"),BangumiCategory:()=>t.importAsync("simple-home-bangumi-category.vue")},data(){return{tabs:Object.entries(i).map(([e,t])=>{return{key:e,name:t}}),selectedTab:Object.entries(e.simpleHomeCategoryOrders).sort((e,t)=>e[1]-t[1])[0][0],reordering:false,reorder:null,regionCodes:null}},async mounted(){const r=this.$refs.reorderContainer;const{RegionCodes:i}=await t.importAsync("category-regions");this.regionCodes=i;const{Reorder:a}=await t.importAsync("reorder");const o=new a(r);this.reorder=o;o.addEventListener("reorder",t=>{const r=t.detail;for(const t of r){const{element:r,order:i}=t;e.simpleHomeCategoryOrders[r.getAttribute("data-key")]=i}e.simpleHomeCategoryOrders=e.simpleHomeCategoryOrders})},methods:{getOrder(t){return e.simpleHomeCategoryOrders[t]}},computed:{content(){if(["bangumi","china"].includes(this.selectedTab)){return"BangumiCategory"}else if(this.selectedTab==="manga"){return null}else if(this.selectedTab==="column"){return null}else{return"NormalCategory"}},rid(){if(!this.regionCodes){return-1}else{return this.regionCodes[this.selectedTab]}}}})}}})(); -offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simple-home-feeds.vue.min.js"] = (()=>{return(e,t)=>{const a=`
    没有动态哦(´・_・\`)
    `;t.applyStyleFromText(`.simple-home .feeds{justify-self:start;display:grid;grid-template-areas:"header header" "contents contents";grid-template-columns:repeat(2,auto);grid-template-rows:repeat(2,auto);row-gap:16px;column-gap:16px}.simple-home .feeds .header,.simple-home .feeds .sub-header{padding:0 8px}.simple-home .feeds .header .tab:nth-child(2),.simple-home .feeds .sub-header .tab:nth-child(2){margin-left:32px}.simple-home .feeds .header .online,.simple-home .feeds .sub-header .online{padding:8px 16px;height:32px;border-radius:16px;background-color:#8882;color:inherit;font-size:12px;display:flex;align-items:center;box-sizing:border-box}.simple-home .feeds .contents{grid-area:contents;display:flex;overflow:auto;--card-width:200px;--card-height:250px;--card-count:3;width:calc((var(--card-width) + 16px) * var(--card-count));padding-bottom:16px;scroll-snap-type:x mandatory;scrollbar-width:none!important;min-height:calc(var(--card-height) + 16px)}@media screen and (min-width:1100px){.simple-home .feeds .contents{--card-count:3}}@media screen and (min-width:1300px){.simple-home .feeds .contents{--card-count:4}}@media screen and (min-width:1550px){.simple-home .feeds .contents{--card-count:5}}.simple-home .feeds .contents::-webkit-scrollbar{width:0!important;height:0!important}.simple-home .feeds .contents .card-wrapper{padding:0 8px;scroll-snap-align:start;flex-shrink:0}.simple-home .feeds .contents .empty{display:flex;align-items:center;justify-content:center;width:100%;font-size:16px}`,"simple-home-feeds-style");const i=[{name:"视频",type:"video",url:"https://t.bilibili.com/?tab=8"},{name:"番剧",type:"bangumi",url:"https://t.bilibili.com/?tab=512"}];return{export:Object.assign({template:a},{components:{VideoCard:()=>t.importAsync("video-card.vue"),Icon:()=>t.importAsync("icon.vue")},data(){return{online:"--",tabs:i,currentTab:i[0],feedCards:[]}},watch:{currentTab(e){this.updateFeedCards(e)}},methods:{async updateFeedCards(e){const{getVideoFeeds:a}=await t.importAsync("feeds-apis");this.feedCards=await a(e.type)},changeTab(e){if(this.currentTab===e){open(e.url,"_blank")}else{this.currentTab=e}}},async mounted(){this.updateFeedCards(this.currentTab);const e=await Ajax.getJson("https://api.bilibili.com/x/web-interface/online");if(e.code===0){this.online=e.data.web_online}}})}}})(); -offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simple-home-normal-category.vue.min.js"] = (()=>{return(t,i)=>{const e=`
    `;i.applyStyleFromText(`.category-view{display:grid;grid-template:"new-activity rank" 1fr "new-post rank" 1fr/1fr calc(1.5 * var(--rank-width) + 10px);grid-row-gap:24px;row-gap:24px;grid-column-gap:32px;column-gap:32px;position:relative}.category-view,.category-view *,.category-view ::after,.category-view ::before{transition:.2s ease-out}.category-view .loading{opacity:0;pointer-events:none;border-radius:16px;position:absolute}.category-view .new-activity{align-self:start;grid-area:new-activity}.category-view .new-post{align-self:end;grid-area:new-post}.category-view.new-activity-loading .new-activity.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.new-activity-loading .new-activity:not(.loading){opacity:0;pointer-events:none}.category-view.new-post-loading .new-post.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.new-post-loading .new-post:not(.loading){opacity:0;pointer-events:none}.category-view .rank{grid-area:rank}.category-view.rank-loading .rank.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.rank-loading .rank:not(.loading){opacity:0;pointer-events:none}@media screen and (max-width:1300px){.category-view{grid-template:"new-activity" 1fr "new-post" 1fr "rank" auto/1fr}.category-view .rank{justify-self:center}}`,"simple-home-normal-category-style");return{export:Object.assign({template:e},{components:{SlideshowCards:()=>i.importAsync("slideshow-cards.vue"),RankList:()=>i.importAsync("rank-list.vue")},store:store,props:{rid:{type:Number,required:true}},data(){return{newActivity:{error:false,loading:true,videos:[]},newPost:{error:false,loading:true,videos:[]},rank:{error:false,loading:true,videos:[]},loaded:false}},computed:{...Vuex.mapState(["watchlaterList"])},methods:{async loadCards(t,i,e){if(e===undefined){e=(t=>{const i=getUID();const e=_.get(t,"data.archives",[]);return e.map(t=>{return{id:t.aid,aid:t.aid,coverUrl:t.pic.replace("http:","https:"),title:t.title,upName:t.owner.name,upFaceUrl:t.owner.face.replace("http:","https:"),upID:t.owner.mid,playCount:t.stat.view,danmakuCount:t.stat.danmaku,like:t.stat.like,coins:t.stat.coin,description:t.desc,type:t.tname,watchlater:i?this.watchlaterList.includes(t.aid):null}})})}try{this[t].loading=true;const a=await Ajax.getJson(i);if(a.code!==0){this[t].error=true}this[t].videos=e(a)}catch(i){logError(i);this[t].error=true}finally{this[t].loading=false}},async loadNewActivity(){await this.loadCards("newActivity",`https://api.bilibili.com/x/web-interface/dynamic/region?ps=10&rid=${this.rid}`)},async loadNewPost(){await this.loadCards("newPost",`https://api.bilibili.com/x/web-interface/newlist?ps=10&rid=${this.rid}`)},async loadRank(){await this.loadCards("rank",`https://api.bilibili.com/x/web-interface/ranking/region?rid=${this.rid}&day=3&original=0`,t=>{const i=getUID();const e=t.data;return e.map(t=>{return{id:t.aid,aid:parseInt(t.aid),title:t.title,playCount:t.play,favorites:t.favorites,upID:t.mid,upName:t.author,description:t.description,coverUrl:t.pic.replace("http:","https:"),coins:t.coins,durationText:t.duration,points:t.pts,watchlater:i?this.watchlaterList.includes(parseInt(t.aid)):null}})})},...Vuex.mapActions(["toggleWatchlater"]),updateVideos(){this.loadNewActivity();this.loadNewPost();this.loadRank()}},watch:{rid(t){if(t>0){if(this.loaded){this.updateVideos()}}else{console.warn(`rid=${t}`)}}},mounted(){const t=new IntersectionObserver(()=>{this.updateVideos();this.loaded=true;t.disconnect()});t.observe(this.$el)}})}}})(); +offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simple-home-feeds.vue.min.js"] = (()=>{return(e,t)=>{const a=`
    没有动态哦(´・_・\`)
    `;t.applyStyleFromText(`.simple-home .feeds{justify-self:start;display:grid;grid-template-areas:"header header" "contents contents";grid-template-columns:repeat(2,auto);grid-template-rows:repeat(2,auto);row-gap:16px;column-gap:16px}.simple-home .feeds .header,.simple-home .feeds .sub-header{padding:0 8px}.simple-home .feeds .header .tab:nth-child(2),.simple-home .feeds .sub-header .tab:nth-child(2){margin-left:32px}.simple-home .feeds .header .online,.simple-home .feeds .sub-header .online{padding:8px 16px;height:32px;border-radius:16px;background-color:#8882;color:inherit;font-size:12px;display:flex;align-items:center;box-sizing:border-box}.simple-home .feeds .contents{grid-area:contents;display:flex;overflow:auto;--card-width:200px;--card-height:250px;--card-count:2;width:calc((var(--card-width) + 16px) * var(--card-count));padding-bottom:16px;scroll-snap-type:x mandatory;scrollbar-width:none!important;min-height:calc(var(--card-height) + 16px)}@media screen and (max-width:900px){.simple-home .feeds .contents{--card-count:3}}@media screen and (min-width:1100px){.simple-home .feeds .contents{--card-count:3}}@media screen and (min-width:1300px){.simple-home .feeds .contents{--card-count:4}}@media screen and (min-width:1550px){.simple-home .feeds .contents{--card-count:5}}.simple-home .feeds .contents::-webkit-scrollbar{width:0!important;height:0!important}.simple-home .feeds .contents .card-wrapper{padding:0 8px;scroll-snap-align:start;flex-shrink:0}.simple-home .feeds .contents .empty{display:flex;align-items:center;justify-content:center;width:100%;font-size:16px}`,"simple-home-feeds-style");const i=[{name:"视频",type:"video",url:"https://t.bilibili.com/?tab=8"},{name:"番剧",type:"bangumi",url:"https://t.bilibili.com/?tab=512"}];return{export:Object.assign({template:a},{components:{VideoCard:()=>t.importAsync("video-card.vue"),Icon:()=>t.importAsync("icon.vue")},data(){return{online:"--",tabs:i,currentTab:i[0],feedCards:[]}},watch:{currentTab(e){this.updateFeedCards(e)}},methods:{async updateFeedCards(e){const{getVideoFeeds:a}=await t.importAsync("feeds-apis");this.feedCards=await a(e.type)},changeTab(e){if(this.currentTab===e){open(e.url,"_blank")}else{this.currentTab=e}}},async mounted(){this.updateFeedCards(this.currentTab);const e=await Ajax.getJson("https://api.bilibili.com/x/web-interface/online");if(e.code===0){this.online=e.data.web_online}}})}}})(); +offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simple-home-normal-category.vue.min.js"] = (()=>{return(t,i)=>{const e=`
    `;i.applyStyleFromText(`.category-view{display:grid;grid-template:"new-activity rank" 1fr "new-post rank" 1fr/1fr calc(1.5 * var(--rank-width) + 10px);grid-row-gap:24px;row-gap:24px;grid-column-gap:32px;column-gap:32px;position:relative}.category-view,.category-view *,.category-view ::after,.category-view ::before{transition:.2s ease-out}.category-view .loading{opacity:0;pointer-events:none;border-radius:16px;position:absolute}.category-view .new-activity{align-self:start;grid-area:new-activity}.category-view .new-post{align-self:end;grid-area:new-post}.category-view.new-activity-loading .new-activity.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.new-activity-loading .new-activity:not(.loading){opacity:0;pointer-events:none}.category-view.new-post-loading .new-post.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.new-post-loading .new-post:not(.loading){opacity:0;pointer-events:none}.category-view .rank{grid-area:rank}.category-view.rank-loading .rank.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.rank-loading .rank:not(.loading){opacity:0;pointer-events:none}@media screen and (max-width:1300px){.category-view{grid-template:"new-activity" 1fr "new-post" 1fr "rank" auto/1fr}.category-view .rank{display:none;justify-self:center}}`,"simple-home-normal-category-style");return{export:Object.assign({template:e},{components:{SlideshowCards:()=>i.importAsync("slideshow-cards.vue"),RankList:()=>i.importAsync("rank-list.vue")},store:store,props:{rid:{type:Number,required:true}},data(){return{newActivity:{error:false,loading:true,videos:[]},newPost:{error:false,loading:true,videos:[]},rank:{error:false,loading:true,videos:[]},loaded:false}},computed:{...Vuex.mapState(["watchlaterList"])},methods:{async loadCards(t,i,e){if(e===undefined){e=(t=>{const i=getUID();const e=_.get(t,"data.archives",[]);return e.map(t=>{return{id:t.aid,aid:t.aid,coverUrl:t.pic.replace("http:","https:"),title:t.title,upName:t.owner.name,upFaceUrl:t.owner.face.replace("http:","https:"),upID:t.owner.mid,playCount:t.stat.view,danmakuCount:t.stat.danmaku,like:t.stat.like,coins:t.stat.coin,description:t.desc,type:t.tname,watchlater:i?this.watchlaterList.includes(t.aid):null}})})}try{this[t].loading=true;const a=await Ajax.getJson(i);if(a.code!==0){this[t].error=true}this[t].videos=e(a)}catch(i){logError(i);this[t].error=true}finally{this[t].loading=false}},async loadNewActivity(){await this.loadCards("newActivity",`https://api.bilibili.com/x/web-interface/dynamic/region?ps=10&rid=${this.rid}`)},async loadNewPost(){await this.loadCards("newPost",`https://api.bilibili.com/x/web-interface/newlist?ps=10&rid=${this.rid}`)},async loadRank(){await this.loadCards("rank",`https://api.bilibili.com/x/web-interface/ranking/region?rid=${this.rid}&day=3&original=0`,t=>{const i=getUID();const e=t.data;return e.map(t=>{return{id:t.aid,aid:parseInt(t.aid),title:t.title,playCount:t.play,favorites:t.favorites,upID:t.mid,upName:t.author,description:t.description,coverUrl:t.pic.replace("http:","https:"),coins:t.coins,durationText:t.duration,points:t.pts,watchlater:i?this.watchlaterList.includes(parseInt(t.aid)):null}})})},...Vuex.mapActions(["toggleWatchlater"]),updateVideos(){this.loadNewActivity();this.loadNewPost();this.loadRank()}},watch:{rid(t){if(t>0){if(this.loaded){this.updateVideos()}}else{console.warn(`rid=${t}`)}}},mounted(){const t=new IntersectionObserver(()=>{this.updateVideos();this.loaded=true;t.disconnect()});t.observe(this.$el)}})}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simplify-home.min.css"] = `#app>.bili-header-m.stardust-common>.bili-wrapper,#app>.bili-wrapper,#app>.elevator-module,.bili-header-m .head-banner .head-content .head-logo,.international-footer,.international-header .b-wrap,.international-home>:not(.international-header){display:none!important}`; offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simplify-home.min.js"] = (()=>{return(e,i)=>{(async()=>{if(document.URL.replace(window.location.search,"")!=="https://www.bilibili.com/"){i.removeStyle("simplifyHomeStyle");return}document.body.insertAdjacentHTML("beforeend",`\n\n`);const m=new Vue({el:"simplify-home",components:{SimplifyHome:()=>i.importAsync("simplify-home.vue")},data:{homeStyle:e.simplifyHomeStyle}});addSettingsListener("simplifyHomeStyle",e=>m.homeStyle=e,false)})()}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simplify-home.vue.min.js"] = (()=>{return(e,o)=>{const m=`
    `;o.applyStyleFromText(`.simplify-home{padding-top:32px;display:flex;align-items:flex-start;justify-content:center;min-height:100vh;background-color:#f4f4f4}body.dark .simplify-home{background-color:#181818}.simplify-home .simplify-home-component{max-width:100%}html{scroll-behavior:smooth}`,"simplify-home-style");return{export:Object.assign({template:m},{components:{"minimal-home":()=>o.importAsync("minimal-home.vue"),"simple-home":()=>o.importAsync("simple-home.vue")},computed:{activeComponent(){return this.homeStyle==="清爽"?"simple-home":"minimal-home"}},props:{homeStyle:String}})}}})(); @@ -1335,7 +1335,7 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-dash.min.js"] = (()=>{return(t,e)=>{const a=t=>{return{url:t.downloadUrl,backupUrls:t.backupUrls,length:t.duration,size:Math.trunc(t.bandWidth*t.duration/8)}};const d=e=>{console.log(e.videoDashes);const d=(()=>{const a=e=>e.videoCodec===t.downloadVideoDashCodec;if(e.videoDashes.some(a)){return e.videoDashes.filter(a).sort(ascendingSort(t=>t.bandWidth))[0]}else{return e.videoDashes.sort(ascendingSort(t=>t.bandWidth))[0]}})();const o=e.audioDashes.sort(descendingSort(t=>t.bandWidth))[0];return[a(d),a(o)]};const o=async(t,e)=>{const a=await Ajax.getJsonWithCredentials(t);const d=a.data||a.result||a;if(a.code!==0||!d.dash){throw new Error("DASH api failed")}const o=d.accept_quality;if(!o.includes(e)){throw new Error("没有找到请求的清晰度")}if(d.quality!==e){throw new Error("无法获取请求的清晰度, 请确认当前账号有相应的权限")}const r=d.accept_description;const s=r[o.indexOf(e)];const c=d.dash.duration;const n=d.dash.video.filter(t=>t.id===e).map(t=>{const a=(()=>{switch(t.codecid){case 12:return"HEVC/H.265";default:case 7:return"AVC/H.264"}})();const d={quality:e,qualityText:s,width:t.width,height:t.height,codecs:t.codecs,codecId:t.codecid,bandWidth:t.bandwidth,frameRate:t.frameRate,backupUrls:(t.backupUrl||t.backup_url||[]).forEach(t=>t.replace("http:","https:")),downloadUrl:(t.baseUrl||t.base_url||"").replace("http:","https:"),duration:c,videoCodec:a};return d});const i=d.dash.audio.map(t=>{return{bandWidth:t.bandwidth,codecs:t.codecs,codecId:t.codecid,backupUrls:(t.backupUrl||t.backup_url||[]).forEach(t=>t.replace("http:","https:")),downloadUrl:(t.baseUrl||t.base_url||"").replace("http:","https:"),duration:c}});return{videoDashes:n,audioDashes:i}};return{export:{getDashInfo:o,dashToFragments:d}}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-downloader-fragment.min.js"] = (()=>{return(r,e)=>{}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-info.min.js"] = (()=>{return(t,i)=>{class e{constructor(t){this.aid=t}async fetchInfo(){let t;if(this.cid){t=`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}&cid=${this.cid}`}else{t=`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}`}const i=JSON.parse(await Ajax.getText(t));if(i.code!==0){throw new Error(i.message)}const e=i.data;this.cid=e.cid;this.pageCount=e.videos;this.coverUrl=e.pic;this.tagId=e.tid;this.tagName=e.tname;this.title=e.title;this.description=e.desc;this.up={uid:e.owner.mid,name:e.owner.name,faceUrl:e.owner.face};this.pages=e.pages.map(t=>{return{cid:t.cid,title:t.part,pageNumber:t.page}});this.subtitles=e.subtitle.list.map(t=>{return{id:t.id,languageCode:t.lan,language:t.lan_doc,url:t.subtitle_url.replace("http:","https:")}});return this}async fetchDanmaku(){this.danmaku=new s(this.cid.toString());return this.danmaku.fetchInfo()}}class a{constructor(t,i){this.text=t;this.p=i}}class s{constructor(t){this.cid=t}async fetchInfo(){const t=await Ajax.getText(`https://api.bilibili.com/x/v1/dm/list.so?oid=${this.cid}`);this.rawXML=t;const i=(new DOMParser).parseFromString(t,"application/xml").documentElement;this.xml=i;this.danmakus=[...i.querySelectorAll("d[p]")].map(t=>{return new a(t.innerHTML,t.getAttribute("p"))})}}class n{constructor(t){this.ep=t;this.videos=[]}async fetchInfo(){const t=await Ajax.getText(`https://www.bilibili.com/bangumi/play/ep${this.ep}/`);const i=JSON.parse(t.match(/window\.__INITIAL_STATE__=(.*);\(function\(\){/)[1]);this.title=i.mediaInfo.title;this.cover=i.mediaInfo.cover;this.squareCover=i.mediaInfo.square_cover;this.aid=i.epInfo.aid;this.cid=i.epInfo.cid;this.videos=i.epList.map(async t=>{return{title:t.index_title,aid:t.aid,cid:t.cid,info:await new e(t.aid).fetchInfo()}});return this}}return{export:{VideoInfo:e,BangumiInfo:n,Danmaku:a,DanmakuInfo:s}}}})(); -offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-list.vue.min.js"] = (()=>{return(i,e)=>{const a=`
    加载中...
    空空如也哦 = ̄ω ̄=
    `;e.applyStyleFromText(`.minimal-home .video-list .empty,.minimal-home .video-list .loading{height:48px;display:flex;align-items:center;justify-content:center;font-size:11pt;color:#707070}.minimal-home .video-list .empty .mdi,.minimal-home .video-list .loading .mdi{margin-right:8px}body.dark .minimal-home .video-list .empty,body.dark .minimal-home .video-list .loading{color:#eee}.minimal-home .video-list .cards{display:flex;flex-wrap:wrap;align-items:flex-end}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1),.minimal-home .video-list .cards.show-rank .video-card:nth-child(17),.minimal-home .video-list .cards.show-rank .video-card:nth-child(9){margin-top:48px}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1)::before,.minimal-home .video-list .cards.show-rank .video-card:nth-child(17)::before,.minimal-home .video-list .cards.show-rank .video-card:nth-child(9)::before{position:absolute;top:-42px;left:0;font-size:14pt;font-weight:700}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1)::before{content:"今日"}.minimal-home .video-list .cards.show-rank .video-card:nth-child(9)::before{content:"三日"}.minimal-home .video-list .cards.show-rank .video-card:nth-child(17)::before{content:"一周"}`,"video-list-style");return{export:Object.assign({template:a},{components:{VideoCard:()=>e.importAsync("video-card.vue")},props:["showRank"],data(){return{cards:[],loading:true}},methods:{async getRankList(){const{getTrendingVideos:i}=await e.importAsync("trending-videos");const a=async e=>{const a=await i(e);this.cards.push(...a)};await Promise.all([1,3,7].map(a))},async getActivityVideos(){const i=await Ajax.getJsonWithCredentials(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${getUID()}&type_list=8`);if(i.code!==0){throw new Error(i.message)}this.cards=i.data.cards.filter(i=>{return i.desc.orig_dy_id===0}).map(i=>{const e=JSON.parse(i.card);const a=_.get(i,"display.topic_info.topic_details",[]).map(i=>{return{id:i.topic_id,name:i.topic_name}});return{id:i.desc.dynamic_id_str,aid:e.aid,title:e.title,upID:i.desc.user_profile.info.uid,upName:i.desc.user_profile.info.uname,upFaceUrl:i.desc.user_profile.info.face,coverUrl:e.pic,description:e.desc,timestamp:i.timestamp,time:new Date(i.timestamp*1e3),topics:a,dynamic:e.dynamic,like:formatCount(i.desc.like),duration:e.duration,durationText:formatDuration(e.duration,0),playCount:formatCount(e.stat.view),danmakuCount:formatCount(e.stat.danmaku),watchlater:true}})}},async mounted(){try{if(this.showRank){await this.getRankList()}else{await this.getActivityVideos()}}catch(i){Toast.error(i.message,this.showRank?"热门视频":"视频动态",3e3)}finally{this.loading=false}}})}}})(); +offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-list.vue.min.js"] = (()=>{return(i,e)=>{const a=`
    加载中...
    空空如也哦 = ̄ω ̄=
    `;e.applyStyleFromText(`.minimal-home .video-list .empty,.minimal-home .video-list .loading{height:48px;display:flex;align-items:center;justify-content:center;font-size:11pt;color:#707070}.minimal-home .video-list .empty .mdi,.minimal-home .video-list .loading .mdi{margin-right:8px}body.dark .minimal-home .video-list .empty,body.dark .minimal-home .video-list .loading{color:#eee}.minimal-home .video-list .cards{display:flex;flex-wrap:wrap;align-items:flex-end}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1),.minimal-home .video-list .cards.show-rank .video-card:nth-child(17),.minimal-home .video-list .cards.show-rank .video-card:nth-child(9){margin-top:48px}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1)::before,.minimal-home .video-list .cards.show-rank .video-card:nth-child(17)::before,.minimal-home .video-list .cards.show-rank .video-card:nth-child(9)::before{position:absolute;top:-42px;left:0;font-size:14pt;font-weight:700}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1)::before{content:"今日"}.minimal-home .video-list .cards.show-rank .video-card:nth-child(9)::before{content:"三日"}.minimal-home .video-list .cards.show-rank .video-card:nth-child(17)::before{content:"一周"}`,"video-list-style");return{export:Object.assign({template:a},{components:{VideoCard:()=>e.importAsync("video-card.vue")},props:["showRank"],data(){return{cards:[],useVerticalCards:false,loading:true}},methods:{async getRankList(){const{getTrendingVideos:i}=await e.importAsync("trending-videos");const a=async e=>{const a=await i(e);this.cards.push(...a)};await Promise.all([1,3,7].map(a))},async getActivityVideos(){const i=await Ajax.getJsonWithCredentials(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${getUID()}&type_list=8`);if(i.code!==0){throw new Error(i.message)}this.cards=i.data.cards.filter(i=>{return i.desc.orig_dy_id===0}).map(i=>{const e=JSON.parse(i.card);const a=_.get(i,"display.topic_info.topic_details",[]).map(i=>{return{id:i.topic_id,name:i.topic_name}});return{id:i.desc.dynamic_id_str,aid:e.aid,title:e.title,upID:i.desc.user_profile.info.uid,upName:i.desc.user_profile.info.uname,upFaceUrl:i.desc.user_profile.info.face,coverUrl:e.pic,description:e.desc,timestamp:i.timestamp,time:new Date(i.timestamp*1e3),topics:a,dynamic:e.dynamic,like:formatCount(i.desc.like),duration:e.duration,durationText:formatDuration(e.duration,0),playCount:formatCount(e.stat.view),danmakuCount:formatCount(e.stat.danmaku),watchlater:true}})}},async mounted(){try{const i=matchMedia("(max-width: 680px)");this.useVerticalCards=i.matches;i.addListener(i=>{this.useVerticalCards=i.matches});if(this.showRank){await this.getRankList()}else{await this.getActivityVideos()}}catch(i){Toast.error(i.message,this.showRank?"热门视频":"视频动态",3e3)}finally{this.loading=false}}})}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-story.min.js"] = (()=>{return(t,i)=>{class e{constructor(t){this.title=t.option;this.nodeID=t.node_id;this.cid=t.cid;this.default=t.is_default===1}}class s{constructor(t,i,e){this.title=t.title;this.nodeID=t.node_id;this.aid=i;this.cid=t.cid;this.graphVersion=e;this.choices=[];this.choiceTime=-1}async getChoices(){if(this.choices.length>0){return}const t=`https://api.bilibili.com/x/stein/nodeinfo?aid=${this.aid}&node_id=${this.nodeID}&graph_version=504`;const i=await Ajax.getJsonWithCredentials(t);if(i.code!==0){console.error(`获取选项失败: ${i.message}`);return}this.choices=i.data.edges.choices.map(t=>new e(t))}}class o{constructor(t,i){this.nodeList=t;if(i){this.startingNode=i}else{[this.startingNode]=t}}async getAllChoices(){return await Promise.all(this.nodeList.map(t=>t.getChoices()))}}const n=async(t,i)=>{const n=`https://api.bilibili.com/x/stein/nodeinfo?aid=${t}&graph_version=${i}`;const c=await Ajax.getJsonWithCredentials(n);if(c.code!==0){return c.message}const a=c.data.story_list.map(e=>new s(e,t,i));const d=a.find(t=>t.nodeID===c.data.node_id);if(!d){return"获取起始结点失败"}d.choiceTime=c.data.edges.show_time;const r=c.data.edges.choices.map(t=>new e(t));d.choices=r;return new o(a,d)};return{export:{StoryChoice:e,StoryNode:s,Story:o,getStoryNodes:n}}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/view-cover.min.js"] = (()=>{return(e,t)=>{const{VideoInfo:i}=t.import("video-info");const{getFriendlyTitle:n}=t.import("title");class o{constructor(e){this.url=e;if(document.querySelector(".image-viewer")===null){this.createContainer()}this.viewer=document.querySelector(".image-viewer-container");this.downloadImage();addSettingsListener("filenameFormat",()=>{this.viewer.querySelector(".download").setAttribute("download",this.filename)})}createContainer(){document.body.insertAdjacentHTML("beforeend",t.import("imageViewerHtml"));document.querySelector(".image-viewer-container .close").addEventListener("click",()=>this.hide());t.applyStyle("imageViewerStyle")}downloadImage(){document.querySelector("#view-cover").style.display=this.url?"flex":"none";if(this.url===""){return}const e=new XMLHttpRequest;e.open("GET",this.url.replace("http:","https:"),true);e.responseType="blob";e.onload=(()=>{const t=URL.createObjectURL(e.response);if(this.imageData){URL.revokeObjectURL(this.imageData)}this.imageData=t;const i=this.viewer.querySelector(".download");i.setAttribute("href",t);i.setAttribute("download",this.filename);this.viewer.querySelector(".copy-link").addEventListener("click",()=>GM.setClipboard(this.url));this.viewer.querySelector(".new-tab").setAttribute("href",this.url);this.viewer.querySelector(".image").src=t});e.send()}show(){this.viewer.classList.add("opened")}hide(){this.viewer.classList.remove("opened")}get filename(){return n(document.URL.includes("/www.bilibili.com/bangumi/"))+this.url.substring(this.url.lastIndexOf("."))}}return(()=>{if(!document.URL.includes("live.bilibili.com")){return{widget:{content:`\n\n\n查看封面\n`,condition:async()=>{const e=await SpinQuery.select(()=>(unsafeWindow||window).aid);return Boolean(e)},success:async()=>{async function e(){const e=(unsafeWindow||window).aid;const t=new i(e);try{await t.fetchInfo()}catch(e){return""}return t.coverUrl}let t=new o(await e());document.querySelector("#view-cover").addEventListener("click",()=>{t.show()});const n=async()=>{t=new o(await e())};Observer.videoChange(n)}}}}else{return{widget:{content:`\n\n\n查看封面\n`,condition:async()=>{const e=await SpinQuery.select(()=>document.querySelector(".header-info-ctnr .room-cover"));return Boolean(e)},success:async()=>{const e=document.querySelector(".header-info-ctnr .room-cover");const t=e.getAttribute("href").match(/space\.bilibili\.com\/([\d]+)/);if(t&&t[1]){const e=t[1];const i=`https://api.live.bilibili.com/room/v1/Room/getRoomInfoOld?mid=${e}`;const n=await Ajax.getJson(i);const r=n.data.cover;const s=new o(r);document.querySelector("#view-cover").addEventListener("click",()=>{s.show()})}}}}}})()}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/watchlater.min.js"] = (()=>{return(e,t)=>{const i=e=>{const t=e.match(/(av[\d]+)\/p([\d]+)/);if(t){return`https://www.bilibili.com/video/${t[1]}/?p=${t[2]}`}else{return"javascript:;"}};const r=e=>{const t=e.map(e=>{const t=e.getAttribute("href");if(!t){return"javascript:;"}if(t.match(/.*watchlater.*|javascript:;/g)){return i(t)}if(t.indexOf("video/av")!==-1){return t}});e.forEach((e,i)=>{e.setAttribute("href",t[i]);e.setAttribute("target","_blank")})};const a=(...e)=>{for(const t of e){SpinQuery.select(()=>document.querySelectorAll(t),e=>r([...e]))}};SpinQuery.select(".watch-later-list").then(()=>{Observer.childListSubtree("#viewlater-app",()=>{SpinQuery.condition(()=>document.URL.match(/(av[\d]+)\/p([\d]+)/),e=>e&&document.URL.indexOf("watchlater")!==-1,()=>{const e=i(document.URL);if(e!==null){window.location.assign(e)}});SpinQuery.select("#viewlater-app .s-btn[href='#/']",e=>e.remove());a(".av-pic",".av-about>a")})});SpinQuery.select("li.nav-item[report-id*=watchlater]").then(()=>{Observer.childListSubtree("li.nav-item[report-id*=watchlater]",()=>{a(".av-item>a",".av-about>a","div.watch-later-m>ul>div>li>a");SpinQuery.select(".read-more.mr",e=>e.remove());SpinQuery.select(".read-more-grp>.read-more",e=>{e.style.width="auto";e.style.float="none"})})});SpinQuery.select(".van-popper-favorite").then(async e=>{if(!e){return}const t=Observer.childListSubtree(e,()=>{const i=e.querySelector(".play-all");if(i){const e="//www.bilibili.com/watchlater/#/list";Observer.attributes(i,()=>{if(i.getAttribute("href")==="//www.bilibili.com/watchlater/"){i.setAttribute("href",e);i.firstChild.classList.remove("bili-icon_dingdao_bofang");i.firstChild.classList.add("bili-icon_xinxi_yuedushu");i.lastChild.nodeValue="查看全部"}else if(i.getAttribute("href")!==e){i.firstChild.classList.add("bili-icon_dingdao_bofang");i.firstChild.classList.remove("bili-icon_xinxi_yuedushu");i.lastChild.nodeValue="播放全部"}});t.forEach(e=>e.stop())}})})}})(); diff --git a/bilibili-evolved.preview.user.js b/bilibili-evolved.preview.user.js index 62e3d1f1a..fd9be3a65 100644 --- a/bilibili-evolved.preview.user.js +++ b/bilibili-evolved.preview.user.js @@ -1257,7 +1257,7 @@ onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/m onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/medal-helper.min.css"] = `.medal-popup *{transition:.2s}.medal-popup ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,1fr)}.round-corner .medal-popup ul>li{border-radius:var(--corner-radius)}.medal-popup ul>li.active{box-shadow:0 0 0 1px var(--theme-color)}.medal-popup ul>li:hover{background-color:rgba(0,0,0,.16)}.medal-popup label{display:flex;align-items:center;justify-content:center;cursor:pointer;padding:8px}.medal-popup label>*{flex-shrink:0}.medal-popup input[type=radio]{display:none;width:0;margin:0;padding:0}.medal-popup input[type=radio]~i{opacity:0;transform:scale(.8);margin:0}.medal-popup input[type=radio]~.fans-medal-item{margin:0 4px}.medal-popup input[type=radio]:checked~i{opacity:1}.title-image{display:inline-block;vertical-align:middle;height:20px}.fans-medal-item{display:inline-block;height:14px;line-height:14px;color:#fff;border:1px solid #61decb;border-left:0;white-space:nowrap;border-radius:2px;flex-shrink:0;font-size:12px}.fans-medal-item .label{width:40px;text-align:center;padding:0 2px;color:#fff}.fans-medal-item .level{width:16px;background-color:#fff;text-align:center;color:#61decb}.fans-medal-item .label,.fans-medal-item .level{cursor:pointer;position:relative;display:block;float:left}.level-1{border-color:#61decb}.level-1 .label{background-color:#61decb}.level-1 .level{color:#61decb}.level-2{border-color:#61decb}.level-2 .label{background-color:#61decb}.level-2 .level{color:#61decb}.level-3{border-color:#61decb}.level-3 .label{background-color:#61decb}.level-3 .level{color:#61decb}.level-4{border-color:#61decb}.level-4 .label{background-color:#61decb}.level-4 .level{color:#61decb}.level-5{border-color:#5896de}.level-5 .label{background-color:#5896de}.level-5 .level{color:#5896de}.level-6{border-color:#5896de}.level-6 .label{background-color:#5896de}.level-6 .level{color:#5896de}.level-7{border-color:#5896de}.level-7 .label{background-color:#5896de}.level-7 .level{color:#5896de}.level-8{border-color:#5896de}.level-8 .label{background-color:#5896de}.level-8 .level{color:#5896de}.level-9{border-color:#a068f1}.level-9 .label{background-color:#a068f1}.level-9 .level{color:#a068f1}.level-10{border-color:#a068f1}.level-10 .label{background-color:#a068f1}.level-10 .level{color:#a068f1}.level-11{border-color:#a068f1}.level-11 .label{background-color:#a068f1}.level-11 .level{color:#a068f1}.level-12{border-color:#a068f1}.level-12 .label{background-color:#a068f1}.level-12 .level{color:#a068f1}.level-13{border-color:#ff86b2}.level-13 .label{background-color:#ff86b2}.level-13 .level{color:#ff86b2}.level-14{border-color:#ff86b2}.level-14 .label{background-color:#ff86b2}.level-14 .level{color:#ff86b2}.level-15{border-color:#ff86b2}.level-15 .label{background-color:#ff86b2}.level-15 .level{color:#ff86b2}.level-16{border-color:#ff86b2}.level-16 .label{background-color:#ff86b2}.level-16 .level{color:#ff86b2}.level-17{border-color:#f6be18}.level-17 .label{background-color:#f6be18}.level-17 .level{color:#f6be18}.level-18{border-color:#f6be18}.level-18 .label{background-color:#f6be18}.level-18 .level{color:#f6be18}.level-19{border-color:#f6be18}.level-19 .label{background-color:#f6be18}.level-19 .level{color:#f6be18}.level-20{border-color:#f6be18}.level-20 .label{background-color:#f6be18}.level-20 .level{color:#f6be18}`; onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/medal-helper.min.html"] = `
    更换勋章
    更换头衔
    `; onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/medal-helper.min.js"] = (()=>{return(e,t)=>{const i=()=>{const e=document.URL.match(/live\.bilibili\.com\/(\d+)/);if(!e){return}const t=parseInt(e[1]);if(isNaN(t)){console.warn(`roomID not found`);return}return t};class a{constructor(e=false,t=0){this.isActive=e;this.id=t}static parseJson(e,t){const i=JSON.parse(e);if(i.code!==0){logError(`${t.errorMessage} 错误码:${i.code} ${i.message||""}`);return t.errorAction(i)}return t.successAction(i)}}class s extends a{constructor(e){const{medal_id:t,status:i,level:a,medalName:s,uname:r,roomid:n}=e;super(i===1,t);this.level=a;this.name=s;this.upName=r;this.roomID=n}static async getList(){return a.parseJson(await Ajax.getTextWithCredentials("https://api.live.bilibili.com/i/api/medal?page=1&pageSize=256"),{successAction:e=>e.data.fansMedalList.map(e=>new s(e)),errorAction:()=>[],errorMessage:"无法获取勋章列表."})}static getContainer(){return document.querySelector("#medal-helper .medal-popup ul")}getItemTemplate(e){if(!e){e=this}return`\n
  • \n\n
  • `}async activate(){if(this.isActive){return true}return a.parseJson(await Ajax.getTextWithCredentials(`https://api.live.bilibili.com/i/ajaxWearFansMedal?medal_id=${this.id}`),{successAction:()=>{this.isActive=true;return true},errorAction:()=>false,errorMessage:"佩戴勋章失败."})}async deactivate(){if(!this.isActive){return true}return a.parseJson(await Ajax.getTextWithCredentials(`https://api.live.bilibili.com/i/ajaxCancelWear`),{successAction:()=>{this.isActive=false;return true},errorAction:()=>false,errorMessage:"卸下勋章失败."})}}class r extends a{constructor(e){const{id:t,cid:i,wear:a,css:s,name:n,source:c}=e;super(a,s);this.tid=t;this.cid=i;this.name=n;this.source=c;r.getImageMap().then(e=>{this.imageUrl=e[this.id]})}static async getImageMap(){if(r.imageMap===undefined){return a.parseJson(await Ajax.getTextWithCredentials("https://api.live.bilibili.com/rc/v1/Title/webTitles"),{successAction(e){r.imageMap={};e.data.forEach(e=>{r.imageMap[e.identification]=e.web_pic_url});return r.imageMap},errorAction:()=>{return{}},errorMessage:"获取头衔图片失败."})}else{return r.imageMap}}static async getList(){return a.parseJson(await Ajax.getTextWithCredentials("https://api.live.bilibili.com/i/api/ajaxTitleInfo?page=1&pageSize=256&had=1"),{successAction:e=>e.data.list.map(e=>new r(e)),errorAction:()=>[],errorMessage:"无法获取头衔列表."})}static getContainer(){return document.querySelector("#title-helper .medal-popup ul")}getItemTemplate(e){if(!e){e=this}return`\n
  • \n\n
  • `}async activate(){if(this.isActive){return true}return a.parseJson(await Ajax.postTextWithCredentials(`https://api.live.bilibili.com/i/ajaxWearTitle`,`id=${this.tid}&cid=${this.cid}&csrf=${getCsrf()}&csrf_token=${getCsrf()}`),{successAction:()=>{this.isActive=true;return true},errorAction:()=>false,errorMessage:"佩戴头衔失败."})}async deactivate(){if(!this.isActive){return true}return a.parseJson(await Ajax.postTextWithCredentials(`https://api.live.bilibili.com/i/ajaxCancelWearTitle`,""),{successAction:()=>{this.isActive=false;return true},errorAction:()=>false,errorMessage:"卸下头衔失败."})}}async function n(t,i){const a=t();const r=await i();const n=async()=>{const e=await i();e.forEach(e=>{const t=a.querySelector(`li[data-id='${e.id}']`);if(e.isActive){t.classList.add("active")}else{t.classList.remove("active")}t.querySelector(`input`).checked=e.isActive})};r.forEach(t=>{const i=t.getItemTemplate();a.insertAdjacentHTML("beforeend",i);const c=a.querySelector(`li[data-id='${t.id}']`);const l=c.querySelector(`input`);c.addEventListener("click",i=>{if(i.target===l){return}if(t.isActive){t.deactivate().then(n)}else{const i=r.find(e=>e.isActive);if(i){i.isActive=false}t.activate().then(()=>{if(t instanceof s){e.defaultMedalID=t.id}}).then(n)}})})}if(e.autoMatchMedal){(async()=>{const t=document.URL.match(/live\.bilibili\.com\/(\d+)/);if(!t){return}const i=parseInt(t[1]);if(isNaN(i)){console.warn(`roomID not found`);return}const a=await s.getList();if(!e.defaultMedalID){const t=a.find(e=>e.isActive);if(t){e.defaultMedalID=t.id;console.log(`set defaultMedalID to activeMedal (${t.id})`)}}const r=e.defaultMedalID?a.find(t=>t.id===e.defaultMedalID):a.find(e=>e.isActive);const n=a.find(e=>e.roomID===i);if(!n){if(r){await r.activate();console.log(`no matchMedal, fallback to defaultMedal (${r.id})`)}}else{await n.activate();console.log(`activated matchMedal (${n.id})`)}})()}return{export:{Badge:a,Medal:s,Title:r},widget:{condition:()=>document.domain==="live.bilibili.com",content:t.import("medalHelperHtml"),success:async()=>{document.querySelectorAll(".medal-helper").forEach(e=>{const t=e.querySelector(".medal-popup");e.addEventListener("click",e=>{if(!t.contains(e.target)){t.classList.toggle("opened")}})});n(s.getContainer,s.getList);await r.getImageMap();n(r.getContainer,r.getList)}}}}})(); -onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/minimal-home.vue.min.js"] = (()=>{return(i,e)=>{const a=`
    {{tab.displayName}}
    `;e.applyStyleFromText(`.minimal-home{--card-width:600px;--card-height:120px;--card-margin:16px;--card-column-count:2;transform:translateX(calc(var(--card-margin)/ 2))}.minimal-home,.minimal-home *{box-sizing:border-box;transition:color .2s ease-out,opacity .2s ease-out,transform .2s ease-out,background-color .2s ease-out}.minimal-home .logo{font-size:40px;color:var(--theme-color)}.minimal-home .minimal-home-header{display:flex;align-items:center;justify-content:space-between}.minimal-home .minimal-home-header .home-tabs{display:flex;flex-grow:1;justify-content:center;margin-right:var(--card-margin)}.minimal-home .minimal-home-header .home-tabs .tab{color:#000;opacity:.75;position:relative;cursor:pointer}.minimal-home .minimal-home-header .home-tabs .tab:not(:first-child){margin-left:32px}body.dark .minimal-home .minimal-home-header .home-tabs .tab{color:#eee}.minimal-home .minimal-home-header .home-tabs .tab.active{transform:scale(1.2);opacity:1;font-weight:700}.minimal-home .minimal-home-header .home-tabs .tab::after{content:"";position:absolute;bottom:-8px;left:50%;transform:translateX(-50%) scaleX(0);height:3px;width:24px;background-color:var(--theme-color);border-radius:2px;transition:.2s ease-out}.minimal-home .minimal-home-header .home-tabs .tab.active::after{transform:translateX(-50%) scaleX(1)}.minimal-home .minimal-home-content{margin-top:32px;min-height:100vh;width:calc(var(--card-column-count) * (var(--card-width) + var(--card-margin)))}.minimal-home .minimal-home-content .minimal-home-content-transition-enter-active,.minimal-home .minimal-home-content .minimal-home-content-transition-leave-active{transition:.3s ease-out}.minimal-home .minimal-home-content .minimal-home-content-transition-enter,.minimal-home .minimal-home-content .minimal-home-content-transition-leave-to{opacity:0;transform:scale(.95)}.minimal-home .minimal-home-footer{padding:24px 0;display:flex;justify-content:space-around;align-items:center;margin-right:var(--card-margin)}.minimal-home .minimal-home-footer .footer-button{display:flex;align-items:center;padding:8px 12px 8px 8px;background-color:#8882;color:#000;border-radius:24px;font-size:11pt;cursor:pointer}.minimal-home .minimal-home-footer .footer-button .be-icon{margin-right:8px}body.dark .minimal-home .minimal-home-footer .footer-button{color:#eee}.minimal-home .minimal-home-footer .footer-button:hover{background-color:#8884}@media screen and (max-width:1300px){.minimal-home{--card-column-count:1}}@media screen and (min-width:2000px){.minimal-home{--card-column-count:3}.minimal-home .cards.show-rank .video-card:nth-child(16),.minimal-home .cards.show-rank .video-card:nth-child(24),.minimal-home .cards.show-rank .video-card:nth-child(8){margin-right:calc(var(--card-margin) * 2 + var(--card-width))}}`,"minimal-home-style");const o=[{name:"video",displayName:"视频动态",active:true,more:"https://t.bilibili.com/?tab=8",showRank:false},{name:"ranking",displayName:"热门视频",active:false,more:"https://www.bilibili.com/ranking",showRank:true}];return{export:Object.assign({template:a},{components:{Icon:()=>e.importAsync("icon.vue"),VideoList:()=>e.importAsync("video-list.vue")},data(){return{tabs:o,content:"VideoList",logoImage:null}},computed:{activeTab(){return this.tabs.find(i=>i.active)},rankDays(){return this.activeTab.rankDays||0}},async mounted(){},methods:{changeTab(i){if(i.active){window.open(i.more,"_blank");return}const e=this.activeTab;e.active=false;i.active=true},goToTop(){scrollTo(0,0)},viewMore(){open(this.activeTab.more,"_blank")}}})}}})(); +onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/minimal-home.vue.min.js"] = (()=>{return(i,a)=>{const e=`
    {{tab.displayName}}
    `;a.applyStyleFromText(`.minimal-home{--card-width:600px;--card-height:120px;--card-margin:16px;--card-column-count:2;transform:translateX(calc(var(--card-margin)/ 2))}.minimal-home,.minimal-home *{box-sizing:border-box;transition:color .2s ease-out,opacity .2s ease-out,transform .2s ease-out,background-color .2s ease-out}.minimal-home .logo{font-size:40px;color:var(--theme-color)}.minimal-home .minimal-home-header{display:flex;align-items:center;justify-content:space-between}.minimal-home .minimal-home-header .home-tabs{display:flex;flex-grow:1;justify-content:center;margin-right:var(--card-margin)}.minimal-home .minimal-home-header .home-tabs .tab{color:#000;opacity:.75;position:relative;cursor:pointer}.minimal-home .minimal-home-header .home-tabs .tab:not(:first-child){margin-left:32px}body.dark .minimal-home .minimal-home-header .home-tabs .tab{color:#eee}.minimal-home .minimal-home-header .home-tabs .tab.active{transform:scale(1.2);opacity:1;font-weight:700}.minimal-home .minimal-home-header .home-tabs .tab::after{content:"";position:absolute;bottom:-8px;left:50%;transform:translateX(-50%) scaleX(0);height:3px;width:24px;background-color:var(--theme-color);border-radius:2px;transition:.2s ease-out}.minimal-home .minimal-home-header .home-tabs .tab.active::after{transform:translateX(-50%) scaleX(1)}.minimal-home .minimal-home-content{margin-top:32px;min-height:100vh;width:calc(var(--card-column-count) * (var(--card-width) + var(--card-margin)))}.minimal-home .minimal-home-content .minimal-home-content-transition-enter-active,.minimal-home .minimal-home-content .minimal-home-content-transition-leave-active{transition:.3s ease-out}.minimal-home .minimal-home-content .minimal-home-content-transition-enter,.minimal-home .minimal-home-content .minimal-home-content-transition-leave-to{opacity:0;transform:scale(.95)}.minimal-home .minimal-home-footer{padding:24px 0;display:flex;justify-content:space-around;align-items:center;margin-right:var(--card-margin)}.minimal-home .minimal-home-footer .footer-button{display:flex;align-items:center;padding:8px 12px 8px 8px;background-color:#8882;color:#000;border-radius:24px;font-size:11pt;cursor:pointer}.minimal-home .minimal-home-footer .footer-button .be-icon{margin-right:8px}body.dark .minimal-home .minimal-home-footer .footer-button{color:#eee}.minimal-home .minimal-home-footer .footer-button:hover{background-color:#8884}@media screen and (max-width:1300px){.minimal-home{--card-column-count:1}}@media screen and (max-width:680px){.minimal-home{--card-column-count:2;--card-width:210px;--card-height:240px}}@media screen and (max-width:470px){.minimal-home{--card-column-count:1}}@media screen and (min-width:2000px){.minimal-home{--card-column-count:3}.minimal-home .cards.show-rank .video-card:nth-child(16),.minimal-home .cards.show-rank .video-card:nth-child(24),.minimal-home .cards.show-rank .video-card:nth-child(8){margin-right:calc(var(--card-margin) * 2 + var(--card-width))}}`,"minimal-home-style");const o=[{name:"video",displayName:"视频动态",active:true,more:"https://t.bilibili.com/?tab=8",showRank:false},{name:"ranking",displayName:"热门视频",active:false,more:"https://www.bilibili.com/ranking",showRank:true}];return{export:Object.assign({template:e},{components:{Icon:()=>a.importAsync("icon.vue"),VideoList:()=>a.importAsync("video-list.vue")},data(){return{tabs:o,content:"VideoList",logoImage:null}},computed:{activeTab(){return this.tabs.find(i=>i.active)},rankDays(){return this.activeTab.rankDays||0}},async mounted(){},methods:{changeTab(i){if(i.active){window.open(i.more,"_blank");return}const a=this.activeTab;a.active=false;i.active=true},goToTop(){scrollTo(0,0)},viewMore(){open(this.activeTab.more,"_blank")}}})}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/mini-player-touch-move.min.css"] = `#bofqi.mini-player .drag-bar{touch-action:none!important;height:40px!important;line-height:40px!important;top:-40px!important}#bofqi.mini-player .drag-bar i:last-child{margin:10px!important}`; onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/mini-player-touch-move.min.js"] = (()=>{return(e,o)=>{const i=async(e=true)=>{if(!["//www.bilibili.com/bangumi/play/","//www.bilibili.com/video/"].some(e=>document.URL.includes(e))){return}const i=await SpinQuery.select("#bofqi");if(!i){console.warn("mini player touch move: player not found");return}const{enableTouchMove:n,disableTouchMove:l}=await o.importAsync("touch-move");if(e){o.applyStyle("miniPlayerTouchMoveStyle");n(i,{minMoveDistance:0})}else{o.removeStyle("miniPlayerTouchMoveStyle");l(i)}};i(true);return{reload:()=>i(true),unload:()=>i(false)}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/narrow-danmaku.min.js"] = (()=>{return(e,l)=>{const i=``;l.applyStyleFromText(i);return{reload:()=>l.applyStyleFromText(i),unload:()=>document.getElementById("narrow-danmaku-style").remove()}}})(); @@ -1299,8 +1299,8 @@ onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/m onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/simple-home.vue.min.js"] = (()=>{return(e,o)=>{const t=`
    `;o.applyStyleFromText(`.simple-home{--title-color:black;color:#444;display:grid;grid-template-areas:"blackboards trendings trendings" "feeds feeds info" "categories categories categories";grid-template-columns:repeat(3,auto);grid-template-rows:repeat(3,auto);column-gap:32px;row-gap:16px}.simple-home,.simple-home *{transition:.2s ease-out}body.dark .simple-home{--title-color:white;color:#ddd}.simple-home .jump-dots{grid-area:dots;align-self:center;justify-self:center}.simple-home .jump-dots label{display:block}.simple-home .jump-dots label:not(:last-child){margin-bottom:6px}.simple-home .jump-dots .jump-dot{background-color:#ddd;width:8px;height:20px;border-radius:8px;cursor:pointer}body.dark .simple-home .jump-dots .jump-dot{background-color:#444}.simple-home .hidden-input{display:none}.simple-home .hidden-input:checked:nth-of-type(1)~.jump-dots label:nth-child(1) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(1)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 0 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(2)~.jump-dots label:nth-child(2) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(2)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 1 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(3)~.jump-dots label:nth-child(3) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(3)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 2 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(4)~.jump-dots label:nth-child(4) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(4)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 3 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(5)~.jump-dots label:nth-child(5) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(5)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 4 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(6)~.jump-dots label:nth-child(6) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(6)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 5 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(7)~.jump-dots label:nth-child(7) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(7)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 6 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(8)~.jump-dots label:nth-child(8) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(8)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 7 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(9)~.jump-dots label:nth-child(9) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(9)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 8 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(10)~.jump-dots label:nth-child(10) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(10)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 9 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(11)~.jump-dots label:nth-child(11) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(11)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 10 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(12)~.jump-dots label:nth-child(12) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(12)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 11 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(13)~.jump-dots label:nth-child(13) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(13)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 12 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(14)~.jump-dots label:nth-child(14) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(14)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 13 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(15)~.jump-dots label:nth-child(15) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(15)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 14 * var(--blackboard-height)))}.simple-home .more,.simple-home .toggle-reorder{cursor:pointer;padding:4px 12px 4px 8px;display:flex;align-items:center;border-radius:16px;font-size:13px;font-weight:700}.simple-home .more .be-icon,.simple-home .toggle-reorder .be-icon{margin-right:8px;transition:.3s cubic-bezier(.25,.46,.45,.94);font-size:22px;font-weight:400}.simple-home .more:not(.toggle-reorder):hover .be-icon,.simple-home .toggle-reorder:not(.toggle-reorder):hover .be-icon{transform:rotate(180deg)}.simple-home .more,.simple-home .more.hover,.simple-home .toggle-reorder,.simple-home .toggle-reorder.hover{color:inherit!important;background-color:#ddd!important}body.dark .simple-home .more,body.dark .simple-home .more:hover,body.dark .simple-home .toggle-reorder,body.dark .simple-home .toggle-reorder:hover{color:inherit!important;background-color:#333!important}.simple-home .header{grid-area:header;display:flex;justify-content:space-between;align-items:center}.simple-home .header .title{color:var(--title-color);font-weight:700;font-size:22px}.simple-home .header .tabs{display:flex;align-items:center}.simple-home .header .tabs .tab{cursor:pointer;position:relative;white-space:nowrap}.simple-home .header .tabs .tab .tab-name{opacity:.5;font-size:14px}.simple-home .header .tabs .tab:not(:last-child){margin-right:24px}.simple-home .header .tabs .tab::after{content:"";width:calc(80%);height:3px;border-radius:2px;position:absolute;background-color:var(--theme-color);left:10%;bottom:-6px;transform:scaleX(0);transition:.2s ease-out}.simple-home .header .tabs .tab.active::after{transform:scaleX(1)}.simple-home .header .tabs .tab.active .tab-name{font-weight:700;opacity:1;transform:scale(1.1)}.simple-home .sub-header{color:var(--title-color);font-weight:700;font-size:18px;display:flex;align-items:center}.simple-home .sub-header::before{content:"";display:block;width:12px;height:12px;background-color:var(--theme-color);border-radius:50%;margin-right:8px}.simple-home .blackboards{grid-area:blackboards;justify-self:start}.simple-home .trendings{grid-area:trendings;transform:translateX(8px);justify-self:end}.simple-home .info-row{grid-area:info;justify-self:end}.simple-home .feeds{grid-area:feeds;transform:translateX(-8px);justify-self:start}.simple-home .categories{grid-area:categories;padding-bottom:32px}@media screen and (max-width:900px){.simple-home{grid-template-areas:"blackboards" "trendings" "info" "feeds" "categories";grid-template-columns:1fr;grid-template-rows:repeat(5,auto)}.simple-home .blackboards,.simple-home .categories,.simple-home .feeds,.simple-home .info-row,.simple-home .trendings{justify-self:center}}`,"simple-home-style");return{export:Object.assign({template:t},{components:{Blackboards:()=>o.importAsync("blackboard.vue"),TrendingVideos:()=>o.importAsync("trending-videos.vue"),InfoRow:()=>o.importAsync("online-info-row.vue"),Feeds:()=>o.importAsync("simple-home-feeds.vue"),Categories:()=>o.importAsync("simple-home-categories.vue")}})}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/simple-home-bangumi-category.vue.min.js"] = (()=>{return(i,e)=>{const a=`
    `;e.applyStyleFromText(`.simple-home .bangumi-category{display:grid;--total-height:1010px;--rank-width:350px;--rank-height:calc(var(--rank-width) / 16 * 10);grid-template:"timeline rank" 1fr/1fr var(--rank-width);grid-row-gap:24px;row-gap:24px;grid-column-gap:32px;column-gap:32px;position:relative}@media screen and (min-width:1800px){.simple-home .bangumi-category{--rank-width:365px}}@media screen and (min-width:1500px){.simple-home .bangumi-category{--rank-width:365px}}@media screen and (min-width:1200px){.simple-home .bangumi-category{--rank-width:365px}}@media screen and (min-width:1700px){.simple-home .bangumi-category{--rank-width:380px}}@media screen and (min-width:1400px){.simple-home .bangumi-category{--rank-width:380px}}@media screen and (min-width:1100px){.simple-home .bangumi-category{--rank-width:380px}}@media screen and (min-width:1600px){.simple-home .bangumi-category{--rank-width:395px}}@media screen and (min-width:1300px){.simple-home .bangumi-category{--rank-width:395px}}@media screen and (min-width:1000px){.simple-home .bangumi-category{--rank-width:395px}}.simple-home .bangumi-category,.simple-home .bangumi-category *,.simple-home .bangumi-category ::after,.simple-home .bangumi-category ::before{transition:.2s ease-out}.simple-home .bangumi-category .loading{opacity:0;pointer-events:none;border-radius:16px;position:absolute}.simple-home .bangumi-category .timeline{grid-area:timeline}.simple-home .bangumi-category.timeline-loading .timeline.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.simple-home .bangumi-category.timeline-loading .timeline:not(.loading){opacity:0;pointer-events:none}.simple-home .bangumi-category .rank{height:var(--total-height);grid-area:rank}.simple-home .bangumi-category.rank-loading .rank.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.simple-home .bangumi-category.rank-loading .rank:not(.loading){opacity:0;pointer-events:none}`,"simple-home-bangumi-category-style");return{export:Object.assign({template:a},{components:{BangumiTimeline:()=>e.importAsync("bangumi-timeline.vue"),RankList:()=>e.importAsync("rank-list.vue")},props:["rid"],data(){return{timeline:{error:false,loading:true},rank:{error:false,loading:true,videos:[]}}},computed:{timelineType(){return this.rid===13?"global":"chinese"}},watch:{rid(){this.loadRankList()}},methods:{async loadRankList(){const{RegionCodes:i}=await e.importAsync("category-regions");const a=this.rid===i.bangumi?`https://api.bilibili.com/pgc/web/rank/list?season_type=1&day=3`:`https://api.bilibili.com/pgc/web/rank/list?season_type=4&day=3`;try{const i=await Ajax.getJson(a);if(i.code!==0){throw new Error(i.message)}const e=i.result.list.map(i=>{return{id:i.season_id,href:i.url,coverUrl:i.new_ep.cover.replace("http:","https:"),title:i.title,points:i.pts,epTitle:i.new_ep.index_show,playCount:i.stat.view,danmakuCount:i.stat.danmaku,watchlater:null}});this.rank.videos=e.slice(0,10)}catch(i){logError(i);this.rank.error=true}finally{this.rank.loading=false}}},mounted(){this.loadRankList()}})}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/simple-home-categories.vue.min.js"] = (()=>{return(e,t)=>{const r=`
    分区
    {{t.name}}
    {{reordering ? '完成' : '排序'}}
    `;t.applyStyleFromText(`.simple-home .categories{--loading-from:#d4d4d4;--loading-to:#ddd;--slideshow-ratio:0.6;--rank-width:370px;--rank-height:calc(var(--rank-width) / 16 * 10);--card-height:280px;--card-width:calc(var(--card-height) * (42 / 25));display:flex;flex-direction:column}body.dark .simple-home .categories{--loading-from:#333;--loading-to:#262626}@keyframes category-loading{from{background-color:var(--loading-from)}to{background-color:var(--loading-to)}}@media screen and (max-width:1800px){.simple-home .categories{--card-height:272px;--rank-width:350px}}@media screen and (max-width:1700px){.simple-home .categories{--card-height:264px;--rank-width:330px}}@media screen and (max-width:1600px){.simple-home .categories{--card-height:256px;--rank-width:310px}}@media screen and (max-width:1500px){.simple-home .categories{--card-height:248px;--rank-width:290px}}@media screen and (max-width:1400px){.simple-home .categories{--card-height:240px;--rank-width:270px}}@media screen and (max-width:1300px){.simple-home .categories{--card-height:232px;--rank-width:250px}}@media screen and (max-width:1200px){.simple-home .categories{--card-height:224px;--rank-width:230px}}@media screen and (max-width:1100px){.simple-home .categories{--card-height:216px;--rank-width:210px}}@media screen and (max-width:1000px){.simple-home .categories{--card-height:208px;--rank-width:190px}}@media screen and (max-width:900px){.simple-home .categories{--card-height:200px;--rank-width:170px}}@media screen and (max-width:800px){.simple-home .categories{--card-height:192px;--rank-width:150px}}@media screen and (max-width:700px){.simple-home .categories{--card-height:184px;--rank-width:130px}}.simple-home .categories,.simple-home .categories *,.simple-home .categories ::after,.simple-home .categories ::before{transition:.2s ease-out}.simple-home .categories .header .tabs{display:flex;flex:1 1 0;margin:0 32px;justify-content:flex-start;overflow:auto;width:0;height:42px;scrollbar-width:none!important}.simple-home .categories .header .tabs::-webkit-scrollbar{height:0!important;width:0!important}.simple-home .categories .header .tabs .tab{transition:none;margin-right:24px}.simple-home .categories .area-header{grid-area:header;display:flex;align-items:center;justify-content:flex-start;font-weight:700;font-size:11pt;padding-bottom:12px}.simple-home .categories .area-header::before{content:"";display:inline-flex;height:10px;width:10px;background-color:var(--theme-color);border-radius:50%;margin-right:8px}.simple-home .categories .category-content{margin-top:12px;margin-bottom:36px}.simple-home .categories .category-content-enter,.simple-home .categories .category-content-leave-to{opacity:0}`,"simple-home-categories-style");const i={anime:"动画",bangumi:"番剧",china:"国创",manga:"漫画",music:"音乐",dance:"舞蹈",game:"游戏",tech:"科技",digital:"数码",life:"生活",kichiku:"鬼畜",fashion:"时尚",ads:"广告",entertainment:"娱乐",column:"专栏",movie:"电影",tv:"TV剧",film:"影视",documentary:"纪录片"};return{export:Object.assign({template:r},{components:{Icon:()=>t.importAsync("icon.vue"),NormalCategory:()=>t.importAsync("simple-home-normal-category.vue"),BangumiCategory:()=>t.importAsync("simple-home-bangumi-category.vue")},data(){return{tabs:Object.entries(i).map(([e,t])=>{return{key:e,name:t}}),selectedTab:Object.entries(e.simpleHomeCategoryOrders).sort((e,t)=>e[1]-t[1])[0][0],reordering:false,reorder:null,regionCodes:null}},async mounted(){const r=this.$refs.reorderContainer;const{RegionCodes:i}=await t.importAsync("category-regions");this.regionCodes=i;const{Reorder:a}=await t.importAsync("reorder");const o=new a(r);this.reorder=o;o.addEventListener("reorder",t=>{const r=t.detail;for(const t of r){const{element:r,order:i}=t;e.simpleHomeCategoryOrders[r.getAttribute("data-key")]=i}e.simpleHomeCategoryOrders=e.simpleHomeCategoryOrders})},methods:{getOrder(t){return e.simpleHomeCategoryOrders[t]}},computed:{content(){if(["bangumi","china"].includes(this.selectedTab)){return"BangumiCategory"}else if(this.selectedTab==="manga"){return null}else if(this.selectedTab==="column"){return null}else{return"NormalCategory"}},rid(){if(!this.regionCodes){return-1}else{return this.regionCodes[this.selectedTab]}}}})}}})(); -onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/simple-home-feeds.vue.min.js"] = (()=>{return(e,t)=>{const a=`
    没有动态哦(´・_・\`)
    `;t.applyStyleFromText(`.simple-home .feeds{justify-self:start;display:grid;grid-template-areas:"header header" "contents contents";grid-template-columns:repeat(2,auto);grid-template-rows:repeat(2,auto);row-gap:16px;column-gap:16px}.simple-home .feeds .header,.simple-home .feeds .sub-header{padding:0 8px}.simple-home .feeds .header .tab:nth-child(2),.simple-home .feeds .sub-header .tab:nth-child(2){margin-left:32px}.simple-home .feeds .header .online,.simple-home .feeds .sub-header .online{padding:8px 16px;height:32px;border-radius:16px;background-color:#8882;color:inherit;font-size:12px;display:flex;align-items:center;box-sizing:border-box}.simple-home .feeds .contents{grid-area:contents;display:flex;overflow:auto;--card-width:200px;--card-height:250px;--card-count:3;width:calc((var(--card-width) + 16px) * var(--card-count));padding-bottom:16px;scroll-snap-type:x mandatory;scrollbar-width:none!important;min-height:calc(var(--card-height) + 16px)}@media screen and (min-width:1100px){.simple-home .feeds .contents{--card-count:3}}@media screen and (min-width:1300px){.simple-home .feeds .contents{--card-count:4}}@media screen and (min-width:1550px){.simple-home .feeds .contents{--card-count:5}}.simple-home .feeds .contents::-webkit-scrollbar{width:0!important;height:0!important}.simple-home .feeds .contents .card-wrapper{padding:0 8px;scroll-snap-align:start;flex-shrink:0}.simple-home .feeds .contents .empty{display:flex;align-items:center;justify-content:center;width:100%;font-size:16px}`,"simple-home-feeds-style");const i=[{name:"视频",type:"video",url:"https://t.bilibili.com/?tab=8"},{name:"番剧",type:"bangumi",url:"https://t.bilibili.com/?tab=512"}];return{export:Object.assign({template:a},{components:{VideoCard:()=>t.importAsync("video-card.vue"),Icon:()=>t.importAsync("icon.vue")},data(){return{online:"--",tabs:i,currentTab:i[0],feedCards:[]}},watch:{currentTab(e){this.updateFeedCards(e)}},methods:{async updateFeedCards(e){const{getVideoFeeds:a}=await t.importAsync("feeds-apis");this.feedCards=await a(e.type)},changeTab(e){if(this.currentTab===e){open(e.url,"_blank")}else{this.currentTab=e}}},async mounted(){this.updateFeedCards(this.currentTab);const e=await Ajax.getJson("https://api.bilibili.com/x/web-interface/online");if(e.code===0){this.online=e.data.web_online}}})}}})(); -onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/simple-home-normal-category.vue.min.js"] = (()=>{return(t,i)=>{const e=`
    `;i.applyStyleFromText(`.category-view{display:grid;grid-template:"new-activity rank" 1fr "new-post rank" 1fr/1fr calc(1.5 * var(--rank-width) + 10px);grid-row-gap:24px;row-gap:24px;grid-column-gap:32px;column-gap:32px;position:relative}.category-view,.category-view *,.category-view ::after,.category-view ::before{transition:.2s ease-out}.category-view .loading{opacity:0;pointer-events:none;border-radius:16px;position:absolute}.category-view .new-activity{align-self:start;grid-area:new-activity}.category-view .new-post{align-self:end;grid-area:new-post}.category-view.new-activity-loading .new-activity.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.new-activity-loading .new-activity:not(.loading){opacity:0;pointer-events:none}.category-view.new-post-loading .new-post.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.new-post-loading .new-post:not(.loading){opacity:0;pointer-events:none}.category-view .rank{grid-area:rank}.category-view.rank-loading .rank.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.rank-loading .rank:not(.loading){opacity:0;pointer-events:none}@media screen and (max-width:1300px){.category-view{grid-template:"new-activity" 1fr "new-post" 1fr "rank" auto/1fr}.category-view .rank{justify-self:center}}`,"simple-home-normal-category-style");return{export:Object.assign({template:e},{components:{SlideshowCards:()=>i.importAsync("slideshow-cards.vue"),RankList:()=>i.importAsync("rank-list.vue")},store:store,props:{rid:{type:Number,required:true}},data(){return{newActivity:{error:false,loading:true,videos:[]},newPost:{error:false,loading:true,videos:[]},rank:{error:false,loading:true,videos:[]},loaded:false}},computed:{...Vuex.mapState(["watchlaterList"])},methods:{async loadCards(t,i,e){if(e===undefined){e=(t=>{const i=getUID();const e=_.get(t,"data.archives",[]);return e.map(t=>{return{id:t.aid,aid:t.aid,coverUrl:t.pic.replace("http:","https:"),title:t.title,upName:t.owner.name,upFaceUrl:t.owner.face.replace("http:","https:"),upID:t.owner.mid,playCount:t.stat.view,danmakuCount:t.stat.danmaku,like:t.stat.like,coins:t.stat.coin,description:t.desc,type:t.tname,watchlater:i?this.watchlaterList.includes(t.aid):null}})})}try{this[t].loading=true;const a=await Ajax.getJson(i);if(a.code!==0){this[t].error=true}this[t].videos=e(a)}catch(i){logError(i);this[t].error=true}finally{this[t].loading=false}},async loadNewActivity(){await this.loadCards("newActivity",`https://api.bilibili.com/x/web-interface/dynamic/region?ps=10&rid=${this.rid}`)},async loadNewPost(){await this.loadCards("newPost",`https://api.bilibili.com/x/web-interface/newlist?ps=10&rid=${this.rid}`)},async loadRank(){await this.loadCards("rank",`https://api.bilibili.com/x/web-interface/ranking/region?rid=${this.rid}&day=3&original=0`,t=>{const i=getUID();const e=t.data;return e.map(t=>{return{id:t.aid,aid:parseInt(t.aid),title:t.title,playCount:t.play,favorites:t.favorites,upID:t.mid,upName:t.author,description:t.description,coverUrl:t.pic.replace("http:","https:"),coins:t.coins,durationText:t.duration,points:t.pts,watchlater:i?this.watchlaterList.includes(parseInt(t.aid)):null}})})},...Vuex.mapActions(["toggleWatchlater"]),updateVideos(){this.loadNewActivity();this.loadNewPost();this.loadRank()}},watch:{rid(t){if(t>0){if(this.loaded){this.updateVideos()}}else{console.warn(`rid=${t}`)}}},mounted(){const t=new IntersectionObserver(()=>{this.updateVideos();this.loaded=true;t.disconnect()});t.observe(this.$el)}})}}})(); +onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/simple-home-feeds.vue.min.js"] = (()=>{return(e,t)=>{const a=`
    没有动态哦(´・_・\`)
    `;t.applyStyleFromText(`.simple-home .feeds{justify-self:start;display:grid;grid-template-areas:"header header" "contents contents";grid-template-columns:repeat(2,auto);grid-template-rows:repeat(2,auto);row-gap:16px;column-gap:16px}.simple-home .feeds .header,.simple-home .feeds .sub-header{padding:0 8px}.simple-home .feeds .header .tab:nth-child(2),.simple-home .feeds .sub-header .tab:nth-child(2){margin-left:32px}.simple-home .feeds .header .online,.simple-home .feeds .sub-header .online{padding:8px 16px;height:32px;border-radius:16px;background-color:#8882;color:inherit;font-size:12px;display:flex;align-items:center;box-sizing:border-box}.simple-home .feeds .contents{grid-area:contents;display:flex;overflow:auto;--card-width:200px;--card-height:250px;--card-count:2;width:calc((var(--card-width) + 16px) * var(--card-count));padding-bottom:16px;scroll-snap-type:x mandatory;scrollbar-width:none!important;min-height:calc(var(--card-height) + 16px)}@media screen and (max-width:900px){.simple-home .feeds .contents{--card-count:3}}@media screen and (min-width:1100px){.simple-home .feeds .contents{--card-count:3}}@media screen and (min-width:1300px){.simple-home .feeds .contents{--card-count:4}}@media screen and (min-width:1550px){.simple-home .feeds .contents{--card-count:5}}.simple-home .feeds .contents::-webkit-scrollbar{width:0!important;height:0!important}.simple-home .feeds .contents .card-wrapper{padding:0 8px;scroll-snap-align:start;flex-shrink:0}.simple-home .feeds .contents .empty{display:flex;align-items:center;justify-content:center;width:100%;font-size:16px}`,"simple-home-feeds-style");const i=[{name:"视频",type:"video",url:"https://t.bilibili.com/?tab=8"},{name:"番剧",type:"bangumi",url:"https://t.bilibili.com/?tab=512"}];return{export:Object.assign({template:a},{components:{VideoCard:()=>t.importAsync("video-card.vue"),Icon:()=>t.importAsync("icon.vue")},data(){return{online:"--",tabs:i,currentTab:i[0],feedCards:[]}},watch:{currentTab(e){this.updateFeedCards(e)}},methods:{async updateFeedCards(e){const{getVideoFeeds:a}=await t.importAsync("feeds-apis");this.feedCards=await a(e.type)},changeTab(e){if(this.currentTab===e){open(e.url,"_blank")}else{this.currentTab=e}}},async mounted(){this.updateFeedCards(this.currentTab);const e=await Ajax.getJson("https://api.bilibili.com/x/web-interface/online");if(e.code===0){this.online=e.data.web_online}}})}}})(); +onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/simple-home-normal-category.vue.min.js"] = (()=>{return(t,i)=>{const e=`
    `;i.applyStyleFromText(`.category-view{display:grid;grid-template:"new-activity rank" 1fr "new-post rank" 1fr/1fr calc(1.5 * var(--rank-width) + 10px);grid-row-gap:24px;row-gap:24px;grid-column-gap:32px;column-gap:32px;position:relative}.category-view,.category-view *,.category-view ::after,.category-view ::before{transition:.2s ease-out}.category-view .loading{opacity:0;pointer-events:none;border-radius:16px;position:absolute}.category-view .new-activity{align-self:start;grid-area:new-activity}.category-view .new-post{align-self:end;grid-area:new-post}.category-view.new-activity-loading .new-activity.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.new-activity-loading .new-activity:not(.loading){opacity:0;pointer-events:none}.category-view.new-post-loading .new-post.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.new-post-loading .new-post:not(.loading){opacity:0;pointer-events:none}.category-view .rank{grid-area:rank}.category-view.rank-loading .rank.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.rank-loading .rank:not(.loading){opacity:0;pointer-events:none}@media screen and (max-width:1300px){.category-view{grid-template:"new-activity" 1fr "new-post" 1fr "rank" auto/1fr}.category-view .rank{display:none;justify-self:center}}`,"simple-home-normal-category-style");return{export:Object.assign({template:e},{components:{SlideshowCards:()=>i.importAsync("slideshow-cards.vue"),RankList:()=>i.importAsync("rank-list.vue")},store:store,props:{rid:{type:Number,required:true}},data(){return{newActivity:{error:false,loading:true,videos:[]},newPost:{error:false,loading:true,videos:[]},rank:{error:false,loading:true,videos:[]},loaded:false}},computed:{...Vuex.mapState(["watchlaterList"])},methods:{async loadCards(t,i,e){if(e===undefined){e=(t=>{const i=getUID();const e=_.get(t,"data.archives",[]);return e.map(t=>{return{id:t.aid,aid:t.aid,coverUrl:t.pic.replace("http:","https:"),title:t.title,upName:t.owner.name,upFaceUrl:t.owner.face.replace("http:","https:"),upID:t.owner.mid,playCount:t.stat.view,danmakuCount:t.stat.danmaku,like:t.stat.like,coins:t.stat.coin,description:t.desc,type:t.tname,watchlater:i?this.watchlaterList.includes(t.aid):null}})})}try{this[t].loading=true;const a=await Ajax.getJson(i);if(a.code!==0){this[t].error=true}this[t].videos=e(a)}catch(i){logError(i);this[t].error=true}finally{this[t].loading=false}},async loadNewActivity(){await this.loadCards("newActivity",`https://api.bilibili.com/x/web-interface/dynamic/region?ps=10&rid=${this.rid}`)},async loadNewPost(){await this.loadCards("newPost",`https://api.bilibili.com/x/web-interface/newlist?ps=10&rid=${this.rid}`)},async loadRank(){await this.loadCards("rank",`https://api.bilibili.com/x/web-interface/ranking/region?rid=${this.rid}&day=3&original=0`,t=>{const i=getUID();const e=t.data;return e.map(t=>{return{id:t.aid,aid:parseInt(t.aid),title:t.title,playCount:t.play,favorites:t.favorites,upID:t.mid,upName:t.author,description:t.description,coverUrl:t.pic.replace("http:","https:"),coins:t.coins,durationText:t.duration,points:t.pts,watchlater:i?this.watchlaterList.includes(parseInt(t.aid)):null}})})},...Vuex.mapActions(["toggleWatchlater"]),updateVideos(){this.loadNewActivity();this.loadNewPost();this.loadRank()}},watch:{rid(t){if(t>0){if(this.loaded){this.updateVideos()}}else{console.warn(`rid=${t}`)}}},mounted(){const t=new IntersectionObserver(()=>{this.updateVideos();this.loaded=true;t.disconnect()});t.observe(this.$el)}})}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/simplify-home.min.css"] = `#app>.bili-header-m.stardust-common>.bili-wrapper,#app>.bili-wrapper,#app>.elevator-module,.bili-header-m .head-banner .head-content .head-logo,.international-footer,.international-header .b-wrap,.international-home>:not(.international-header){display:none!important}`; onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/simplify-home.min.js"] = (()=>{return(e,i)=>{(async()=>{if(document.URL.replace(window.location.search,"")!=="https://www.bilibili.com/"){i.removeStyle("simplifyHomeStyle");return}document.body.insertAdjacentHTML("beforeend",`\n\n`);const m=new Vue({el:"simplify-home",components:{SimplifyHome:()=>i.importAsync("simplify-home.vue")},data:{homeStyle:e.simplifyHomeStyle}});addSettingsListener("simplifyHomeStyle",e=>m.homeStyle=e,false)})()}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/simplify-home.vue.min.js"] = (()=>{return(e,o)=>{const m=`
    `;o.applyStyleFromText(`.simplify-home{padding-top:32px;display:flex;align-items:flex-start;justify-content:center;min-height:100vh;background-color:#f4f4f4}body.dark .simplify-home{background-color:#181818}.simplify-home .simplify-home-component{max-width:100%}html{scroll-behavior:smooth}`,"simplify-home-style");return{export:Object.assign({template:m},{components:{"minimal-home":()=>o.importAsync("minimal-home.vue"),"simple-home":()=>o.importAsync("simple-home.vue")},computed:{activeComponent(){return this.homeStyle==="清爽"?"simple-home":"minimal-home"}},props:{homeStyle:String}})}}})(); @@ -1334,7 +1334,7 @@ onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/m onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/video-dash.min.js"] = (()=>{return(t,e)=>{const a=t=>{return{url:t.downloadUrl,backupUrls:t.backupUrls,length:t.duration,size:Math.trunc(t.bandWidth*t.duration/8)}};const d=e=>{console.log(e.videoDashes);const d=(()=>{const a=e=>e.videoCodec===t.downloadVideoDashCodec;if(e.videoDashes.some(a)){return e.videoDashes.filter(a).sort(ascendingSort(t=>t.bandWidth))[0]}else{return e.videoDashes.sort(ascendingSort(t=>t.bandWidth))[0]}})();const o=e.audioDashes.sort(descendingSort(t=>t.bandWidth))[0];return[a(d),a(o)]};const o=async(t,e)=>{const a=await Ajax.getJsonWithCredentials(t);const d=a.data||a.result||a;if(a.code!==0||!d.dash){throw new Error("DASH api failed")}const o=d.accept_quality;if(!o.includes(e)){throw new Error("没有找到请求的清晰度")}if(d.quality!==e){throw new Error("无法获取请求的清晰度, 请确认当前账号有相应的权限")}const r=d.accept_description;const s=r[o.indexOf(e)];const c=d.dash.duration;const n=d.dash.video.filter(t=>t.id===e).map(t=>{const a=(()=>{switch(t.codecid){case 12:return"HEVC/H.265";default:case 7:return"AVC/H.264"}})();const d={quality:e,qualityText:s,width:t.width,height:t.height,codecs:t.codecs,codecId:t.codecid,bandWidth:t.bandwidth,frameRate:t.frameRate,backupUrls:(t.backupUrl||t.backup_url||[]).forEach(t=>t.replace("http:","https:")),downloadUrl:(t.baseUrl||t.base_url||"").replace("http:","https:"),duration:c,videoCodec:a};return d});const i=d.dash.audio.map(t=>{return{bandWidth:t.bandwidth,codecs:t.codecs,codecId:t.codecid,backupUrls:(t.backupUrl||t.backup_url||[]).forEach(t=>t.replace("http:","https:")),downloadUrl:(t.baseUrl||t.base_url||"").replace("http:","https:"),duration:c}});return{videoDashes:n,audioDashes:i}};return{export:{getDashInfo:o,dashToFragments:d}}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/video-downloader-fragment.min.js"] = (()=>{return(r,e)=>{}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/video-info.min.js"] = (()=>{return(t,i)=>{class e{constructor(t){this.aid=t}async fetchInfo(){let t;if(this.cid){t=`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}&cid=${this.cid}`}else{t=`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}`}const i=JSON.parse(await Ajax.getText(t));if(i.code!==0){throw new Error(i.message)}const e=i.data;this.cid=e.cid;this.pageCount=e.videos;this.coverUrl=e.pic;this.tagId=e.tid;this.tagName=e.tname;this.title=e.title;this.description=e.desc;this.up={uid:e.owner.mid,name:e.owner.name,faceUrl:e.owner.face};this.pages=e.pages.map(t=>{return{cid:t.cid,title:t.part,pageNumber:t.page}});this.subtitles=e.subtitle.list.map(t=>{return{id:t.id,languageCode:t.lan,language:t.lan_doc,url:t.subtitle_url.replace("http:","https:")}});return this}async fetchDanmaku(){this.danmaku=new s(this.cid.toString());return this.danmaku.fetchInfo()}}class a{constructor(t,i){this.text=t;this.p=i}}class s{constructor(t){this.cid=t}async fetchInfo(){const t=await Ajax.getText(`https://api.bilibili.com/x/v1/dm/list.so?oid=${this.cid}`);this.rawXML=t;const i=(new DOMParser).parseFromString(t,"application/xml").documentElement;this.xml=i;this.danmakus=[...i.querySelectorAll("d[p]")].map(t=>{return new a(t.innerHTML,t.getAttribute("p"))})}}class n{constructor(t){this.ep=t;this.videos=[]}async fetchInfo(){const t=await Ajax.getText(`https://www.bilibili.com/bangumi/play/ep${this.ep}/`);const i=JSON.parse(t.match(/window\.__INITIAL_STATE__=(.*);\(function\(\){/)[1]);this.title=i.mediaInfo.title;this.cover=i.mediaInfo.cover;this.squareCover=i.mediaInfo.square_cover;this.aid=i.epInfo.aid;this.cid=i.epInfo.cid;this.videos=i.epList.map(async t=>{return{title:t.index_title,aid:t.aid,cid:t.cid,info:await new e(t.aid).fetchInfo()}});return this}}return{export:{VideoInfo:e,BangumiInfo:n,Danmaku:a,DanmakuInfo:s}}}})(); -onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/video-list.vue.min.js"] = (()=>{return(i,e)=>{const a=`
    加载中...
    空空如也哦 = ̄ω ̄=
    `;e.applyStyleFromText(`.minimal-home .video-list .empty,.minimal-home .video-list .loading{height:48px;display:flex;align-items:center;justify-content:center;font-size:11pt;color:#707070}.minimal-home .video-list .empty .mdi,.minimal-home .video-list .loading .mdi{margin-right:8px}body.dark .minimal-home .video-list .empty,body.dark .minimal-home .video-list .loading{color:#eee}.minimal-home .video-list .cards{display:flex;flex-wrap:wrap;align-items:flex-end}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1),.minimal-home .video-list .cards.show-rank .video-card:nth-child(17),.minimal-home .video-list .cards.show-rank .video-card:nth-child(9){margin-top:48px}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1)::before,.minimal-home .video-list .cards.show-rank .video-card:nth-child(17)::before,.minimal-home .video-list .cards.show-rank .video-card:nth-child(9)::before{position:absolute;top:-42px;left:0;font-size:14pt;font-weight:700}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1)::before{content:"今日"}.minimal-home .video-list .cards.show-rank .video-card:nth-child(9)::before{content:"三日"}.minimal-home .video-list .cards.show-rank .video-card:nth-child(17)::before{content:"一周"}`,"video-list-style");return{export:Object.assign({template:a},{components:{VideoCard:()=>e.importAsync("video-card.vue")},props:["showRank"],data(){return{cards:[],loading:true}},methods:{async getRankList(){const{getTrendingVideos:i}=await e.importAsync("trending-videos");const a=async e=>{const a=await i(e);this.cards.push(...a)};await Promise.all([1,3,7].map(a))},async getActivityVideos(){const i=await Ajax.getJsonWithCredentials(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${getUID()}&type_list=8`);if(i.code!==0){throw new Error(i.message)}this.cards=i.data.cards.filter(i=>{return i.desc.orig_dy_id===0}).map(i=>{const e=JSON.parse(i.card);const a=_.get(i,"display.topic_info.topic_details",[]).map(i=>{return{id:i.topic_id,name:i.topic_name}});return{id:i.desc.dynamic_id_str,aid:e.aid,title:e.title,upID:i.desc.user_profile.info.uid,upName:i.desc.user_profile.info.uname,upFaceUrl:i.desc.user_profile.info.face,coverUrl:e.pic,description:e.desc,timestamp:i.timestamp,time:new Date(i.timestamp*1e3),topics:a,dynamic:e.dynamic,like:formatCount(i.desc.like),duration:e.duration,durationText:formatDuration(e.duration,0),playCount:formatCount(e.stat.view),danmakuCount:formatCount(e.stat.danmaku),watchlater:true}})}},async mounted(){try{if(this.showRank){await this.getRankList()}else{await this.getActivityVideos()}}catch(i){Toast.error(i.message,this.showRank?"热门视频":"视频动态",3e3)}finally{this.loading=false}}})}}})(); +onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/video-list.vue.min.js"] = (()=>{return(i,e)=>{const a=`
    加载中...
    空空如也哦 = ̄ω ̄=
    `;e.applyStyleFromText(`.minimal-home .video-list .empty,.minimal-home .video-list .loading{height:48px;display:flex;align-items:center;justify-content:center;font-size:11pt;color:#707070}.minimal-home .video-list .empty .mdi,.minimal-home .video-list .loading .mdi{margin-right:8px}body.dark .minimal-home .video-list .empty,body.dark .minimal-home .video-list .loading{color:#eee}.minimal-home .video-list .cards{display:flex;flex-wrap:wrap;align-items:flex-end}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1),.minimal-home .video-list .cards.show-rank .video-card:nth-child(17),.minimal-home .video-list .cards.show-rank .video-card:nth-child(9){margin-top:48px}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1)::before,.minimal-home .video-list .cards.show-rank .video-card:nth-child(17)::before,.minimal-home .video-list .cards.show-rank .video-card:nth-child(9)::before{position:absolute;top:-42px;left:0;font-size:14pt;font-weight:700}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1)::before{content:"今日"}.minimal-home .video-list .cards.show-rank .video-card:nth-child(9)::before{content:"三日"}.minimal-home .video-list .cards.show-rank .video-card:nth-child(17)::before{content:"一周"}`,"video-list-style");return{export:Object.assign({template:a},{components:{VideoCard:()=>e.importAsync("video-card.vue")},props:["showRank"],data(){return{cards:[],useVerticalCards:false,loading:true}},methods:{async getRankList(){const{getTrendingVideos:i}=await e.importAsync("trending-videos");const a=async e=>{const a=await i(e);this.cards.push(...a)};await Promise.all([1,3,7].map(a))},async getActivityVideos(){const i=await Ajax.getJsonWithCredentials(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${getUID()}&type_list=8`);if(i.code!==0){throw new Error(i.message)}this.cards=i.data.cards.filter(i=>{return i.desc.orig_dy_id===0}).map(i=>{const e=JSON.parse(i.card);const a=_.get(i,"display.topic_info.topic_details",[]).map(i=>{return{id:i.topic_id,name:i.topic_name}});return{id:i.desc.dynamic_id_str,aid:e.aid,title:e.title,upID:i.desc.user_profile.info.uid,upName:i.desc.user_profile.info.uname,upFaceUrl:i.desc.user_profile.info.face,coverUrl:e.pic,description:e.desc,timestamp:i.timestamp,time:new Date(i.timestamp*1e3),topics:a,dynamic:e.dynamic,like:formatCount(i.desc.like),duration:e.duration,durationText:formatDuration(e.duration,0),playCount:formatCount(e.stat.view),danmakuCount:formatCount(e.stat.danmaku),watchlater:true}})}},async mounted(){try{const i=matchMedia("(max-width: 680px)");this.useVerticalCards=i.matches;i.addListener(i=>{this.useVerticalCards=i.matches});if(this.showRank){await this.getRankList()}else{await this.getActivityVideos()}}catch(i){Toast.error(i.message,this.showRank?"热门视频":"视频动态",3e3)}finally{this.loading=false}}})}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/video-story.min.js"] = (()=>{return(t,i)=>{class e{constructor(t){this.title=t.option;this.nodeID=t.node_id;this.cid=t.cid;this.default=t.is_default===1}}class s{constructor(t,i,e){this.title=t.title;this.nodeID=t.node_id;this.aid=i;this.cid=t.cid;this.graphVersion=e;this.choices=[];this.choiceTime=-1}async getChoices(){if(this.choices.length>0){return}const t=`https://api.bilibili.com/x/stein/nodeinfo?aid=${this.aid}&node_id=${this.nodeID}&graph_version=504`;const i=await Ajax.getJsonWithCredentials(t);if(i.code!==0){console.error(`获取选项失败: ${i.message}`);return}this.choices=i.data.edges.choices.map(t=>new e(t))}}class o{constructor(t,i){this.nodeList=t;if(i){this.startingNode=i}else{[this.startingNode]=t}}async getAllChoices(){return await Promise.all(this.nodeList.map(t=>t.getChoices()))}}const n=async(t,i)=>{const n=`https://api.bilibili.com/x/stein/nodeinfo?aid=${t}&graph_version=${i}`;const c=await Ajax.getJsonWithCredentials(n);if(c.code!==0){return c.message}const a=c.data.story_list.map(e=>new s(e,t,i));const d=a.find(t=>t.nodeID===c.data.node_id);if(!d){return"获取起始结点失败"}d.choiceTime=c.data.edges.show_time;const r=c.data.edges.choices.map(t=>new e(t));d.choices=r;return new o(a,d)};return{export:{StoryChoice:e,StoryNode:s,Story:o,getStoryNodes:n}}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/view-cover.min.js"] = (()=>{return(e,t)=>{const{VideoInfo:i}=t.import("video-info");const{getFriendlyTitle:n}=t.import("title");class o{constructor(e){this.url=e;if(document.querySelector(".image-viewer")===null){this.createContainer()}this.viewer=document.querySelector(".image-viewer-container");this.downloadImage();addSettingsListener("filenameFormat",()=>{this.viewer.querySelector(".download").setAttribute("download",this.filename)})}createContainer(){document.body.insertAdjacentHTML("beforeend",t.import("imageViewerHtml"));document.querySelector(".image-viewer-container .close").addEventListener("click",()=>this.hide());t.applyStyle("imageViewerStyle")}downloadImage(){document.querySelector("#view-cover").style.display=this.url?"flex":"none";if(this.url===""){return}const e=new XMLHttpRequest;e.open("GET",this.url.replace("http:","https:"),true);e.responseType="blob";e.onload=(()=>{const t=URL.createObjectURL(e.response);if(this.imageData){URL.revokeObjectURL(this.imageData)}this.imageData=t;const i=this.viewer.querySelector(".download");i.setAttribute("href",t);i.setAttribute("download",this.filename);this.viewer.querySelector(".copy-link").addEventListener("click",()=>GM.setClipboard(this.url));this.viewer.querySelector(".new-tab").setAttribute("href",this.url);this.viewer.querySelector(".image").src=t});e.send()}show(){this.viewer.classList.add("opened")}hide(){this.viewer.classList.remove("opened")}get filename(){return n(document.URL.includes("/www.bilibili.com/bangumi/"))+this.url.substring(this.url.lastIndexOf("."))}}return(()=>{if(!document.URL.includes("live.bilibili.com")){return{widget:{content:`\n\n\n查看封面\n`,condition:async()=>{const e=await SpinQuery.select(()=>(unsafeWindow||window).aid);return Boolean(e)},success:async()=>{async function e(){const e=(unsafeWindow||window).aid;const t=new i(e);try{await t.fetchInfo()}catch(e){return""}return t.coverUrl}let t=new o(await e());document.querySelector("#view-cover").addEventListener("click",()=>{t.show()});const n=async()=>{t=new o(await e())};Observer.videoChange(n)}}}}else{return{widget:{content:`\n\n\n查看封面\n`,condition:async()=>{const e=await SpinQuery.select(()=>document.querySelector(".header-info-ctnr .room-cover"));return Boolean(e)},success:async()=>{const e=document.querySelector(".header-info-ctnr .room-cover");const t=e.getAttribute("href").match(/space\.bilibili\.com\/([\d]+)/);if(t&&t[1]){const e=t[1];const i=`https://api.live.bilibili.com/room/v1/Room/getRoomInfoOld?mid=${e}`;const n=await Ajax.getJson(i);const r=n.data.cover;const s=new o(r);document.querySelector("#view-cover").addEventListener("click",()=>{s.show()})}}}}}})()}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/watchlater.min.js"] = (()=>{return(e,t)=>{const i=e=>{const t=e.match(/(av[\d]+)\/p([\d]+)/);if(t){return`https://www.bilibili.com/video/${t[1]}/?p=${t[2]}`}else{return"javascript:;"}};const r=e=>{const t=e.map(e=>{const t=e.getAttribute("href");if(!t){return"javascript:;"}if(t.match(/.*watchlater.*|javascript:;/g)){return i(t)}if(t.indexOf("video/av")!==-1){return t}});e.forEach((e,i)=>{e.setAttribute("href",t[i]);e.setAttribute("target","_blank")})};const a=(...e)=>{for(const t of e){SpinQuery.select(()=>document.querySelectorAll(t),e=>r([...e]))}};SpinQuery.select(".watch-later-list").then(()=>{Observer.childListSubtree("#viewlater-app",()=>{SpinQuery.condition(()=>document.URL.match(/(av[\d]+)\/p([\d]+)/),e=>e&&document.URL.indexOf("watchlater")!==-1,()=>{const e=i(document.URL);if(e!==null){window.location.assign(e)}});SpinQuery.select("#viewlater-app .s-btn[href='#/']",e=>e.remove());a(".av-pic",".av-about>a")})});SpinQuery.select("li.nav-item[report-id*=watchlater]").then(()=>{Observer.childListSubtree("li.nav-item[report-id*=watchlater]",()=>{a(".av-item>a",".av-about>a","div.watch-later-m>ul>div>li>a");SpinQuery.select(".read-more.mr",e=>e.remove());SpinQuery.select(".read-more-grp>.read-more",e=>{e.style.width="auto";e.style.float="none"})})});SpinQuery.select(".van-popper-favorite").then(async e=>{if(!e){return}const t=Observer.childListSubtree(e,()=>{const i=e.querySelector(".play-all");if(i){const e="//www.bilibili.com/watchlater/#/list";Observer.attributes(i,()=>{if(i.getAttribute("href")==="//www.bilibili.com/watchlater/"){i.setAttribute("href",e);i.firstChild.classList.remove("bili-icon_dingdao_bofang");i.firstChild.classList.add("bili-icon_xinxi_yuedushu");i.lastChild.nodeValue="查看全部"}else if(i.getAttribute("href")!==e){i.firstChild.classList.add("bili-icon_dingdao_bofang");i.firstChild.classList.remove("bili-icon_xinxi_yuedushu");i.lastChild.nodeValue="播放全部"}});t.forEach(e=>e.stop())}})})}})(); diff --git a/bilibili-evolved.user.js b/bilibili-evolved.user.js index cb39f2f96..612a76af3 100644 --- a/bilibili-evolved.user.js +++ b/bilibili-evolved.user.js @@ -1257,7 +1257,7 @@ onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/mi onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/medal-helper.min.css"] = `.medal-popup *{transition:.2s}.medal-popup ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,1fr)}.round-corner .medal-popup ul>li{border-radius:var(--corner-radius)}.medal-popup ul>li.active{box-shadow:0 0 0 1px var(--theme-color)}.medal-popup ul>li:hover{background-color:rgba(0,0,0,.16)}.medal-popup label{display:flex;align-items:center;justify-content:center;cursor:pointer;padding:8px}.medal-popup label>*{flex-shrink:0}.medal-popup input[type=radio]{display:none;width:0;margin:0;padding:0}.medal-popup input[type=radio]~i{opacity:0;transform:scale(.8);margin:0}.medal-popup input[type=radio]~.fans-medal-item{margin:0 4px}.medal-popup input[type=radio]:checked~i{opacity:1}.title-image{display:inline-block;vertical-align:middle;height:20px}.fans-medal-item{display:inline-block;height:14px;line-height:14px;color:#fff;border:1px solid #61decb;border-left:0;white-space:nowrap;border-radius:2px;flex-shrink:0;font-size:12px}.fans-medal-item .label{width:40px;text-align:center;padding:0 2px;color:#fff}.fans-medal-item .level{width:16px;background-color:#fff;text-align:center;color:#61decb}.fans-medal-item .label,.fans-medal-item .level{cursor:pointer;position:relative;display:block;float:left}.level-1{border-color:#61decb}.level-1 .label{background-color:#61decb}.level-1 .level{color:#61decb}.level-2{border-color:#61decb}.level-2 .label{background-color:#61decb}.level-2 .level{color:#61decb}.level-3{border-color:#61decb}.level-3 .label{background-color:#61decb}.level-3 .level{color:#61decb}.level-4{border-color:#61decb}.level-4 .label{background-color:#61decb}.level-4 .level{color:#61decb}.level-5{border-color:#5896de}.level-5 .label{background-color:#5896de}.level-5 .level{color:#5896de}.level-6{border-color:#5896de}.level-6 .label{background-color:#5896de}.level-6 .level{color:#5896de}.level-7{border-color:#5896de}.level-7 .label{background-color:#5896de}.level-7 .level{color:#5896de}.level-8{border-color:#5896de}.level-8 .label{background-color:#5896de}.level-8 .level{color:#5896de}.level-9{border-color:#a068f1}.level-9 .label{background-color:#a068f1}.level-9 .level{color:#a068f1}.level-10{border-color:#a068f1}.level-10 .label{background-color:#a068f1}.level-10 .level{color:#a068f1}.level-11{border-color:#a068f1}.level-11 .label{background-color:#a068f1}.level-11 .level{color:#a068f1}.level-12{border-color:#a068f1}.level-12 .label{background-color:#a068f1}.level-12 .level{color:#a068f1}.level-13{border-color:#ff86b2}.level-13 .label{background-color:#ff86b2}.level-13 .level{color:#ff86b2}.level-14{border-color:#ff86b2}.level-14 .label{background-color:#ff86b2}.level-14 .level{color:#ff86b2}.level-15{border-color:#ff86b2}.level-15 .label{background-color:#ff86b2}.level-15 .level{color:#ff86b2}.level-16{border-color:#ff86b2}.level-16 .label{background-color:#ff86b2}.level-16 .level{color:#ff86b2}.level-17{border-color:#f6be18}.level-17 .label{background-color:#f6be18}.level-17 .level{color:#f6be18}.level-18{border-color:#f6be18}.level-18 .label{background-color:#f6be18}.level-18 .level{color:#f6be18}.level-19{border-color:#f6be18}.level-19 .label{background-color:#f6be18}.level-19 .level{color:#f6be18}.level-20{border-color:#f6be18}.level-20 .label{background-color:#f6be18}.level-20 .level{color:#f6be18}`; onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/medal-helper.min.html"] = `
    更换勋章
    更换头衔
    `; onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/medal-helper.min.js"] = (()=>{return(e,t)=>{const i=()=>{const e=document.URL.match(/live\.bilibili\.com\/(\d+)/);if(!e){return}const t=parseInt(e[1]);if(isNaN(t)){console.warn(`roomID not found`);return}return t};class a{constructor(e=false,t=0){this.isActive=e;this.id=t}static parseJson(e,t){const i=JSON.parse(e);if(i.code!==0){logError(`${t.errorMessage} 错误码:${i.code} ${i.message||""}`);return t.errorAction(i)}return t.successAction(i)}}class s extends a{constructor(e){const{medal_id:t,status:i,level:a,medalName:s,uname:r,roomid:n}=e;super(i===1,t);this.level=a;this.name=s;this.upName=r;this.roomID=n}static async getList(){return a.parseJson(await Ajax.getTextWithCredentials("https://api.live.bilibili.com/i/api/medal?page=1&pageSize=256"),{successAction:e=>e.data.fansMedalList.map(e=>new s(e)),errorAction:()=>[],errorMessage:"无法获取勋章列表."})}static getContainer(){return document.querySelector("#medal-helper .medal-popup ul")}getItemTemplate(e){if(!e){e=this}return`\n
  • \n\n
  • `}async activate(){if(this.isActive){return true}return a.parseJson(await Ajax.getTextWithCredentials(`https://api.live.bilibili.com/i/ajaxWearFansMedal?medal_id=${this.id}`),{successAction:()=>{this.isActive=true;return true},errorAction:()=>false,errorMessage:"佩戴勋章失败."})}async deactivate(){if(!this.isActive){return true}return a.parseJson(await Ajax.getTextWithCredentials(`https://api.live.bilibili.com/i/ajaxCancelWear`),{successAction:()=>{this.isActive=false;return true},errorAction:()=>false,errorMessage:"卸下勋章失败."})}}class r extends a{constructor(e){const{id:t,cid:i,wear:a,css:s,name:n,source:c}=e;super(a,s);this.tid=t;this.cid=i;this.name=n;this.source=c;r.getImageMap().then(e=>{this.imageUrl=e[this.id]})}static async getImageMap(){if(r.imageMap===undefined){return a.parseJson(await Ajax.getTextWithCredentials("https://api.live.bilibili.com/rc/v1/Title/webTitles"),{successAction(e){r.imageMap={};e.data.forEach(e=>{r.imageMap[e.identification]=e.web_pic_url});return r.imageMap},errorAction:()=>{return{}},errorMessage:"获取头衔图片失败."})}else{return r.imageMap}}static async getList(){return a.parseJson(await Ajax.getTextWithCredentials("https://api.live.bilibili.com/i/api/ajaxTitleInfo?page=1&pageSize=256&had=1"),{successAction:e=>e.data.list.map(e=>new r(e)),errorAction:()=>[],errorMessage:"无法获取头衔列表."})}static getContainer(){return document.querySelector("#title-helper .medal-popup ul")}getItemTemplate(e){if(!e){e=this}return`\n
  • \n\n
  • `}async activate(){if(this.isActive){return true}return a.parseJson(await Ajax.postTextWithCredentials(`https://api.live.bilibili.com/i/ajaxWearTitle`,`id=${this.tid}&cid=${this.cid}&csrf=${getCsrf()}&csrf_token=${getCsrf()}`),{successAction:()=>{this.isActive=true;return true},errorAction:()=>false,errorMessage:"佩戴头衔失败."})}async deactivate(){if(!this.isActive){return true}return a.parseJson(await Ajax.postTextWithCredentials(`https://api.live.bilibili.com/i/ajaxCancelWearTitle`,""),{successAction:()=>{this.isActive=false;return true},errorAction:()=>false,errorMessage:"卸下头衔失败."})}}async function n(t,i){const a=t();const r=await i();const n=async()=>{const e=await i();e.forEach(e=>{const t=a.querySelector(`li[data-id='${e.id}']`);if(e.isActive){t.classList.add("active")}else{t.classList.remove("active")}t.querySelector(`input`).checked=e.isActive})};r.forEach(t=>{const i=t.getItemTemplate();a.insertAdjacentHTML("beforeend",i);const c=a.querySelector(`li[data-id='${t.id}']`);const l=c.querySelector(`input`);c.addEventListener("click",i=>{if(i.target===l){return}if(t.isActive){t.deactivate().then(n)}else{const i=r.find(e=>e.isActive);if(i){i.isActive=false}t.activate().then(()=>{if(t instanceof s){e.defaultMedalID=t.id}}).then(n)}})})}if(e.autoMatchMedal){(async()=>{const t=document.URL.match(/live\.bilibili\.com\/(\d+)/);if(!t){return}const i=parseInt(t[1]);if(isNaN(i)){console.warn(`roomID not found`);return}const a=await s.getList();if(!e.defaultMedalID){const t=a.find(e=>e.isActive);if(t){e.defaultMedalID=t.id;console.log(`set defaultMedalID to activeMedal (${t.id})`)}}const r=e.defaultMedalID?a.find(t=>t.id===e.defaultMedalID):a.find(e=>e.isActive);const n=a.find(e=>e.roomID===i);if(!n){if(r){await r.activate();console.log(`no matchMedal, fallback to defaultMedal (${r.id})`)}}else{await n.activate();console.log(`activated matchMedal (${n.id})`)}})()}return{export:{Badge:a,Medal:s,Title:r},widget:{condition:()=>document.domain==="live.bilibili.com",content:t.import("medalHelperHtml"),success:async()=>{document.querySelectorAll(".medal-helper").forEach(e=>{const t=e.querySelector(".medal-popup");e.addEventListener("click",e=>{if(!t.contains(e.target)){t.classList.toggle("opened")}})});n(s.getContainer,s.getList);await r.getImageMap();n(r.getContainer,r.getList)}}}}})(); -onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/minimal-home.vue.min.js"] = (()=>{return(i,e)=>{const a=`
    {{tab.displayName}}
    `;e.applyStyleFromText(`.minimal-home{--card-width:600px;--card-height:120px;--card-margin:16px;--card-column-count:2;transform:translateX(calc(var(--card-margin)/ 2))}.minimal-home,.minimal-home *{box-sizing:border-box;transition:color .2s ease-out,opacity .2s ease-out,transform .2s ease-out,background-color .2s ease-out}.minimal-home .logo{font-size:40px;color:var(--theme-color)}.minimal-home .minimal-home-header{display:flex;align-items:center;justify-content:space-between}.minimal-home .minimal-home-header .home-tabs{display:flex;flex-grow:1;justify-content:center;margin-right:var(--card-margin)}.minimal-home .minimal-home-header .home-tabs .tab{color:#000;opacity:.75;position:relative;cursor:pointer}.minimal-home .minimal-home-header .home-tabs .tab:not(:first-child){margin-left:32px}body.dark .minimal-home .minimal-home-header .home-tabs .tab{color:#eee}.minimal-home .minimal-home-header .home-tabs .tab.active{transform:scale(1.2);opacity:1;font-weight:700}.minimal-home .minimal-home-header .home-tabs .tab::after{content:"";position:absolute;bottom:-8px;left:50%;transform:translateX(-50%) scaleX(0);height:3px;width:24px;background-color:var(--theme-color);border-radius:2px;transition:.2s ease-out}.minimal-home .minimal-home-header .home-tabs .tab.active::after{transform:translateX(-50%) scaleX(1)}.minimal-home .minimal-home-content{margin-top:32px;min-height:100vh;width:calc(var(--card-column-count) * (var(--card-width) + var(--card-margin)))}.minimal-home .minimal-home-content .minimal-home-content-transition-enter-active,.minimal-home .minimal-home-content .minimal-home-content-transition-leave-active{transition:.3s ease-out}.minimal-home .minimal-home-content .minimal-home-content-transition-enter,.minimal-home .minimal-home-content .minimal-home-content-transition-leave-to{opacity:0;transform:scale(.95)}.minimal-home .minimal-home-footer{padding:24px 0;display:flex;justify-content:space-around;align-items:center;margin-right:var(--card-margin)}.minimal-home .minimal-home-footer .footer-button{display:flex;align-items:center;padding:8px 12px 8px 8px;background-color:#8882;color:#000;border-radius:24px;font-size:11pt;cursor:pointer}.minimal-home .minimal-home-footer .footer-button .be-icon{margin-right:8px}body.dark .minimal-home .minimal-home-footer .footer-button{color:#eee}.minimal-home .minimal-home-footer .footer-button:hover{background-color:#8884}@media screen and (max-width:1300px){.minimal-home{--card-column-count:1}}@media screen and (min-width:2000px){.minimal-home{--card-column-count:3}.minimal-home .cards.show-rank .video-card:nth-child(16),.minimal-home .cards.show-rank .video-card:nth-child(24),.minimal-home .cards.show-rank .video-card:nth-child(8){margin-right:calc(var(--card-margin) * 2 + var(--card-width))}}`,"minimal-home-style");const o=[{name:"video",displayName:"视频动态",active:true,more:"https://t.bilibili.com/?tab=8",showRank:false},{name:"ranking",displayName:"热门视频",active:false,more:"https://www.bilibili.com/ranking",showRank:true}];return{export:Object.assign({template:a},{components:{Icon:()=>e.importAsync("icon.vue"),VideoList:()=>e.importAsync("video-list.vue")},data(){return{tabs:o,content:"VideoList",logoImage:null}},computed:{activeTab(){return this.tabs.find(i=>i.active)},rankDays(){return this.activeTab.rankDays||0}},async mounted(){},methods:{changeTab(i){if(i.active){window.open(i.more,"_blank");return}const e=this.activeTab;e.active=false;i.active=true},goToTop(){scrollTo(0,0)},viewMore(){open(this.activeTab.more,"_blank")}}})}}})(); +onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/minimal-home.vue.min.js"] = (()=>{return(i,a)=>{const e=`
    {{tab.displayName}}
    `;a.applyStyleFromText(`.minimal-home{--card-width:600px;--card-height:120px;--card-margin:16px;--card-column-count:2;transform:translateX(calc(var(--card-margin)/ 2))}.minimal-home,.minimal-home *{box-sizing:border-box;transition:color .2s ease-out,opacity .2s ease-out,transform .2s ease-out,background-color .2s ease-out}.minimal-home .logo{font-size:40px;color:var(--theme-color)}.minimal-home .minimal-home-header{display:flex;align-items:center;justify-content:space-between}.minimal-home .minimal-home-header .home-tabs{display:flex;flex-grow:1;justify-content:center;margin-right:var(--card-margin)}.minimal-home .minimal-home-header .home-tabs .tab{color:#000;opacity:.75;position:relative;cursor:pointer}.minimal-home .minimal-home-header .home-tabs .tab:not(:first-child){margin-left:32px}body.dark .minimal-home .minimal-home-header .home-tabs .tab{color:#eee}.minimal-home .minimal-home-header .home-tabs .tab.active{transform:scale(1.2);opacity:1;font-weight:700}.minimal-home .minimal-home-header .home-tabs .tab::after{content:"";position:absolute;bottom:-8px;left:50%;transform:translateX(-50%) scaleX(0);height:3px;width:24px;background-color:var(--theme-color);border-radius:2px;transition:.2s ease-out}.minimal-home .minimal-home-header .home-tabs .tab.active::after{transform:translateX(-50%) scaleX(1)}.minimal-home .minimal-home-content{margin-top:32px;min-height:100vh;width:calc(var(--card-column-count) * (var(--card-width) + var(--card-margin)))}.minimal-home .minimal-home-content .minimal-home-content-transition-enter-active,.minimal-home .minimal-home-content .minimal-home-content-transition-leave-active{transition:.3s ease-out}.minimal-home .minimal-home-content .minimal-home-content-transition-enter,.minimal-home .minimal-home-content .minimal-home-content-transition-leave-to{opacity:0;transform:scale(.95)}.minimal-home .minimal-home-footer{padding:24px 0;display:flex;justify-content:space-around;align-items:center;margin-right:var(--card-margin)}.minimal-home .minimal-home-footer .footer-button{display:flex;align-items:center;padding:8px 12px 8px 8px;background-color:#8882;color:#000;border-radius:24px;font-size:11pt;cursor:pointer}.minimal-home .minimal-home-footer .footer-button .be-icon{margin-right:8px}body.dark .minimal-home .minimal-home-footer .footer-button{color:#eee}.minimal-home .minimal-home-footer .footer-button:hover{background-color:#8884}@media screen and (max-width:1300px){.minimal-home{--card-column-count:1}}@media screen and (max-width:680px){.minimal-home{--card-column-count:2;--card-width:210px;--card-height:240px}}@media screen and (max-width:470px){.minimal-home{--card-column-count:1}}@media screen and (min-width:2000px){.minimal-home{--card-column-count:3}.minimal-home .cards.show-rank .video-card:nth-child(16),.minimal-home .cards.show-rank .video-card:nth-child(24),.minimal-home .cards.show-rank .video-card:nth-child(8){margin-right:calc(var(--card-margin) * 2 + var(--card-width))}}`,"minimal-home-style");const o=[{name:"video",displayName:"视频动态",active:true,more:"https://t.bilibili.com/?tab=8",showRank:false},{name:"ranking",displayName:"热门视频",active:false,more:"https://www.bilibili.com/ranking",showRank:true}];return{export:Object.assign({template:e},{components:{Icon:()=>a.importAsync("icon.vue"),VideoList:()=>a.importAsync("video-list.vue")},data(){return{tabs:o,content:"VideoList",logoImage:null}},computed:{activeTab(){return this.tabs.find(i=>i.active)},rankDays(){return this.activeTab.rankDays||0}},async mounted(){},methods:{changeTab(i){if(i.active){window.open(i.more,"_blank");return}const a=this.activeTab;a.active=false;i.active=true},goToTop(){scrollTo(0,0)},viewMore(){open(this.activeTab.more,"_blank")}}})}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/mini-player-touch-move.min.css"] = `#bofqi.mini-player .drag-bar{touch-action:none!important;height:40px!important;line-height:40px!important;top:-40px!important}#bofqi.mini-player .drag-bar i:last-child{margin:10px!important}`; onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/mini-player-touch-move.min.js"] = (()=>{return(e,o)=>{const i=async(e=true)=>{if(!["//www.bilibili.com/bangumi/play/","//www.bilibili.com/video/"].some(e=>document.URL.includes(e))){return}const i=await SpinQuery.select("#bofqi");if(!i){console.warn("mini player touch move: player not found");return}const{enableTouchMove:n,disableTouchMove:l}=await o.importAsync("touch-move");if(e){o.applyStyle("miniPlayerTouchMoveStyle");n(i,{minMoveDistance:0})}else{o.removeStyle("miniPlayerTouchMoveStyle");l(i)}};i(true);return{reload:()=>i(true),unload:()=>i(false)}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/narrow-danmaku.min.js"] = (()=>{return(e,l)=>{const i=``;l.applyStyleFromText(i);return{reload:()=>l.applyStyleFromText(i),unload:()=>document.getElementById("narrow-danmaku-style").remove()}}})(); @@ -1299,8 +1299,8 @@ onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/mi onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simple-home.vue.min.js"] = (()=>{return(e,o)=>{const t=`
    `;o.applyStyleFromText(`.simple-home{--title-color:black;color:#444;display:grid;grid-template-areas:"blackboards trendings trendings" "feeds feeds info" "categories categories categories";grid-template-columns:repeat(3,auto);grid-template-rows:repeat(3,auto);column-gap:32px;row-gap:16px}.simple-home,.simple-home *{transition:.2s ease-out}body.dark .simple-home{--title-color:white;color:#ddd}.simple-home .jump-dots{grid-area:dots;align-self:center;justify-self:center}.simple-home .jump-dots label{display:block}.simple-home .jump-dots label:not(:last-child){margin-bottom:6px}.simple-home .jump-dots .jump-dot{background-color:#ddd;width:8px;height:20px;border-radius:8px;cursor:pointer}body.dark .simple-home .jump-dots .jump-dot{background-color:#444}.simple-home .hidden-input{display:none}.simple-home .hidden-input:checked:nth-of-type(1)~.jump-dots label:nth-child(1) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(1)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 0 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(2)~.jump-dots label:nth-child(2) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(2)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 1 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(3)~.jump-dots label:nth-child(3) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(3)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 2 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(4)~.jump-dots label:nth-child(4) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(4)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 3 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(5)~.jump-dots label:nth-child(5) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(5)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 4 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(6)~.jump-dots label:nth-child(6) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(6)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 5 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(7)~.jump-dots label:nth-child(7) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(7)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 6 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(8)~.jump-dots label:nth-child(8) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(8)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 7 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(9)~.jump-dots label:nth-child(9) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(9)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 8 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(10)~.jump-dots label:nth-child(10) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(10)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 9 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(11)~.jump-dots label:nth-child(11) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(11)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 10 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(12)~.jump-dots label:nth-child(12) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(12)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 11 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(13)~.jump-dots label:nth-child(13) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(13)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 12 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(14)~.jump-dots label:nth-child(14) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(14)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 13 * var(--blackboard-height)))}.simple-home .hidden-input:checked:nth-of-type(15)~.jump-dots label:nth-child(15) .jump-dot{background-color:var(--theme-color);height:40px}.simple-home .hidden-input:checked:nth-of-type(15)~.blackboard-cards .blackboard-card{transform:translateY(calc(-1 * 14 * var(--blackboard-height)))}.simple-home .more,.simple-home .toggle-reorder{cursor:pointer;padding:4px 12px 4px 8px;display:flex;align-items:center;border-radius:16px;font-size:13px;font-weight:700}.simple-home .more .be-icon,.simple-home .toggle-reorder .be-icon{margin-right:8px;transition:.3s cubic-bezier(.25,.46,.45,.94);font-size:22px;font-weight:400}.simple-home .more:not(.toggle-reorder):hover .be-icon,.simple-home .toggle-reorder:not(.toggle-reorder):hover .be-icon{transform:rotate(180deg)}.simple-home .more,.simple-home .more.hover,.simple-home .toggle-reorder,.simple-home .toggle-reorder.hover{color:inherit!important;background-color:#ddd!important}body.dark .simple-home .more,body.dark .simple-home .more:hover,body.dark .simple-home .toggle-reorder,body.dark .simple-home .toggle-reorder:hover{color:inherit!important;background-color:#333!important}.simple-home .header{grid-area:header;display:flex;justify-content:space-between;align-items:center}.simple-home .header .title{color:var(--title-color);font-weight:700;font-size:22px}.simple-home .header .tabs{display:flex;align-items:center}.simple-home .header .tabs .tab{cursor:pointer;position:relative;white-space:nowrap}.simple-home .header .tabs .tab .tab-name{opacity:.5;font-size:14px}.simple-home .header .tabs .tab:not(:last-child){margin-right:24px}.simple-home .header .tabs .tab::after{content:"";width:calc(80%);height:3px;border-radius:2px;position:absolute;background-color:var(--theme-color);left:10%;bottom:-6px;transform:scaleX(0);transition:.2s ease-out}.simple-home .header .tabs .tab.active::after{transform:scaleX(1)}.simple-home .header .tabs .tab.active .tab-name{font-weight:700;opacity:1;transform:scale(1.1)}.simple-home .sub-header{color:var(--title-color);font-weight:700;font-size:18px;display:flex;align-items:center}.simple-home .sub-header::before{content:"";display:block;width:12px;height:12px;background-color:var(--theme-color);border-radius:50%;margin-right:8px}.simple-home .blackboards{grid-area:blackboards;justify-self:start}.simple-home .trendings{grid-area:trendings;transform:translateX(8px);justify-self:end}.simple-home .info-row{grid-area:info;justify-self:end}.simple-home .feeds{grid-area:feeds;transform:translateX(-8px);justify-self:start}.simple-home .categories{grid-area:categories;padding-bottom:32px}@media screen and (max-width:900px){.simple-home{grid-template-areas:"blackboards" "trendings" "info" "feeds" "categories";grid-template-columns:1fr;grid-template-rows:repeat(5,auto)}.simple-home .blackboards,.simple-home .categories,.simple-home .feeds,.simple-home .info-row,.simple-home .trendings{justify-self:center}}`,"simple-home-style");return{export:Object.assign({template:t},{components:{Blackboards:()=>o.importAsync("blackboard.vue"),TrendingVideos:()=>o.importAsync("trending-videos.vue"),InfoRow:()=>o.importAsync("online-info-row.vue"),Feeds:()=>o.importAsync("simple-home-feeds.vue"),Categories:()=>o.importAsync("simple-home-categories.vue")}})}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simple-home-bangumi-category.vue.min.js"] = (()=>{return(i,e)=>{const a=`
    `;e.applyStyleFromText(`.simple-home .bangumi-category{display:grid;--total-height:1010px;--rank-width:350px;--rank-height:calc(var(--rank-width) / 16 * 10);grid-template:"timeline rank" 1fr/1fr var(--rank-width);grid-row-gap:24px;row-gap:24px;grid-column-gap:32px;column-gap:32px;position:relative}@media screen and (min-width:1800px){.simple-home .bangumi-category{--rank-width:365px}}@media screen and (min-width:1500px){.simple-home .bangumi-category{--rank-width:365px}}@media screen and (min-width:1200px){.simple-home .bangumi-category{--rank-width:365px}}@media screen and (min-width:1700px){.simple-home .bangumi-category{--rank-width:380px}}@media screen and (min-width:1400px){.simple-home .bangumi-category{--rank-width:380px}}@media screen and (min-width:1100px){.simple-home .bangumi-category{--rank-width:380px}}@media screen and (min-width:1600px){.simple-home .bangumi-category{--rank-width:395px}}@media screen and (min-width:1300px){.simple-home .bangumi-category{--rank-width:395px}}@media screen and (min-width:1000px){.simple-home .bangumi-category{--rank-width:395px}}.simple-home .bangumi-category,.simple-home .bangumi-category *,.simple-home .bangumi-category ::after,.simple-home .bangumi-category ::before{transition:.2s ease-out}.simple-home .bangumi-category .loading{opacity:0;pointer-events:none;border-radius:16px;position:absolute}.simple-home .bangumi-category .timeline{grid-area:timeline}.simple-home .bangumi-category.timeline-loading .timeline.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.simple-home .bangumi-category.timeline-loading .timeline:not(.loading){opacity:0;pointer-events:none}.simple-home .bangumi-category .rank{height:var(--total-height);grid-area:rank}.simple-home .bangumi-category.rank-loading .rank.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.simple-home .bangumi-category.rank-loading .rank:not(.loading){opacity:0;pointer-events:none}`,"simple-home-bangumi-category-style");return{export:Object.assign({template:a},{components:{BangumiTimeline:()=>e.importAsync("bangumi-timeline.vue"),RankList:()=>e.importAsync("rank-list.vue")},props:["rid"],data(){return{timeline:{error:false,loading:true},rank:{error:false,loading:true,videos:[]}}},computed:{timelineType(){return this.rid===13?"global":"chinese"}},watch:{rid(){this.loadRankList()}},methods:{async loadRankList(){const{RegionCodes:i}=await e.importAsync("category-regions");const a=this.rid===i.bangumi?`https://api.bilibili.com/pgc/web/rank/list?season_type=1&day=3`:`https://api.bilibili.com/pgc/web/rank/list?season_type=4&day=3`;try{const i=await Ajax.getJson(a);if(i.code!==0){throw new Error(i.message)}const e=i.result.list.map(i=>{return{id:i.season_id,href:i.url,coverUrl:i.new_ep.cover.replace("http:","https:"),title:i.title,points:i.pts,epTitle:i.new_ep.index_show,playCount:i.stat.view,danmakuCount:i.stat.danmaku,watchlater:null}});this.rank.videos=e.slice(0,10)}catch(i){logError(i);this.rank.error=true}finally{this.rank.loading=false}}},mounted(){this.loadRankList()}})}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simple-home-categories.vue.min.js"] = (()=>{return(e,t)=>{const r=`
    分区
    {{t.name}}
    {{reordering ? '完成' : '排序'}}
    `;t.applyStyleFromText(`.simple-home .categories{--loading-from:#d4d4d4;--loading-to:#ddd;--slideshow-ratio:0.6;--rank-width:370px;--rank-height:calc(var(--rank-width) / 16 * 10);--card-height:280px;--card-width:calc(var(--card-height) * (42 / 25));display:flex;flex-direction:column}body.dark .simple-home .categories{--loading-from:#333;--loading-to:#262626}@keyframes category-loading{from{background-color:var(--loading-from)}to{background-color:var(--loading-to)}}@media screen and (max-width:1800px){.simple-home .categories{--card-height:272px;--rank-width:350px}}@media screen and (max-width:1700px){.simple-home .categories{--card-height:264px;--rank-width:330px}}@media screen and (max-width:1600px){.simple-home .categories{--card-height:256px;--rank-width:310px}}@media screen and (max-width:1500px){.simple-home .categories{--card-height:248px;--rank-width:290px}}@media screen and (max-width:1400px){.simple-home .categories{--card-height:240px;--rank-width:270px}}@media screen and (max-width:1300px){.simple-home .categories{--card-height:232px;--rank-width:250px}}@media screen and (max-width:1200px){.simple-home .categories{--card-height:224px;--rank-width:230px}}@media screen and (max-width:1100px){.simple-home .categories{--card-height:216px;--rank-width:210px}}@media screen and (max-width:1000px){.simple-home .categories{--card-height:208px;--rank-width:190px}}@media screen and (max-width:900px){.simple-home .categories{--card-height:200px;--rank-width:170px}}@media screen and (max-width:800px){.simple-home .categories{--card-height:192px;--rank-width:150px}}@media screen and (max-width:700px){.simple-home .categories{--card-height:184px;--rank-width:130px}}.simple-home .categories,.simple-home .categories *,.simple-home .categories ::after,.simple-home .categories ::before{transition:.2s ease-out}.simple-home .categories .header .tabs{display:flex;flex:1 1 0;margin:0 32px;justify-content:flex-start;overflow:auto;width:0;height:42px;scrollbar-width:none!important}.simple-home .categories .header .tabs::-webkit-scrollbar{height:0!important;width:0!important}.simple-home .categories .header .tabs .tab{transition:none;margin-right:24px}.simple-home .categories .area-header{grid-area:header;display:flex;align-items:center;justify-content:flex-start;font-weight:700;font-size:11pt;padding-bottom:12px}.simple-home .categories .area-header::before{content:"";display:inline-flex;height:10px;width:10px;background-color:var(--theme-color);border-radius:50%;margin-right:8px}.simple-home .categories .category-content{margin-top:12px;margin-bottom:36px}.simple-home .categories .category-content-enter,.simple-home .categories .category-content-leave-to{opacity:0}`,"simple-home-categories-style");const i={anime:"动画",bangumi:"番剧",china:"国创",manga:"漫画",music:"音乐",dance:"舞蹈",game:"游戏",tech:"科技",digital:"数码",life:"生活",kichiku:"鬼畜",fashion:"时尚",ads:"广告",entertainment:"娱乐",column:"专栏",movie:"电影",tv:"TV剧",film:"影视",documentary:"纪录片"};return{export:Object.assign({template:r},{components:{Icon:()=>t.importAsync("icon.vue"),NormalCategory:()=>t.importAsync("simple-home-normal-category.vue"),BangumiCategory:()=>t.importAsync("simple-home-bangumi-category.vue")},data(){return{tabs:Object.entries(i).map(([e,t])=>{return{key:e,name:t}}),selectedTab:Object.entries(e.simpleHomeCategoryOrders).sort((e,t)=>e[1]-t[1])[0][0],reordering:false,reorder:null,regionCodes:null}},async mounted(){const r=this.$refs.reorderContainer;const{RegionCodes:i}=await t.importAsync("category-regions");this.regionCodes=i;const{Reorder:a}=await t.importAsync("reorder");const o=new a(r);this.reorder=o;o.addEventListener("reorder",t=>{const r=t.detail;for(const t of r){const{element:r,order:i}=t;e.simpleHomeCategoryOrders[r.getAttribute("data-key")]=i}e.simpleHomeCategoryOrders=e.simpleHomeCategoryOrders})},methods:{getOrder(t){return e.simpleHomeCategoryOrders[t]}},computed:{content(){if(["bangumi","china"].includes(this.selectedTab)){return"BangumiCategory"}else if(this.selectedTab==="manga"){return null}else if(this.selectedTab==="column"){return null}else{return"NormalCategory"}},rid(){if(!this.regionCodes){return-1}else{return this.regionCodes[this.selectedTab]}}}})}}})(); -onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simple-home-feeds.vue.min.js"] = (()=>{return(e,t)=>{const a=`
    没有动态哦(´・_・\`)
    `;t.applyStyleFromText(`.simple-home .feeds{justify-self:start;display:grid;grid-template-areas:"header header" "contents contents";grid-template-columns:repeat(2,auto);grid-template-rows:repeat(2,auto);row-gap:16px;column-gap:16px}.simple-home .feeds .header,.simple-home .feeds .sub-header{padding:0 8px}.simple-home .feeds .header .tab:nth-child(2),.simple-home .feeds .sub-header .tab:nth-child(2){margin-left:32px}.simple-home .feeds .header .online,.simple-home .feeds .sub-header .online{padding:8px 16px;height:32px;border-radius:16px;background-color:#8882;color:inherit;font-size:12px;display:flex;align-items:center;box-sizing:border-box}.simple-home .feeds .contents{grid-area:contents;display:flex;overflow:auto;--card-width:200px;--card-height:250px;--card-count:3;width:calc((var(--card-width) + 16px) * var(--card-count));padding-bottom:16px;scroll-snap-type:x mandatory;scrollbar-width:none!important;min-height:calc(var(--card-height) + 16px)}@media screen and (min-width:1100px){.simple-home .feeds .contents{--card-count:3}}@media screen and (min-width:1300px){.simple-home .feeds .contents{--card-count:4}}@media screen and (min-width:1550px){.simple-home .feeds .contents{--card-count:5}}.simple-home .feeds .contents::-webkit-scrollbar{width:0!important;height:0!important}.simple-home .feeds .contents .card-wrapper{padding:0 8px;scroll-snap-align:start;flex-shrink:0}.simple-home .feeds .contents .empty{display:flex;align-items:center;justify-content:center;width:100%;font-size:16px}`,"simple-home-feeds-style");const i=[{name:"视频",type:"video",url:"https://t.bilibili.com/?tab=8"},{name:"番剧",type:"bangumi",url:"https://t.bilibili.com/?tab=512"}];return{export:Object.assign({template:a},{components:{VideoCard:()=>t.importAsync("video-card.vue"),Icon:()=>t.importAsync("icon.vue")},data(){return{online:"--",tabs:i,currentTab:i[0],feedCards:[]}},watch:{currentTab(e){this.updateFeedCards(e)}},methods:{async updateFeedCards(e){const{getVideoFeeds:a}=await t.importAsync("feeds-apis");this.feedCards=await a(e.type)},changeTab(e){if(this.currentTab===e){open(e.url,"_blank")}else{this.currentTab=e}}},async mounted(){this.updateFeedCards(this.currentTab);const e=await Ajax.getJson("https://api.bilibili.com/x/web-interface/online");if(e.code===0){this.online=e.data.web_online}}})}}})(); -onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simple-home-normal-category.vue.min.js"] = (()=>{return(t,i)=>{const e=`
    `;i.applyStyleFromText(`.category-view{display:grid;grid-template:"new-activity rank" 1fr "new-post rank" 1fr/1fr calc(1.5 * var(--rank-width) + 10px);grid-row-gap:24px;row-gap:24px;grid-column-gap:32px;column-gap:32px;position:relative}.category-view,.category-view *,.category-view ::after,.category-view ::before{transition:.2s ease-out}.category-view .loading{opacity:0;pointer-events:none;border-radius:16px;position:absolute}.category-view .new-activity{align-self:start;grid-area:new-activity}.category-view .new-post{align-self:end;grid-area:new-post}.category-view.new-activity-loading .new-activity.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.new-activity-loading .new-activity:not(.loading){opacity:0;pointer-events:none}.category-view.new-post-loading .new-post.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.new-post-loading .new-post:not(.loading){opacity:0;pointer-events:none}.category-view .rank{grid-area:rank}.category-view.rank-loading .rank.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.rank-loading .rank:not(.loading){opacity:0;pointer-events:none}@media screen and (max-width:1300px){.category-view{grid-template:"new-activity" 1fr "new-post" 1fr "rank" auto/1fr}.category-view .rank{justify-self:center}}`,"simple-home-normal-category-style");return{export:Object.assign({template:e},{components:{SlideshowCards:()=>i.importAsync("slideshow-cards.vue"),RankList:()=>i.importAsync("rank-list.vue")},store:store,props:{rid:{type:Number,required:true}},data(){return{newActivity:{error:false,loading:true,videos:[]},newPost:{error:false,loading:true,videos:[]},rank:{error:false,loading:true,videos:[]},loaded:false}},computed:{...Vuex.mapState(["watchlaterList"])},methods:{async loadCards(t,i,e){if(e===undefined){e=(t=>{const i=getUID();const e=_.get(t,"data.archives",[]);return e.map(t=>{return{id:t.aid,aid:t.aid,coverUrl:t.pic.replace("http:","https:"),title:t.title,upName:t.owner.name,upFaceUrl:t.owner.face.replace("http:","https:"),upID:t.owner.mid,playCount:t.stat.view,danmakuCount:t.stat.danmaku,like:t.stat.like,coins:t.stat.coin,description:t.desc,type:t.tname,watchlater:i?this.watchlaterList.includes(t.aid):null}})})}try{this[t].loading=true;const a=await Ajax.getJson(i);if(a.code!==0){this[t].error=true}this[t].videos=e(a)}catch(i){logError(i);this[t].error=true}finally{this[t].loading=false}},async loadNewActivity(){await this.loadCards("newActivity",`https://api.bilibili.com/x/web-interface/dynamic/region?ps=10&rid=${this.rid}`)},async loadNewPost(){await this.loadCards("newPost",`https://api.bilibili.com/x/web-interface/newlist?ps=10&rid=${this.rid}`)},async loadRank(){await this.loadCards("rank",`https://api.bilibili.com/x/web-interface/ranking/region?rid=${this.rid}&day=3&original=0`,t=>{const i=getUID();const e=t.data;return e.map(t=>{return{id:t.aid,aid:parseInt(t.aid),title:t.title,playCount:t.play,favorites:t.favorites,upID:t.mid,upName:t.author,description:t.description,coverUrl:t.pic.replace("http:","https:"),coins:t.coins,durationText:t.duration,points:t.pts,watchlater:i?this.watchlaterList.includes(parseInt(t.aid)):null}})})},...Vuex.mapActions(["toggleWatchlater"]),updateVideos(){this.loadNewActivity();this.loadNewPost();this.loadRank()}},watch:{rid(t){if(t>0){if(this.loaded){this.updateVideos()}}else{console.warn(`rid=${t}`)}}},mounted(){const t=new IntersectionObserver(()=>{this.updateVideos();this.loaded=true;t.disconnect()});t.observe(this.$el)}})}}})(); +onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simple-home-feeds.vue.min.js"] = (()=>{return(e,t)=>{const a=`
    没有动态哦(´・_・\`)
    `;t.applyStyleFromText(`.simple-home .feeds{justify-self:start;display:grid;grid-template-areas:"header header" "contents contents";grid-template-columns:repeat(2,auto);grid-template-rows:repeat(2,auto);row-gap:16px;column-gap:16px}.simple-home .feeds .header,.simple-home .feeds .sub-header{padding:0 8px}.simple-home .feeds .header .tab:nth-child(2),.simple-home .feeds .sub-header .tab:nth-child(2){margin-left:32px}.simple-home .feeds .header .online,.simple-home .feeds .sub-header .online{padding:8px 16px;height:32px;border-radius:16px;background-color:#8882;color:inherit;font-size:12px;display:flex;align-items:center;box-sizing:border-box}.simple-home .feeds .contents{grid-area:contents;display:flex;overflow:auto;--card-width:200px;--card-height:250px;--card-count:2;width:calc((var(--card-width) + 16px) * var(--card-count));padding-bottom:16px;scroll-snap-type:x mandatory;scrollbar-width:none!important;min-height:calc(var(--card-height) + 16px)}@media screen and (max-width:900px){.simple-home .feeds .contents{--card-count:3}}@media screen and (min-width:1100px){.simple-home .feeds .contents{--card-count:3}}@media screen and (min-width:1300px){.simple-home .feeds .contents{--card-count:4}}@media screen and (min-width:1550px){.simple-home .feeds .contents{--card-count:5}}.simple-home .feeds .contents::-webkit-scrollbar{width:0!important;height:0!important}.simple-home .feeds .contents .card-wrapper{padding:0 8px;scroll-snap-align:start;flex-shrink:0}.simple-home .feeds .contents .empty{display:flex;align-items:center;justify-content:center;width:100%;font-size:16px}`,"simple-home-feeds-style");const i=[{name:"视频",type:"video",url:"https://t.bilibili.com/?tab=8"},{name:"番剧",type:"bangumi",url:"https://t.bilibili.com/?tab=512"}];return{export:Object.assign({template:a},{components:{VideoCard:()=>t.importAsync("video-card.vue"),Icon:()=>t.importAsync("icon.vue")},data(){return{online:"--",tabs:i,currentTab:i[0],feedCards:[]}},watch:{currentTab(e){this.updateFeedCards(e)}},methods:{async updateFeedCards(e){const{getVideoFeeds:a}=await t.importAsync("feeds-apis");this.feedCards=await a(e.type)},changeTab(e){if(this.currentTab===e){open(e.url,"_blank")}else{this.currentTab=e}}},async mounted(){this.updateFeedCards(this.currentTab);const e=await Ajax.getJson("https://api.bilibili.com/x/web-interface/online");if(e.code===0){this.online=e.data.web_online}}})}}})(); +onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simple-home-normal-category.vue.min.js"] = (()=>{return(t,i)=>{const e=`
    `;i.applyStyleFromText(`.category-view{display:grid;grid-template:"new-activity rank" 1fr "new-post rank" 1fr/1fr calc(1.5 * var(--rank-width) + 10px);grid-row-gap:24px;row-gap:24px;grid-column-gap:32px;column-gap:32px;position:relative}.category-view,.category-view *,.category-view ::after,.category-view ::before{transition:.2s ease-out}.category-view .loading{opacity:0;pointer-events:none;border-radius:16px;position:absolute}.category-view .new-activity{align-self:start;grid-area:new-activity}.category-view .new-post{align-self:end;grid-area:new-post}.category-view.new-activity-loading .new-activity.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.new-activity-loading .new-activity:not(.loading){opacity:0;pointer-events:none}.category-view.new-post-loading .new-post.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.new-post-loading .new-post:not(.loading){opacity:0;pointer-events:none}.category-view .rank{grid-area:rank}.category-view.rank-loading .rank.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.rank-loading .rank:not(.loading){opacity:0;pointer-events:none}@media screen and (max-width:1300px){.category-view{grid-template:"new-activity" 1fr "new-post" 1fr "rank" auto/1fr}.category-view .rank{display:none;justify-self:center}}`,"simple-home-normal-category-style");return{export:Object.assign({template:e},{components:{SlideshowCards:()=>i.importAsync("slideshow-cards.vue"),RankList:()=>i.importAsync("rank-list.vue")},store:store,props:{rid:{type:Number,required:true}},data(){return{newActivity:{error:false,loading:true,videos:[]},newPost:{error:false,loading:true,videos:[]},rank:{error:false,loading:true,videos:[]},loaded:false}},computed:{...Vuex.mapState(["watchlaterList"])},methods:{async loadCards(t,i,e){if(e===undefined){e=(t=>{const i=getUID();const e=_.get(t,"data.archives",[]);return e.map(t=>{return{id:t.aid,aid:t.aid,coverUrl:t.pic.replace("http:","https:"),title:t.title,upName:t.owner.name,upFaceUrl:t.owner.face.replace("http:","https:"),upID:t.owner.mid,playCount:t.stat.view,danmakuCount:t.stat.danmaku,like:t.stat.like,coins:t.stat.coin,description:t.desc,type:t.tname,watchlater:i?this.watchlaterList.includes(t.aid):null}})})}try{this[t].loading=true;const a=await Ajax.getJson(i);if(a.code!==0){this[t].error=true}this[t].videos=e(a)}catch(i){logError(i);this[t].error=true}finally{this[t].loading=false}},async loadNewActivity(){await this.loadCards("newActivity",`https://api.bilibili.com/x/web-interface/dynamic/region?ps=10&rid=${this.rid}`)},async loadNewPost(){await this.loadCards("newPost",`https://api.bilibili.com/x/web-interface/newlist?ps=10&rid=${this.rid}`)},async loadRank(){await this.loadCards("rank",`https://api.bilibili.com/x/web-interface/ranking/region?rid=${this.rid}&day=3&original=0`,t=>{const i=getUID();const e=t.data;return e.map(t=>{return{id:t.aid,aid:parseInt(t.aid),title:t.title,playCount:t.play,favorites:t.favorites,upID:t.mid,upName:t.author,description:t.description,coverUrl:t.pic.replace("http:","https:"),coins:t.coins,durationText:t.duration,points:t.pts,watchlater:i?this.watchlaterList.includes(parseInt(t.aid)):null}})})},...Vuex.mapActions(["toggleWatchlater"]),updateVideos(){this.loadNewActivity();this.loadNewPost();this.loadRank()}},watch:{rid(t){if(t>0){if(this.loaded){this.updateVideos()}}else{console.warn(`rid=${t}`)}}},mounted(){const t=new IntersectionObserver(()=>{this.updateVideos();this.loaded=true;t.disconnect()});t.observe(this.$el)}})}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simplify-home.min.css"] = `#app>.bili-header-m.stardust-common>.bili-wrapper,#app>.bili-wrapper,#app>.elevator-module,.bili-header-m .head-banner .head-content .head-logo,.international-footer,.international-header .b-wrap,.international-home>:not(.international-header){display:none!important}`; onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simplify-home.min.js"] = (()=>{return(e,i)=>{(async()=>{if(document.URL.replace(window.location.search,"")!=="https://www.bilibili.com/"){i.removeStyle("simplifyHomeStyle");return}document.body.insertAdjacentHTML("beforeend",`\n\n`);const m=new Vue({el:"simplify-home",components:{SimplifyHome:()=>i.importAsync("simplify-home.vue")},data:{homeStyle:e.simplifyHomeStyle}});addSettingsListener("simplifyHomeStyle",e=>m.homeStyle=e,false)})()}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/simplify-home.vue.min.js"] = (()=>{return(e,o)=>{const m=`
    `;o.applyStyleFromText(`.simplify-home{padding-top:32px;display:flex;align-items:flex-start;justify-content:center;min-height:100vh;background-color:#f4f4f4}body.dark .simplify-home{background-color:#181818}.simplify-home .simplify-home-component{max-width:100%}html{scroll-behavior:smooth}`,"simplify-home-style");return{export:Object.assign({template:m},{components:{"minimal-home":()=>o.importAsync("minimal-home.vue"),"simple-home":()=>o.importAsync("simple-home.vue")},computed:{activeComponent(){return this.homeStyle==="清爽"?"simple-home":"minimal-home"}},props:{homeStyle:String}})}}})(); @@ -1334,7 +1334,7 @@ onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/mi onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-dash.min.js"] = (()=>{return(t,e)=>{const a=t=>{return{url:t.downloadUrl,backupUrls:t.backupUrls,length:t.duration,size:Math.trunc(t.bandWidth*t.duration/8)}};const d=e=>{console.log(e.videoDashes);const d=(()=>{const a=e=>e.videoCodec===t.downloadVideoDashCodec;if(e.videoDashes.some(a)){return e.videoDashes.filter(a).sort(ascendingSort(t=>t.bandWidth))[0]}else{return e.videoDashes.sort(ascendingSort(t=>t.bandWidth))[0]}})();const o=e.audioDashes.sort(descendingSort(t=>t.bandWidth))[0];return[a(d),a(o)]};const o=async(t,e)=>{const a=await Ajax.getJsonWithCredentials(t);const d=a.data||a.result||a;if(a.code!==0||!d.dash){throw new Error("DASH api failed")}const o=d.accept_quality;if(!o.includes(e)){throw new Error("没有找到请求的清晰度")}if(d.quality!==e){throw new Error("无法获取请求的清晰度, 请确认当前账号有相应的权限")}const r=d.accept_description;const s=r[o.indexOf(e)];const c=d.dash.duration;const n=d.dash.video.filter(t=>t.id===e).map(t=>{const a=(()=>{switch(t.codecid){case 12:return"HEVC/H.265";default:case 7:return"AVC/H.264"}})();const d={quality:e,qualityText:s,width:t.width,height:t.height,codecs:t.codecs,codecId:t.codecid,bandWidth:t.bandwidth,frameRate:t.frameRate,backupUrls:(t.backupUrl||t.backup_url||[]).forEach(t=>t.replace("http:","https:")),downloadUrl:(t.baseUrl||t.base_url||"").replace("http:","https:"),duration:c,videoCodec:a};return d});const i=d.dash.audio.map(t=>{return{bandWidth:t.bandwidth,codecs:t.codecs,codecId:t.codecid,backupUrls:(t.backupUrl||t.backup_url||[]).forEach(t=>t.replace("http:","https:")),downloadUrl:(t.baseUrl||t.base_url||"").replace("http:","https:"),duration:c}});return{videoDashes:n,audioDashes:i}};return{export:{getDashInfo:o,dashToFragments:d}}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-downloader-fragment.min.js"] = (()=>{return(r,e)=>{}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-info.min.js"] = (()=>{return(t,i)=>{class e{constructor(t){this.aid=t}async fetchInfo(){let t;if(this.cid){t=`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}&cid=${this.cid}`}else{t=`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}`}const i=JSON.parse(await Ajax.getText(t));if(i.code!==0){throw new Error(i.message)}const e=i.data;this.cid=e.cid;this.pageCount=e.videos;this.coverUrl=e.pic;this.tagId=e.tid;this.tagName=e.tname;this.title=e.title;this.description=e.desc;this.up={uid:e.owner.mid,name:e.owner.name,faceUrl:e.owner.face};this.pages=e.pages.map(t=>{return{cid:t.cid,title:t.part,pageNumber:t.page}});this.subtitles=e.subtitle.list.map(t=>{return{id:t.id,languageCode:t.lan,language:t.lan_doc,url:t.subtitle_url.replace("http:","https:")}});return this}async fetchDanmaku(){this.danmaku=new s(this.cid.toString());return this.danmaku.fetchInfo()}}class a{constructor(t,i){this.text=t;this.p=i}}class s{constructor(t){this.cid=t}async fetchInfo(){const t=await Ajax.getText(`https://api.bilibili.com/x/v1/dm/list.so?oid=${this.cid}`);this.rawXML=t;const i=(new DOMParser).parseFromString(t,"application/xml").documentElement;this.xml=i;this.danmakus=[...i.querySelectorAll("d[p]")].map(t=>{return new a(t.innerHTML,t.getAttribute("p"))})}}class n{constructor(t){this.ep=t;this.videos=[]}async fetchInfo(){const t=await Ajax.getText(`https://www.bilibili.com/bangumi/play/ep${this.ep}/`);const i=JSON.parse(t.match(/window\.__INITIAL_STATE__=(.*);\(function\(\){/)[1]);this.title=i.mediaInfo.title;this.cover=i.mediaInfo.cover;this.squareCover=i.mediaInfo.square_cover;this.aid=i.epInfo.aid;this.cid=i.epInfo.cid;this.videos=i.epList.map(async t=>{return{title:t.index_title,aid:t.aid,cid:t.cid,info:await new e(t.aid).fetchInfo()}});return this}}return{export:{VideoInfo:e,BangumiInfo:n,Danmaku:a,DanmakuInfo:s}}}})(); -onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-list.vue.min.js"] = (()=>{return(i,e)=>{const a=`
    加载中...
    空空如也哦 = ̄ω ̄=
    `;e.applyStyleFromText(`.minimal-home .video-list .empty,.minimal-home .video-list .loading{height:48px;display:flex;align-items:center;justify-content:center;font-size:11pt;color:#707070}.minimal-home .video-list .empty .mdi,.minimal-home .video-list .loading .mdi{margin-right:8px}body.dark .minimal-home .video-list .empty,body.dark .minimal-home .video-list .loading{color:#eee}.minimal-home .video-list .cards{display:flex;flex-wrap:wrap;align-items:flex-end}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1),.minimal-home .video-list .cards.show-rank .video-card:nth-child(17),.minimal-home .video-list .cards.show-rank .video-card:nth-child(9){margin-top:48px}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1)::before,.minimal-home .video-list .cards.show-rank .video-card:nth-child(17)::before,.minimal-home .video-list .cards.show-rank .video-card:nth-child(9)::before{position:absolute;top:-42px;left:0;font-size:14pt;font-weight:700}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1)::before{content:"今日"}.minimal-home .video-list .cards.show-rank .video-card:nth-child(9)::before{content:"三日"}.minimal-home .video-list .cards.show-rank .video-card:nth-child(17)::before{content:"一周"}`,"video-list-style");return{export:Object.assign({template:a},{components:{VideoCard:()=>e.importAsync("video-card.vue")},props:["showRank"],data(){return{cards:[],loading:true}},methods:{async getRankList(){const{getTrendingVideos:i}=await e.importAsync("trending-videos");const a=async e=>{const a=await i(e);this.cards.push(...a)};await Promise.all([1,3,7].map(a))},async getActivityVideos(){const i=await Ajax.getJsonWithCredentials(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${getUID()}&type_list=8`);if(i.code!==0){throw new Error(i.message)}this.cards=i.data.cards.filter(i=>{return i.desc.orig_dy_id===0}).map(i=>{const e=JSON.parse(i.card);const a=_.get(i,"display.topic_info.topic_details",[]).map(i=>{return{id:i.topic_id,name:i.topic_name}});return{id:i.desc.dynamic_id_str,aid:e.aid,title:e.title,upID:i.desc.user_profile.info.uid,upName:i.desc.user_profile.info.uname,upFaceUrl:i.desc.user_profile.info.face,coverUrl:e.pic,description:e.desc,timestamp:i.timestamp,time:new Date(i.timestamp*1e3),topics:a,dynamic:e.dynamic,like:formatCount(i.desc.like),duration:e.duration,durationText:formatDuration(e.duration,0),playCount:formatCount(e.stat.view),danmakuCount:formatCount(e.stat.danmaku),watchlater:true}})}},async mounted(){try{if(this.showRank){await this.getRankList()}else{await this.getActivityVideos()}}catch(i){Toast.error(i.message,this.showRank?"热门视频":"视频动态",3e3)}finally{this.loading=false}}})}}})(); +onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-list.vue.min.js"] = (()=>{return(i,e)=>{const a=`
    加载中...
    空空如也哦 = ̄ω ̄=
    `;e.applyStyleFromText(`.minimal-home .video-list .empty,.minimal-home .video-list .loading{height:48px;display:flex;align-items:center;justify-content:center;font-size:11pt;color:#707070}.minimal-home .video-list .empty .mdi,.minimal-home .video-list .loading .mdi{margin-right:8px}body.dark .minimal-home .video-list .empty,body.dark .minimal-home .video-list .loading{color:#eee}.minimal-home .video-list .cards{display:flex;flex-wrap:wrap;align-items:flex-end}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1),.minimal-home .video-list .cards.show-rank .video-card:nth-child(17),.minimal-home .video-list .cards.show-rank .video-card:nth-child(9){margin-top:48px}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1)::before,.minimal-home .video-list .cards.show-rank .video-card:nth-child(17)::before,.minimal-home .video-list .cards.show-rank .video-card:nth-child(9)::before{position:absolute;top:-42px;left:0;font-size:14pt;font-weight:700}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1)::before{content:"今日"}.minimal-home .video-list .cards.show-rank .video-card:nth-child(9)::before{content:"三日"}.minimal-home .video-list .cards.show-rank .video-card:nth-child(17)::before{content:"一周"}`,"video-list-style");return{export:Object.assign({template:a},{components:{VideoCard:()=>e.importAsync("video-card.vue")},props:["showRank"],data(){return{cards:[],useVerticalCards:false,loading:true}},methods:{async getRankList(){const{getTrendingVideos:i}=await e.importAsync("trending-videos");const a=async e=>{const a=await i(e);this.cards.push(...a)};await Promise.all([1,3,7].map(a))},async getActivityVideos(){const i=await Ajax.getJsonWithCredentials(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${getUID()}&type_list=8`);if(i.code!==0){throw new Error(i.message)}this.cards=i.data.cards.filter(i=>{return i.desc.orig_dy_id===0}).map(i=>{const e=JSON.parse(i.card);const a=_.get(i,"display.topic_info.topic_details",[]).map(i=>{return{id:i.topic_id,name:i.topic_name}});return{id:i.desc.dynamic_id_str,aid:e.aid,title:e.title,upID:i.desc.user_profile.info.uid,upName:i.desc.user_profile.info.uname,upFaceUrl:i.desc.user_profile.info.face,coverUrl:e.pic,description:e.desc,timestamp:i.timestamp,time:new Date(i.timestamp*1e3),topics:a,dynamic:e.dynamic,like:formatCount(i.desc.like),duration:e.duration,durationText:formatDuration(e.duration,0),playCount:formatCount(e.stat.view),danmakuCount:formatCount(e.stat.danmaku),watchlater:true}})}},async mounted(){try{const i=matchMedia("(max-width: 680px)");this.useVerticalCards=i.matches;i.addListener(i=>{this.useVerticalCards=i.matches});if(this.showRank){await this.getRankList()}else{await this.getActivityVideos()}}catch(i){Toast.error(i.message,this.showRank?"热门视频":"视频动态",3e3)}finally{this.loading=false}}})}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-story.min.js"] = (()=>{return(t,i)=>{class e{constructor(t){this.title=t.option;this.nodeID=t.node_id;this.cid=t.cid;this.default=t.is_default===1}}class s{constructor(t,i,e){this.title=t.title;this.nodeID=t.node_id;this.aid=i;this.cid=t.cid;this.graphVersion=e;this.choices=[];this.choiceTime=-1}async getChoices(){if(this.choices.length>0){return}const t=`https://api.bilibili.com/x/stein/nodeinfo?aid=${this.aid}&node_id=${this.nodeID}&graph_version=504`;const i=await Ajax.getJsonWithCredentials(t);if(i.code!==0){console.error(`获取选项失败: ${i.message}`);return}this.choices=i.data.edges.choices.map(t=>new e(t))}}class o{constructor(t,i){this.nodeList=t;if(i){this.startingNode=i}else{[this.startingNode]=t}}async getAllChoices(){return await Promise.all(this.nodeList.map(t=>t.getChoices()))}}const n=async(t,i)=>{const n=`https://api.bilibili.com/x/stein/nodeinfo?aid=${t}&graph_version=${i}`;const c=await Ajax.getJsonWithCredentials(n);if(c.code!==0){return c.message}const a=c.data.story_list.map(e=>new s(e,t,i));const d=a.find(t=>t.nodeID===c.data.node_id);if(!d){return"获取起始结点失败"}d.choiceTime=c.data.edges.show_time;const r=c.data.edges.choices.map(t=>new e(t));d.choices=r;return new o(a,d)};return{export:{StoryChoice:e,StoryNode:s,Story:o,getStoryNodes:n}}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/view-cover.min.js"] = (()=>{return(e,t)=>{const{VideoInfo:i}=t.import("video-info");const{getFriendlyTitle:n}=t.import("title");class o{constructor(e){this.url=e;if(document.querySelector(".image-viewer")===null){this.createContainer()}this.viewer=document.querySelector(".image-viewer-container");this.downloadImage();addSettingsListener("filenameFormat",()=>{this.viewer.querySelector(".download").setAttribute("download",this.filename)})}createContainer(){document.body.insertAdjacentHTML("beforeend",t.import("imageViewerHtml"));document.querySelector(".image-viewer-container .close").addEventListener("click",()=>this.hide());t.applyStyle("imageViewerStyle")}downloadImage(){document.querySelector("#view-cover").style.display=this.url?"flex":"none";if(this.url===""){return}const e=new XMLHttpRequest;e.open("GET",this.url.replace("http:","https:"),true);e.responseType="blob";e.onload=(()=>{const t=URL.createObjectURL(e.response);if(this.imageData){URL.revokeObjectURL(this.imageData)}this.imageData=t;const i=this.viewer.querySelector(".download");i.setAttribute("href",t);i.setAttribute("download",this.filename);this.viewer.querySelector(".copy-link").addEventListener("click",()=>GM.setClipboard(this.url));this.viewer.querySelector(".new-tab").setAttribute("href",this.url);this.viewer.querySelector(".image").src=t});e.send()}show(){this.viewer.classList.add("opened")}hide(){this.viewer.classList.remove("opened")}get filename(){return n(document.URL.includes("/www.bilibili.com/bangumi/"))+this.url.substring(this.url.lastIndexOf("."))}}return(()=>{if(!document.URL.includes("live.bilibili.com")){return{widget:{content:`\n\n\n查看封面\n`,condition:async()=>{const e=await SpinQuery.select(()=>(unsafeWindow||window).aid);return Boolean(e)},success:async()=>{async function e(){const e=(unsafeWindow||window).aid;const t=new i(e);try{await t.fetchInfo()}catch(e){return""}return t.coverUrl}let t=new o(await e());document.querySelector("#view-cover").addEventListener("click",()=>{t.show()});const n=async()=>{t=new o(await e())};Observer.videoChange(n)}}}}else{return{widget:{content:`\n\n\n查看封面\n`,condition:async()=>{const e=await SpinQuery.select(()=>document.querySelector(".header-info-ctnr .room-cover"));return Boolean(e)},success:async()=>{const e=document.querySelector(".header-info-ctnr .room-cover");const t=e.getAttribute("href").match(/space\.bilibili\.com\/([\d]+)/);if(t&&t[1]){const e=t[1];const i=`https://api.live.bilibili.com/room/v1/Room/getRoomInfoOld?mid=${e}`;const n=await Ajax.getJson(i);const r=n.data.cover;const s=new o(r);document.querySelector("#view-cover").addEventListener("click",()=>{s.show()})}}}}}})()}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/watchlater.min.js"] = (()=>{return(e,t)=>{const i=e=>{const t=e.match(/(av[\d]+)\/p([\d]+)/);if(t){return`https://www.bilibili.com/video/${t[1]}/?p=${t[2]}`}else{return"javascript:;"}};const r=e=>{const t=e.map(e=>{const t=e.getAttribute("href");if(!t){return"javascript:;"}if(t.match(/.*watchlater.*|javascript:;/g)){return i(t)}if(t.indexOf("video/av")!==-1){return t}});e.forEach((e,i)=>{e.setAttribute("href",t[i]);e.setAttribute("target","_blank")})};const a=(...e)=>{for(const t of e){SpinQuery.select(()=>document.querySelectorAll(t),e=>r([...e]))}};SpinQuery.select(".watch-later-list").then(()=>{Observer.childListSubtree("#viewlater-app",()=>{SpinQuery.condition(()=>document.URL.match(/(av[\d]+)\/p([\d]+)/),e=>e&&document.URL.indexOf("watchlater")!==-1,()=>{const e=i(document.URL);if(e!==null){window.location.assign(e)}});SpinQuery.select("#viewlater-app .s-btn[href='#/']",e=>e.remove());a(".av-pic",".av-about>a")})});SpinQuery.select("li.nav-item[report-id*=watchlater]").then(()=>{Observer.childListSubtree("li.nav-item[report-id*=watchlater]",()=>{a(".av-item>a",".av-about>a","div.watch-later-m>ul>div>li>a");SpinQuery.select(".read-more.mr",e=>e.remove());SpinQuery.select(".read-more-grp>.read-more",e=>{e.style.width="auto";e.style.float="none"})})});SpinQuery.select(".van-popper-favorite").then(async e=>{if(!e){return}const t=Observer.childListSubtree(e,()=>{const i=e.querySelector(".play-all");if(i){const e="//www.bilibili.com/watchlater/#/list";Observer.attributes(i,()=>{if(i.getAttribute("href")==="//www.bilibili.com/watchlater/"){i.setAttribute("href",e);i.firstChild.classList.remove("bili-icon_dingdao_bofang");i.firstChild.classList.add("bili-icon_xinxi_yuedushu");i.lastChild.nodeValue="查看全部"}else if(i.getAttribute("href")!==e){i.firstChild.classList.add("bili-icon_dingdao_bofang");i.firstChild.classList.remove("bili-icon_xinxi_yuedushu");i.lastChild.nodeValue="播放全部"}});t.forEach(e=>e.stop())}})})}})(); diff --git a/min/bundle.json b/min/bundle.json index 8fdd5a86e..6f44cca7b 100644 --- a/min/bundle.json +++ b/min/bundle.json @@ -130,7 +130,7 @@ "medal-helper.min.css": "6AF13675048FEBFB7E56ABE7462346BB53D22DE21DC31A34211872FCF6FA2A3B", "medal-helper.min.html": "5D7057259368BE97DED3375DD904695B245AA2BF338C5E18CB3CF61DD913617C", "medal-helper.min.js": "A55F702FF0D00578A6402784BE68D27BF44E789356FAA709B672B1D0BAA36A95", - "minimal-home.vue.min.js": "D57B319D596F36FF077B7E4D831E2D627C93B8BBED3639DD4199C661B82E9D9A", + "minimal-home.vue.min.js": "59D2CDA4F67F919252722ED02657EDA712ADAD04363BB71C5E5381DB7FA61B2B", "mini-player-touch-move.min.css": "028540E4F40EFD23403CB3D8A654372D7CE65FFC1F95B9793C207179C7C3A9A2", "mini-player-touch-move.min.js": "AAD61A7324B2852B3AA3400BA0E896D16A7DD3BF376FBCB6AF11B0DA55F7B831", "narrow-danmaku.min.js": "12475431A527EFF15100AF57C9C53D0603BC27723126D966CB01240917602253", @@ -172,8 +172,8 @@ "simple-home.vue.min.js": "BB936D1E635E21B72A81F448F86AE2E6773ADABC204BFE4BF78A02BB604E16C0", "simple-home-bangumi-category.vue.min.js": "3CE2077EAA17E33FC3B0003E528658D34F0BBC34259FF5E47E8D2025A11D47AB", "simple-home-categories.vue.min.js": "DFF18335FC187158B907F996417CEE9D582182D00B4D5D312E10DEACFA31E0BA", - "simple-home-feeds.vue.min.js": "BFBE14AEE13D9ACC38BEB0F673ACA8FD2F99944B1189AE77F3BBBB253B248A3A", - "simple-home-normal-category.vue.min.js": "F3C1541942DC2C56D495662166FDAE7491F71666625E40E6A7A3465BF7922441", + "simple-home-feeds.vue.min.js": "8C783136555118CC4966B752ACE6D1AFAB5B526499BB8ED5800027E102289B74", + "simple-home-normal-category.vue.min.js": "71D58A93F0AFCEB58F01DAEA221F5FC9E33925006C53506328B5EBC486C75BD0", "simplify-home.min.css": "50F0FA046D61ECE5183409CF97C8DBECB4CF64918DF813CD2B39BF9FBD314B42", "simplify-home.min.js": "F6D7F8E0D45847C3E056711AECE3832785603E7EF85A4B995C028F5CBE539C94", "simplify-home.vue.min.js": "62F246FD5C9172676A077DD1DFB1F5ACE0E018952D13E1AAD89B3EA2FD00F961", @@ -207,7 +207,7 @@ "video-dash.min.js": "E0345C36E793F8C05E5FC83DDAB88751CD6BA28FB0A1AA63BC20FBCE330F037B", "video-downloader-fragment.min.js": "13B755C0EE0CA018AE65251E168BAF3395FEA2EB4FAD6949AADD752F61B8819B", "video-info.min.js": "B837809D3D2C10CD34969143DC05EDD6F24C38181CF24FD705C80B9DD6E86B94", - "video-list.vue.min.js": "9F91DBF44D68C96E02B926A43617651BAE32A7095AA21F2B1073C343044877A5", + "video-list.vue.min.js": "9B0FB6AC3D3CD8D0250CBBC787D5BE823C46216CD71B9E8DCAC75AFE1BE5A9EA", "video-story.min.js": "F9D4D2D80997DF5F11BF0CFA4D389B77BDBF1566EA6002E47174B68B440F3C0D", "view-cover.min.js": "E4960587BFC4A219278EC300AFC8983AE4064D6FDBB42093E4EB7590726E229E", "watchlater.min.js": "8C3C74E64A6D1B0FD5A40166FCB19981F86AF0A0E1003586DC591863C2022B18", diff --git a/min/bundle.zip b/min/bundle.zip index e47eb48ef24ad9b7606ec402bc3d8955567979a3..b504d03f4fe5b6079a3ef1c15be10d9da34c409e 100644 GIT binary patch delta 1815 zcmah}drVVT7;kT>0=7Wqw)Y;;Qp%$b+CmEf<&A<59Qa}|QDGN)wO4A(+N-Ej6us&; zw`|PEH(h+pWHWKumL;3jZE=`vK9@O`nYc{NoO9EOi$u^(iR`0@8~(GC+THG$6;{(1C^@&i+p2?@?^snRXD+=r3Q7qRMdeO{%k{J= z%~fExH**2Ey-je7o_v=xt98|g%EJpwJz~Bq2Trhzk;=&nyM#Wgr)w$5DP-cnu$Yd* zY^5dR*f?9Q;O70$2thI5Y$+<{Lh}~WM)`QINc0Fn2iGhLEBP9(ses$MrGdsz8`{#K zYdjtEN`2)VOUKdrJe5qArwZLoX9kpV7u>Ni=fb5z1I5HcyMsxB`*tQ7jz%$B*x+C$ zhH$G^s&}G4^&nwk9THF%(quCyBGqmo*y`n0=llFVz5sj*CKc3H61!Dd$b^)IY~!2i zG^8!>YWJCInDtudg>Tsj^2z>y!23i_6#Tv-_esQX_x#ZoHxjaHeX=tBGxzieL>M66fNh(W=|FG7C5ufyqsJ0 zn0Q0(BxK%Vv=oHtdOB2*;0QbN!2-d-x!prF^FBUc7K(~r{2z~XmI7f(=*o}mg7T+t zONE|1tN5Ui22CTK1YhWhRdML~@NNRAGf50gYocjd_GI-p(J~(w2>9Dzk(wkzZ4%Ls z)$*w1+u*fmk^nnVqn_+Rjo;qH`LIOzc#x%Gnun&xJ&7ahhr3CnTyd*~hS@E&9@GY+ z0=I$asZuXU22wHhgh8D9enjbsY7;yKuFBqdZ!J^XAW zrHZ!~X<=}oRtp0zEU-KUll*;93yTkG6JUJ`(v^ECykp>W8q(EeBoT1$ur}^Lsor@X zdQ-?0c^~AYl5(p3Ls*ka@~Mx$h9jw@SbiD$QK&cmu9XFw1Aec!iF-_0O&ZZh|8WEL zJQry8K(7m%*^WxZ<(pb4yQ$T|*);6)jUKp{MrKkqe?nP0_7LcU&FPqF(g2)GNBu=B za3&HD)mEJf-ip9J%1lV~(X~VBN=jTm40oA`lj1v`Y$71qOl;KW2ZlAX%p{kp{s}gj z$qYrtbsfC^tB!$IJ%;NwV>nQP#zN*R9>z1!7|$5Pj3tjAZkcSt$N_}q4if`^r85)5 zwuVuIjKiEh%2t^JgBCK6I#2=gt)z^)G7WZF@q~J2Fwi@lA;YCSvSKNZW`RC~R8XrM zh9nE?GKfun814-H*HI)Ex--zKcp3C&kg1BDEez~g#v~3Oaf1z^flg?*k-W&SzF}lR zakUpXE78LD2q|XtFi>@iNdUE-SmmA2VaGABYcOb&9bsEP1I|7Swhv*7dIV?fq?FpF z1eJr7MC?+rGPpxy8A}~RAGwHTWul)8!dwc&pG;zD?0RJVUiGdqW#Ogo+zl!xQu$yn%tonL`yLA&@3OjKCO&myKP_D>w0_AlaNCIij&%WXks`&h zQ!E@m$tJ@Z7qLcZPP4L=LvKG^brRMv>Se__(2jHzmVxtd-Gw<{x&-EIQcNAc3Z86i cs`@q@8j^AS@LM+GefPnVL$b&84Y26<4_rz&O8@`> delta 1422 zcmY*Z4Qx|Y6n^iv9o^P;gTB}I&e+!dc3oMwc0VXE=!RuTgJTPjg~6DWHLN&fu%a#s z41DqvBCsv&lZb{TVuFrE(4*i23eAi(huaE+DZaGo-fX*M5(Fu_V^B>M@sz`~8O~bC zgk7gp3+$&=L$u?Ry2OCRPE%5J^o%-JAN~5Gy3}tO-x3sL&|-FHIR-N*4F@vF&2BZu zlzCz~D3fNhWld%XpYbRycAf zMOVLY%%q?`hg|Gf9k%9>j~!it?{cVuU0sU!T&fT&5Xhw}w&4SG<&s}_<3kx=ek3dS zCzo8h8GSM)9+p)YM^zIl9hA<#J&d4(rn9@>;9UpJ5_52g3wB}%sd>CWFY5Egto!nK z`DaIPIgjS)-nl7b?JbU4;pC{F-IlTYj!YOf#L9MZ)J^ws)XCds#{(w?^rNrY1c(K$vC)RkO*TS*J_qXS7}IQs8|8BwMcu_J{8Bc*`Xy4{cI1ysq7&%uTQK8auEVxWNh zY$$;FZk}M8oAW5x5L5iDs~KHfiVk$f_WpKL0o$+&X@yi}ytYRX+FHV`2L=SVGsnFQ{B@8Yr^^58e^Rk~kmK8PIcKkw ykRCmk)MW1W|JQo~NoD*doc$dO$~gYY5$uY|{M-1kj2~~li{z{return(i,e)=>{const a=`
    {{tab.displayName}}
    `;e.applyStyleFromText(`.minimal-home{--card-width:600px;--card-height:120px;--card-margin:16px;--card-column-count:2;transform:translateX(calc(var(--card-margin)/ 2))}.minimal-home,.minimal-home *{box-sizing:border-box;transition:color .2s ease-out,opacity .2s ease-out,transform .2s ease-out,background-color .2s ease-out}.minimal-home .logo{font-size:40px;color:var(--theme-color)}.minimal-home .minimal-home-header{display:flex;align-items:center;justify-content:space-between}.minimal-home .minimal-home-header .home-tabs{display:flex;flex-grow:1;justify-content:center;margin-right:var(--card-margin)}.minimal-home .minimal-home-header .home-tabs .tab{color:#000;opacity:.75;position:relative;cursor:pointer}.minimal-home .minimal-home-header .home-tabs .tab:not(:first-child){margin-left:32px}body.dark .minimal-home .minimal-home-header .home-tabs .tab{color:#eee}.minimal-home .minimal-home-header .home-tabs .tab.active{transform:scale(1.2);opacity:1;font-weight:700}.minimal-home .minimal-home-header .home-tabs .tab::after{content:"";position:absolute;bottom:-8px;left:50%;transform:translateX(-50%) scaleX(0);height:3px;width:24px;background-color:var(--theme-color);border-radius:2px;transition:.2s ease-out}.minimal-home .minimal-home-header .home-tabs .tab.active::after{transform:translateX(-50%) scaleX(1)}.minimal-home .minimal-home-content{margin-top:32px;min-height:100vh;width:calc(var(--card-column-count) * (var(--card-width) + var(--card-margin)))}.minimal-home .minimal-home-content .minimal-home-content-transition-enter-active,.minimal-home .minimal-home-content .minimal-home-content-transition-leave-active{transition:.3s ease-out}.minimal-home .minimal-home-content .minimal-home-content-transition-enter,.minimal-home .minimal-home-content .minimal-home-content-transition-leave-to{opacity:0;transform:scale(.95)}.minimal-home .minimal-home-footer{padding:24px 0;display:flex;justify-content:space-around;align-items:center;margin-right:var(--card-margin)}.minimal-home .minimal-home-footer .footer-button{display:flex;align-items:center;padding:8px 12px 8px 8px;background-color:#8882;color:#000;border-radius:24px;font-size:11pt;cursor:pointer}.minimal-home .minimal-home-footer .footer-button .be-icon{margin-right:8px}body.dark .minimal-home .minimal-home-footer .footer-button{color:#eee}.minimal-home .minimal-home-footer .footer-button:hover{background-color:#8884}@media screen and (max-width:1300px){.minimal-home{--card-column-count:1}}@media screen and (min-width:2000px){.minimal-home{--card-column-count:3}.minimal-home .cards.show-rank .video-card:nth-child(16),.minimal-home .cards.show-rank .video-card:nth-child(24),.minimal-home .cards.show-rank .video-card:nth-child(8){margin-right:calc(var(--card-margin) * 2 + var(--card-width))}}`,"minimal-home-style");const o=[{name:"video",displayName:"视频动态",active:true,more:"https://t.bilibili.com/?tab=8",showRank:false},{name:"ranking",displayName:"热门视频",active:false,more:"https://www.bilibili.com/ranking",showRank:true}];return{export:Object.assign({template:a},{components:{Icon:()=>e.importAsync("icon.vue"),VideoList:()=>e.importAsync("video-list.vue")},data(){return{tabs:o,content:"VideoList",logoImage:null}},computed:{activeTab(){return this.tabs.find(i=>i.active)},rankDays(){return this.activeTab.rankDays||0}},async mounted(){},methods:{changeTab(i){if(i.active){window.open(i.more,"_blank");return}const e=this.activeTab;e.active=false;i.active=true},goToTop(){scrollTo(0,0)},viewMore(){open(this.activeTab.more,"_blank")}}})}}})(); \ No newline at end of file +(()=>{return(i,a)=>{const e=`
    {{tab.displayName}}
    `;a.applyStyleFromText(`.minimal-home{--card-width:600px;--card-height:120px;--card-margin:16px;--card-column-count:2;transform:translateX(calc(var(--card-margin)/ 2))}.minimal-home,.minimal-home *{box-sizing:border-box;transition:color .2s ease-out,opacity .2s ease-out,transform .2s ease-out,background-color .2s ease-out}.minimal-home .logo{font-size:40px;color:var(--theme-color)}.minimal-home .minimal-home-header{display:flex;align-items:center;justify-content:space-between}.minimal-home .minimal-home-header .home-tabs{display:flex;flex-grow:1;justify-content:center;margin-right:var(--card-margin)}.minimal-home .minimal-home-header .home-tabs .tab{color:#000;opacity:.75;position:relative;cursor:pointer}.minimal-home .minimal-home-header .home-tabs .tab:not(:first-child){margin-left:32px}body.dark .minimal-home .minimal-home-header .home-tabs .tab{color:#eee}.minimal-home .minimal-home-header .home-tabs .tab.active{transform:scale(1.2);opacity:1;font-weight:700}.minimal-home .minimal-home-header .home-tabs .tab::after{content:"";position:absolute;bottom:-8px;left:50%;transform:translateX(-50%) scaleX(0);height:3px;width:24px;background-color:var(--theme-color);border-radius:2px;transition:.2s ease-out}.minimal-home .minimal-home-header .home-tabs .tab.active::after{transform:translateX(-50%) scaleX(1)}.minimal-home .minimal-home-content{margin-top:32px;min-height:100vh;width:calc(var(--card-column-count) * (var(--card-width) + var(--card-margin)))}.minimal-home .minimal-home-content .minimal-home-content-transition-enter-active,.minimal-home .minimal-home-content .minimal-home-content-transition-leave-active{transition:.3s ease-out}.minimal-home .minimal-home-content .minimal-home-content-transition-enter,.minimal-home .minimal-home-content .minimal-home-content-transition-leave-to{opacity:0;transform:scale(.95)}.minimal-home .minimal-home-footer{padding:24px 0;display:flex;justify-content:space-around;align-items:center;margin-right:var(--card-margin)}.minimal-home .minimal-home-footer .footer-button{display:flex;align-items:center;padding:8px 12px 8px 8px;background-color:#8882;color:#000;border-radius:24px;font-size:11pt;cursor:pointer}.minimal-home .minimal-home-footer .footer-button .be-icon{margin-right:8px}body.dark .minimal-home .minimal-home-footer .footer-button{color:#eee}.minimal-home .minimal-home-footer .footer-button:hover{background-color:#8884}@media screen and (max-width:1300px){.minimal-home{--card-column-count:1}}@media screen and (max-width:680px){.minimal-home{--card-column-count:2;--card-width:210px;--card-height:240px}}@media screen and (max-width:470px){.minimal-home{--card-column-count:1}}@media screen and (min-width:2000px){.minimal-home{--card-column-count:3}.minimal-home .cards.show-rank .video-card:nth-child(16),.minimal-home .cards.show-rank .video-card:nth-child(24),.minimal-home .cards.show-rank .video-card:nth-child(8){margin-right:calc(var(--card-margin) * 2 + var(--card-width))}}`,"minimal-home-style");const o=[{name:"video",displayName:"视频动态",active:true,more:"https://t.bilibili.com/?tab=8",showRank:false},{name:"ranking",displayName:"热门视频",active:false,more:"https://www.bilibili.com/ranking",showRank:true}];return{export:Object.assign({template:e},{components:{Icon:()=>a.importAsync("icon.vue"),VideoList:()=>a.importAsync("video-list.vue")},data(){return{tabs:o,content:"VideoList",logoImage:null}},computed:{activeTab(){return this.tabs.find(i=>i.active)},rankDays(){return this.activeTab.rankDays||0}},async mounted(){},methods:{changeTab(i){if(i.active){window.open(i.more,"_blank");return}const a=this.activeTab;a.active=false;i.active=true},goToTop(){scrollTo(0,0)},viewMore(){open(this.activeTab.more,"_blank")}}})}}})(); \ No newline at end of file diff --git a/min/simple-home-feeds.vue.min.js b/min/simple-home-feeds.vue.min.js index fae3bcf4b..636df6bb6 100644 --- a/min/simple-home-feeds.vue.min.js +++ b/min/simple-home-feeds.vue.min.js @@ -1 +1 @@ -(()=>{return(e,t)=>{const a=`
    没有动态哦(´・_・\`)
    `;t.applyStyleFromText(`.simple-home .feeds{justify-self:start;display:grid;grid-template-areas:"header header" "contents contents";grid-template-columns:repeat(2,auto);grid-template-rows:repeat(2,auto);row-gap:16px;column-gap:16px}.simple-home .feeds .header,.simple-home .feeds .sub-header{padding:0 8px}.simple-home .feeds .header .tab:nth-child(2),.simple-home .feeds .sub-header .tab:nth-child(2){margin-left:32px}.simple-home .feeds .header .online,.simple-home .feeds .sub-header .online{padding:8px 16px;height:32px;border-radius:16px;background-color:#8882;color:inherit;font-size:12px;display:flex;align-items:center;box-sizing:border-box}.simple-home .feeds .contents{grid-area:contents;display:flex;overflow:auto;--card-width:200px;--card-height:250px;--card-count:3;width:calc((var(--card-width) + 16px) * var(--card-count));padding-bottom:16px;scroll-snap-type:x mandatory;scrollbar-width:none!important;min-height:calc(var(--card-height) + 16px)}@media screen and (min-width:1100px){.simple-home .feeds .contents{--card-count:3}}@media screen and (min-width:1300px){.simple-home .feeds .contents{--card-count:4}}@media screen and (min-width:1550px){.simple-home .feeds .contents{--card-count:5}}.simple-home .feeds .contents::-webkit-scrollbar{width:0!important;height:0!important}.simple-home .feeds .contents .card-wrapper{padding:0 8px;scroll-snap-align:start;flex-shrink:0}.simple-home .feeds .contents .empty{display:flex;align-items:center;justify-content:center;width:100%;font-size:16px}`,"simple-home-feeds-style");const i=[{name:"视频",type:"video",url:"https://t.bilibili.com/?tab=8"},{name:"番剧",type:"bangumi",url:"https://t.bilibili.com/?tab=512"}];return{export:Object.assign({template:a},{components:{VideoCard:()=>t.importAsync("video-card.vue"),Icon:()=>t.importAsync("icon.vue")},data(){return{online:"--",tabs:i,currentTab:i[0],feedCards:[]}},watch:{currentTab(e){this.updateFeedCards(e)}},methods:{async updateFeedCards(e){const{getVideoFeeds:a}=await t.importAsync("feeds-apis");this.feedCards=await a(e.type)},changeTab(e){if(this.currentTab===e){open(e.url,"_blank")}else{this.currentTab=e}}},async mounted(){this.updateFeedCards(this.currentTab);const e=await Ajax.getJson("https://api.bilibili.com/x/web-interface/online");if(e.code===0){this.online=e.data.web_online}}})}}})(); \ No newline at end of file +(()=>{return(e,t)=>{const a=`
    没有动态哦(´・_・\`)
    `;t.applyStyleFromText(`.simple-home .feeds{justify-self:start;display:grid;grid-template-areas:"header header" "contents contents";grid-template-columns:repeat(2,auto);grid-template-rows:repeat(2,auto);row-gap:16px;column-gap:16px}.simple-home .feeds .header,.simple-home .feeds .sub-header{padding:0 8px}.simple-home .feeds .header .tab:nth-child(2),.simple-home .feeds .sub-header .tab:nth-child(2){margin-left:32px}.simple-home .feeds .header .online,.simple-home .feeds .sub-header .online{padding:8px 16px;height:32px;border-radius:16px;background-color:#8882;color:inherit;font-size:12px;display:flex;align-items:center;box-sizing:border-box}.simple-home .feeds .contents{grid-area:contents;display:flex;overflow:auto;--card-width:200px;--card-height:250px;--card-count:2;width:calc((var(--card-width) + 16px) * var(--card-count));padding-bottom:16px;scroll-snap-type:x mandatory;scrollbar-width:none!important;min-height:calc(var(--card-height) + 16px)}@media screen and (max-width:900px){.simple-home .feeds .contents{--card-count:3}}@media screen and (min-width:1100px){.simple-home .feeds .contents{--card-count:3}}@media screen and (min-width:1300px){.simple-home .feeds .contents{--card-count:4}}@media screen and (min-width:1550px){.simple-home .feeds .contents{--card-count:5}}.simple-home .feeds .contents::-webkit-scrollbar{width:0!important;height:0!important}.simple-home .feeds .contents .card-wrapper{padding:0 8px;scroll-snap-align:start;flex-shrink:0}.simple-home .feeds .contents .empty{display:flex;align-items:center;justify-content:center;width:100%;font-size:16px}`,"simple-home-feeds-style");const i=[{name:"视频",type:"video",url:"https://t.bilibili.com/?tab=8"},{name:"番剧",type:"bangumi",url:"https://t.bilibili.com/?tab=512"}];return{export:Object.assign({template:a},{components:{VideoCard:()=>t.importAsync("video-card.vue"),Icon:()=>t.importAsync("icon.vue")},data(){return{online:"--",tabs:i,currentTab:i[0],feedCards:[]}},watch:{currentTab(e){this.updateFeedCards(e)}},methods:{async updateFeedCards(e){const{getVideoFeeds:a}=await t.importAsync("feeds-apis");this.feedCards=await a(e.type)},changeTab(e){if(this.currentTab===e){open(e.url,"_blank")}else{this.currentTab=e}}},async mounted(){this.updateFeedCards(this.currentTab);const e=await Ajax.getJson("https://api.bilibili.com/x/web-interface/online");if(e.code===0){this.online=e.data.web_online}}})}}})(); \ No newline at end of file diff --git a/min/simple-home-normal-category.vue.min.js b/min/simple-home-normal-category.vue.min.js index 91cd9660a..68e2ef47e 100644 --- a/min/simple-home-normal-category.vue.min.js +++ b/min/simple-home-normal-category.vue.min.js @@ -1 +1 @@ -(()=>{return(t,i)=>{const e=`
    `;i.applyStyleFromText(`.category-view{display:grid;grid-template:"new-activity rank" 1fr "new-post rank" 1fr/1fr calc(1.5 * var(--rank-width) + 10px);grid-row-gap:24px;row-gap:24px;grid-column-gap:32px;column-gap:32px;position:relative}.category-view,.category-view *,.category-view ::after,.category-view ::before{transition:.2s ease-out}.category-view .loading{opacity:0;pointer-events:none;border-radius:16px;position:absolute}.category-view .new-activity{align-self:start;grid-area:new-activity}.category-view .new-post{align-self:end;grid-area:new-post}.category-view.new-activity-loading .new-activity.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.new-activity-loading .new-activity:not(.loading){opacity:0;pointer-events:none}.category-view.new-post-loading .new-post.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.new-post-loading .new-post:not(.loading){opacity:0;pointer-events:none}.category-view .rank{grid-area:rank}.category-view.rank-loading .rank.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.rank-loading .rank:not(.loading){opacity:0;pointer-events:none}@media screen and (max-width:1300px){.category-view{grid-template:"new-activity" 1fr "new-post" 1fr "rank" auto/1fr}.category-view .rank{justify-self:center}}`,"simple-home-normal-category-style");return{export:Object.assign({template:e},{components:{SlideshowCards:()=>i.importAsync("slideshow-cards.vue"),RankList:()=>i.importAsync("rank-list.vue")},store:store,props:{rid:{type:Number,required:true}},data(){return{newActivity:{error:false,loading:true,videos:[]},newPost:{error:false,loading:true,videos:[]},rank:{error:false,loading:true,videos:[]},loaded:false}},computed:{...Vuex.mapState(["watchlaterList"])},methods:{async loadCards(t,i,e){if(e===undefined){e=(t=>{const i=getUID();const e=_.get(t,"data.archives",[]);return e.map(t=>{return{id:t.aid,aid:t.aid,coverUrl:t.pic.replace("http:","https:"),title:t.title,upName:t.owner.name,upFaceUrl:t.owner.face.replace("http:","https:"),upID:t.owner.mid,playCount:t.stat.view,danmakuCount:t.stat.danmaku,like:t.stat.like,coins:t.stat.coin,description:t.desc,type:t.tname,watchlater:i?this.watchlaterList.includes(t.aid):null}})})}try{this[t].loading=true;const a=await Ajax.getJson(i);if(a.code!==0){this[t].error=true}this[t].videos=e(a)}catch(i){logError(i);this[t].error=true}finally{this[t].loading=false}},async loadNewActivity(){await this.loadCards("newActivity",`https://api.bilibili.com/x/web-interface/dynamic/region?ps=10&rid=${this.rid}`)},async loadNewPost(){await this.loadCards("newPost",`https://api.bilibili.com/x/web-interface/newlist?ps=10&rid=${this.rid}`)},async loadRank(){await this.loadCards("rank",`https://api.bilibili.com/x/web-interface/ranking/region?rid=${this.rid}&day=3&original=0`,t=>{const i=getUID();const e=t.data;return e.map(t=>{return{id:t.aid,aid:parseInt(t.aid),title:t.title,playCount:t.play,favorites:t.favorites,upID:t.mid,upName:t.author,description:t.description,coverUrl:t.pic.replace("http:","https:"),coins:t.coins,durationText:t.duration,points:t.pts,watchlater:i?this.watchlaterList.includes(parseInt(t.aid)):null}})})},...Vuex.mapActions(["toggleWatchlater"]),updateVideos(){this.loadNewActivity();this.loadNewPost();this.loadRank()}},watch:{rid(t){if(t>0){if(this.loaded){this.updateVideos()}}else{console.warn(`rid=${t}`)}}},mounted(){const t=new IntersectionObserver(()=>{this.updateVideos();this.loaded=true;t.disconnect()});t.observe(this.$el)}})}}})(); \ No newline at end of file +(()=>{return(t,i)=>{const e=`
    `;i.applyStyleFromText(`.category-view{display:grid;grid-template:"new-activity rank" 1fr "new-post rank" 1fr/1fr calc(1.5 * var(--rank-width) + 10px);grid-row-gap:24px;row-gap:24px;grid-column-gap:32px;column-gap:32px;position:relative}.category-view,.category-view *,.category-view ::after,.category-view ::before{transition:.2s ease-out}.category-view .loading{opacity:0;pointer-events:none;border-radius:16px;position:absolute}.category-view .new-activity{align-self:start;grid-area:new-activity}.category-view .new-post{align-self:end;grid-area:new-post}.category-view.new-activity-loading .new-activity.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.new-activity-loading .new-activity:not(.loading){opacity:0;pointer-events:none}.category-view.new-post-loading .new-post.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.new-post-loading .new-post:not(.loading){opacity:0;pointer-events:none}.category-view .rank{grid-area:rank}.category-view.rank-loading .rank.loading{position:static;animation:.64s ease-in-out infinite alternate category-loading;opacity:1;pointer-events:initial;width:100%;height:100%}.category-view.rank-loading .rank:not(.loading){opacity:0;pointer-events:none}@media screen and (max-width:1300px){.category-view{grid-template:"new-activity" 1fr "new-post" 1fr "rank" auto/1fr}.category-view .rank{display:none;justify-self:center}}`,"simple-home-normal-category-style");return{export:Object.assign({template:e},{components:{SlideshowCards:()=>i.importAsync("slideshow-cards.vue"),RankList:()=>i.importAsync("rank-list.vue")},store:store,props:{rid:{type:Number,required:true}},data(){return{newActivity:{error:false,loading:true,videos:[]},newPost:{error:false,loading:true,videos:[]},rank:{error:false,loading:true,videos:[]},loaded:false}},computed:{...Vuex.mapState(["watchlaterList"])},methods:{async loadCards(t,i,e){if(e===undefined){e=(t=>{const i=getUID();const e=_.get(t,"data.archives",[]);return e.map(t=>{return{id:t.aid,aid:t.aid,coverUrl:t.pic.replace("http:","https:"),title:t.title,upName:t.owner.name,upFaceUrl:t.owner.face.replace("http:","https:"),upID:t.owner.mid,playCount:t.stat.view,danmakuCount:t.stat.danmaku,like:t.stat.like,coins:t.stat.coin,description:t.desc,type:t.tname,watchlater:i?this.watchlaterList.includes(t.aid):null}})})}try{this[t].loading=true;const a=await Ajax.getJson(i);if(a.code!==0){this[t].error=true}this[t].videos=e(a)}catch(i){logError(i);this[t].error=true}finally{this[t].loading=false}},async loadNewActivity(){await this.loadCards("newActivity",`https://api.bilibili.com/x/web-interface/dynamic/region?ps=10&rid=${this.rid}`)},async loadNewPost(){await this.loadCards("newPost",`https://api.bilibili.com/x/web-interface/newlist?ps=10&rid=${this.rid}`)},async loadRank(){await this.loadCards("rank",`https://api.bilibili.com/x/web-interface/ranking/region?rid=${this.rid}&day=3&original=0`,t=>{const i=getUID();const e=t.data;return e.map(t=>{return{id:t.aid,aid:parseInt(t.aid),title:t.title,playCount:t.play,favorites:t.favorites,upID:t.mid,upName:t.author,description:t.description,coverUrl:t.pic.replace("http:","https:"),coins:t.coins,durationText:t.duration,points:t.pts,watchlater:i?this.watchlaterList.includes(parseInt(t.aid)):null}})})},...Vuex.mapActions(["toggleWatchlater"]),updateVideos(){this.loadNewActivity();this.loadNewPost();this.loadRank()}},watch:{rid(t){if(t>0){if(this.loaded){this.updateVideos()}}else{console.warn(`rid=${t}`)}}},mounted(){const t=new IntersectionObserver(()=>{this.updateVideos();this.loaded=true;t.disconnect()});t.observe(this.$el)}})}}})(); \ No newline at end of file diff --git a/min/video-list.vue.min.js b/min/video-list.vue.min.js index 5b4c993b2..71dccfbb1 100644 --- a/min/video-list.vue.min.js +++ b/min/video-list.vue.min.js @@ -1 +1 @@ -(()=>{return(i,e)=>{const a=`
    加载中...
    空空如也哦 = ̄ω ̄=
    `;e.applyStyleFromText(`.minimal-home .video-list .empty,.minimal-home .video-list .loading{height:48px;display:flex;align-items:center;justify-content:center;font-size:11pt;color:#707070}.minimal-home .video-list .empty .mdi,.minimal-home .video-list .loading .mdi{margin-right:8px}body.dark .minimal-home .video-list .empty,body.dark .minimal-home .video-list .loading{color:#eee}.minimal-home .video-list .cards{display:flex;flex-wrap:wrap;align-items:flex-end}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1),.minimal-home .video-list .cards.show-rank .video-card:nth-child(17),.minimal-home .video-list .cards.show-rank .video-card:nth-child(9){margin-top:48px}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1)::before,.minimal-home .video-list .cards.show-rank .video-card:nth-child(17)::before,.minimal-home .video-list .cards.show-rank .video-card:nth-child(9)::before{position:absolute;top:-42px;left:0;font-size:14pt;font-weight:700}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1)::before{content:"今日"}.minimal-home .video-list .cards.show-rank .video-card:nth-child(9)::before{content:"三日"}.minimal-home .video-list .cards.show-rank .video-card:nth-child(17)::before{content:"一周"}`,"video-list-style");return{export:Object.assign({template:a},{components:{VideoCard:()=>e.importAsync("video-card.vue")},props:["showRank"],data(){return{cards:[],loading:true}},methods:{async getRankList(){const{getTrendingVideos:i}=await e.importAsync("trending-videos");const a=async e=>{const a=await i(e);this.cards.push(...a)};await Promise.all([1,3,7].map(a))},async getActivityVideos(){const i=await Ajax.getJsonWithCredentials(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${getUID()}&type_list=8`);if(i.code!==0){throw new Error(i.message)}this.cards=i.data.cards.filter(i=>{return i.desc.orig_dy_id===0}).map(i=>{const e=JSON.parse(i.card);const a=_.get(i,"display.topic_info.topic_details",[]).map(i=>{return{id:i.topic_id,name:i.topic_name}});return{id:i.desc.dynamic_id_str,aid:e.aid,title:e.title,upID:i.desc.user_profile.info.uid,upName:i.desc.user_profile.info.uname,upFaceUrl:i.desc.user_profile.info.face,coverUrl:e.pic,description:e.desc,timestamp:i.timestamp,time:new Date(i.timestamp*1e3),topics:a,dynamic:e.dynamic,like:formatCount(i.desc.like),duration:e.duration,durationText:formatDuration(e.duration,0),playCount:formatCount(e.stat.view),danmakuCount:formatCount(e.stat.danmaku),watchlater:true}})}},async mounted(){try{if(this.showRank){await this.getRankList()}else{await this.getActivityVideos()}}catch(i){Toast.error(i.message,this.showRank?"热门视频":"视频动态",3e3)}finally{this.loading=false}}})}}})(); \ No newline at end of file +(()=>{return(i,e)=>{const a=`
    加载中...
    空空如也哦 = ̄ω ̄=
    `;e.applyStyleFromText(`.minimal-home .video-list .empty,.minimal-home .video-list .loading{height:48px;display:flex;align-items:center;justify-content:center;font-size:11pt;color:#707070}.minimal-home .video-list .empty .mdi,.minimal-home .video-list .loading .mdi{margin-right:8px}body.dark .minimal-home .video-list .empty,body.dark .minimal-home .video-list .loading{color:#eee}.minimal-home .video-list .cards{display:flex;flex-wrap:wrap;align-items:flex-end}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1),.minimal-home .video-list .cards.show-rank .video-card:nth-child(17),.minimal-home .video-list .cards.show-rank .video-card:nth-child(9){margin-top:48px}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1)::before,.minimal-home .video-list .cards.show-rank .video-card:nth-child(17)::before,.minimal-home .video-list .cards.show-rank .video-card:nth-child(9)::before{position:absolute;top:-42px;left:0;font-size:14pt;font-weight:700}.minimal-home .video-list .cards.show-rank .video-card:nth-child(1)::before{content:"今日"}.minimal-home .video-list .cards.show-rank .video-card:nth-child(9)::before{content:"三日"}.minimal-home .video-list .cards.show-rank .video-card:nth-child(17)::before{content:"一周"}`,"video-list-style");return{export:Object.assign({template:a},{components:{VideoCard:()=>e.importAsync("video-card.vue")},props:["showRank"],data(){return{cards:[],useVerticalCards:false,loading:true}},methods:{async getRankList(){const{getTrendingVideos:i}=await e.importAsync("trending-videos");const a=async e=>{const a=await i(e);this.cards.push(...a)};await Promise.all([1,3,7].map(a))},async getActivityVideos(){const i=await Ajax.getJsonWithCredentials(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${getUID()}&type_list=8`);if(i.code!==0){throw new Error(i.message)}this.cards=i.data.cards.filter(i=>{return i.desc.orig_dy_id===0}).map(i=>{const e=JSON.parse(i.card);const a=_.get(i,"display.topic_info.topic_details",[]).map(i=>{return{id:i.topic_id,name:i.topic_name}});return{id:i.desc.dynamic_id_str,aid:e.aid,title:e.title,upID:i.desc.user_profile.info.uid,upName:i.desc.user_profile.info.uname,upFaceUrl:i.desc.user_profile.info.face,coverUrl:e.pic,description:e.desc,timestamp:i.timestamp,time:new Date(i.timestamp*1e3),topics:a,dynamic:e.dynamic,like:formatCount(i.desc.like),duration:e.duration,durationText:formatDuration(e.duration,0),playCount:formatCount(e.stat.view),danmakuCount:formatCount(e.stat.danmaku),watchlater:true}})}},async mounted(){try{const i=matchMedia("(max-width: 680px)");this.useVerticalCards=i.matches;i.addListener(i=>{this.useVerticalCards=i.matches});if(this.showRank){await this.getRankList()}else{await this.getActivityVideos()}}catch(i){Toast.error(i.message,this.showRank?"热门视频":"视频动态",3e3)}finally{this.loading=false}}})}}})(); \ No newline at end of file diff --git a/src/style/simplify-home/minimal-home/minimal-home.vue b/src/style/simplify-home/minimal-home/minimal-home.vue index cb44737a1..711a274ff 100644 --- a/src/style/simplify-home/minimal-home/minimal-home.vue +++ b/src/style/simplify-home/minimal-home/minimal-home.vue @@ -218,6 +218,18 @@ export default { --card-column-count: 1; } } +@media screen and (max-width: 680px) { + .minimal-home { + --card-column-count: 2; + --card-width: 210px; + --card-height: 240px; + } +} +@media screen and (max-width: 470px) { + .minimal-home { + --card-column-count: 1; + } +} @media screen and (min-width: 2000px) { .minimal-home { --card-column-count: 3; diff --git a/src/style/simplify-home/minimal-home/video-list.vue b/src/style/simplify-home/minimal-home/video-list.vue index 11792ed38..f5ee724e1 100644 --- a/src/style/simplify-home/minimal-home/video-list.vue +++ b/src/style/simplify-home/minimal-home/video-list.vue @@ -4,7 +4,12 @@ 加载中...
    - +
    空空如也哦 = ̄ω ̄=
    @@ -20,6 +25,7 @@ export default { data() { return { cards: [] as VideoCardInfo[], + useVerticalCards: false, loading: true } }, @@ -96,6 +102,11 @@ export default { }, async mounted() { try { + const media = matchMedia('(max-width: 680px)') + this.useVerticalCards = media.matches + media.addListener(e => { + this.useVerticalCards = e.matches + }) if (this.showRank) { await this.getRankList() } else { diff --git a/src/style/simplify-home/simple-home/categories/simple-home-normal-category.vue b/src/style/simplify-home/simple-home/categories/simple-home-normal-category.vue index eaaaa24fe..945a3fcfd 100644 --- a/src/style/simplify-home/simple-home/categories/simple-home-normal-category.vue +++ b/src/style/simplify-home/simple-home/categories/simple-home-normal-category.vue @@ -246,6 +246,7 @@ export default { // --card-height: 300px; .rank { // --rank-width: 420px; + display: none; justify-self: center; } } diff --git a/src/style/simplify-home/simple-home/simple-home-feeds.vue b/src/style/simplify-home/simple-home/simple-home-feeds.vue index 86f6f99ca..a5834abbf 100644 --- a/src/style/simplify-home/simple-home/simple-home-feeds.vue +++ b/src/style/simplify-home/simple-home/simple-home-feeds.vue @@ -147,12 +147,15 @@ export default { --card-width: 200px; --card-height: 250px; - --card-count: 3; + --card-count: 2; width: calc((var(--card-width) + 16px) * var(--card-count)); padding-bottom: 16px; scroll-snap-type: x mandatory; scrollbar-width: none !important; min-height: calc(var(--card-height) + 16px); + @media screen and (max-width: 900px) { + --card-count: 3; + } @media screen and (min-width: 1100px) { --card-count: 3; } @@ -162,9 +165,6 @@ export default { @media screen and (min-width: 1550px) { --card-count: 5; } - // @media screen and (min-width: 1850px) { - // --card-count: 7; - // } &::-webkit-scrollbar { width: 0 !important; height: 0 !important; @@ -182,56 +182,5 @@ export default { font-size: 16px; } } - // .video-feeds, - // .bangumi-feeds { - // display: flex; - // flex-direction: column; - // --card-width: 200px; - // --card-height: 250px; - // --card-count: 1; - // .contents { - // width: calc((var(--card-width) + 16px) * var(--card-count)); - // padding-bottom: 16px; - // margin-top: 16px; - // display: flex; - // overflow: auto; - // scroll-snap-type: x mandatory; - // scrollbar-width: none !important; - // &::-webkit-scrollbar { - // width: 0 !important; - // height: 0 !important; - // } - // .card-wrapper { - // padding: 0 8px; - // scroll-snap-align: start; - // flex-shrink: 0; - // } - // } - // } - // .video-feeds { - // grid-area: video; - // @media screen and (min-width: 800px) { - // --card-count: 2; - // } - // @media screen and (min-width: 1180px) { - // --card-count: 3; - // } - // @media screen and (min-width: 1700px) { - // --card-count: 4; - // } - // } - // .bangumi-feeds { - // grid-area: bangumi; - // justify-self: end; - // @media screen and (min-width: 950px) { - // --card-count: 2; - // } - // @media screen and (min-width: 1450px) { - // --card-count: 3; - // } - // @media screen and (min-width: 1900px) { - // --card-count: 4; - // } - // } } \ No newline at end of file