diff --git a/bilibili-evolved.offline.user.js b/bilibili-evolved.offline.user.js index f049273e9..398859f07 100644 --- a/bilibili-evolved.offline.user.js +++ b/bilibili-evolved.offline.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name Bilibili Evolved (Offline) -// @version 678.02 +// @version 678.03 // @description Bilibili Evolved 的离线版, 所有功能都已内置于脚本中. // @author Grant Howard, Coulomb-G // @copyright 2020, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G) @@ -1260,7 +1260,7 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/blur-video-control.min.js"] = (()=>{return(o,e)=>{const l=async()=>{const o=await SpinQuery.count(".bui-slider .bui-track.bui-track-video-progress,.bilibili-player-video-control-bottom",2);o.forEach(o=>{if(!o.classList.contains("video-control-blur-container")){o.classList.add("video-control-blur-container");o.insertAdjacentHTML("afterbegin",`
`)}})};e.applyStyle("blurVideoControlStyle");Observer.videoChange(l);return{reload:()=>{document.querySelectorAll(".video-control-blur-layer").forEach(o=>o.style.display="block");e.applyStyle("blurVideoControlStyle")},unload:()=>{document.querySelectorAll(".video-control-blur-layer").forEach(o=>o.style.display="none");e.removeStyle("blurVideoControlStyle")}}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/bvid-convert.min.css"] = `.bvid-convert{border:2px solid #8882;border-radius:8px;padding:6px 8px;margin:4px 0;order:-1;width:100%;box-sizing:border-box;user-select:text}.bvid-convert-item{font-size:14px}`; offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/bvid-convert.min.js"] = (()=>{return(i,e)=>{const n=["https://www.bilibili.com/video/","https://www.bilibili.com/bangumi/"].some(i=>document.URL.startsWith(i));if(i.preferAvUrl&&document.URL.startsWith("https://www.bilibili.com/video/")){SpinQuery.select(()=>unsafeWindow.aid).then(i=>{if(!i){return}const e=document.URL.replace(/\/(video|bangumi)\/(BV[\w]+)/,(e,n)=>{return`/${n}/av${i}`});if(document.URL!==e){history.replaceState({},document.title,e)}})}return{widget:{content:`
`,condition:async()=>{if(n){return Boolean(await SpinQuery.select(()=>unsafeWindow.aid||unsafeWindow.bvid))}else{return false}},success:()=>{e.applyStyle("bvidConvertStyle");const i=dq(".bvid-convert");const n=(()=>{if(unsafeWindow.bvid){return unsafeWindow.bvid}const i=dq(".av-link,.bv-link,.bvid-link");return i.innerHTML||"未找到BV号"})();i.innerHTML=`\n
av${unsafeWindow.aid}
\n
${n}
\n`}}}}})(); -offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/category-regions.min.js"] = (()=>{return(i,n)=>{const e={anime:1,bangumi:13,china:167,manga:-1,music:3,dance:129,game:4,tech:36,digital:188,life:160,kichiku:119,fashion:155,information:202,entertainment:5,column:-1,movie:23,tv:11,film:181,documentary:177};const a={anime:"v/douga",bangumi:"anime",china:"guochuang",manga:"",music:"v/music",dance:"v/dance",game:"v/game",tech:"v/technology",digital:"v/digital",life:"v/life",kichiku:"v/kichiku",fashion:"v/fashion",information:"v/information/",entertainment:"v/ent",column:"",movie:"v/cinephile",tv:"tv",film:"cinema",documentary:"documentary"};return{export:{RegionCodes:e,RegionLinks:a}}}})(); +offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/category-regions.min.js"] = (()=>{return(i,n)=>{const e={anime:1,bangumi:13,china:167,manga:-1,music:3,dance:129,game:4,tech:36,digital:188,life:160,kichiku:119,fashion:155,information:202,entertainment:5,column:-1,movie:181,tv:11,film:23,documentary:177};const a={anime:"v/douga",bangumi:"anime",china:"guochuang",manga:"",music:"v/music",dance:"v/dance",game:"v/game",tech:"v/technology",digital:"v/digital",life:"v/life",kichiku:"v/kichiku",fashion:"v/fashion",information:"v/information/",entertainment:"v/ent",column:"",movie:"v/cinephile",tv:"tv",film:"cinema",documentary:"documentary"};return{export:{RegionCodes:e,RegionLinks:a}}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/clear-cache.min.js"] = (()=>{return(n,c)=>{return{widget:{content:`\n\n\n清除缓存\n`,condition:()=>typeof offlineData==="undefined",success:()=>{$("#clear-cache").on("click",()=>{n.cache={};Toast.success("已删除全部缓存.","清除缓存",5e3)})}}}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/collapse-live-side-bar.min.css"] = `.side-bar-cntr{transition:.24s ease-out!important;overflow:visible!important;transform:translateZ(0) translateX(100%)!important}.side-bar-cntr:hover{transform:translateZ(0)!important}.side-bar-cntr::after{right:calc(100% + 4px);transform:translateY(-50%) rotate(45deg);width:8px;height:8px;border-radius:2px;box-sizing:border-box;border:4px solid #aaa;border-top-color:transparent;border-right-color:transparent}body.dark .side-bar-cntr::after{border:4px solid #eee;border-top-color:transparent;border-right-color:transparent}.side-bar-cntr::before{right:calc(100% - 8px);transform:translateY(-50%);width:32px;height:48px;border-radius:8px 0 0 8px;background-color:#fff;border:1px solid #e9eaec}body.dark .side-bar-cntr::before{background-color:#222;border-color:transparent}.side-bar-cntr::after,.side-bar-cntr::before{content:"";transition:.24s ease-out;cursor:pointer;position:fixed;top:50%}.side-bar-cntr:hover::after,.side-bar-cntr:hover::before{opacity:0}`; offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/collapse-live-side-bar.min.js"] = (()=>{return(e,l)=>{return l.toggleStyle("collapseLiveSideBarStyle")}})(); @@ -1446,7 +1446,7 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/show-dead-video-title.min.js"] = (()=>{return(e,t)=>{(async()=>{if(!document.URL.startsWith("https://space.bilibili.com")){return}class t{}class i extends t{convertToDeadVideoInfo(e,t){return{aid:e,title:t.title,cover:t.pic}}async queryInfo(e){const t=[];if(e.length<=i.MaxCountPerRequest){const s=await Ajax.getJson(`${i.BiliplusHost}/api/aidinfo?aid=${e.join(",")}`);if(s.code===0){t.push(...e.map(e=>{if(e in s.data){return this.convertToDeadVideoInfo(e,s.data[e])}else{return{aid:e,title:"已失效视频",cover:""}}}))}else{console.error(`[显示失效视频信息] Biliplus API 未成功. message=${s.message}`)}}else{t.push(...await this.queryInfo(e.slice(0,i.MaxCountPerRequest)));t.push(...await this.queryInfo(e.slice(i.MaxCountPerRequest)))}return t}}i.BiliplusHost=`https://hd.biliplus.com`;i.MaxCountPerRequest=30;class s extends t{async toggleWatchlater(e,t){for(const i of t){await Ajax.postTextWithCredentials(`https://api.bilibili.com/x/v2/history/toview/${e?"add":"del"}`,`aid=${i}&csrf=${getCsrf()}}`)}}async queryInfo(e){const t=[];await this.toggleWatchlater(true,e);const i=await Ajax.getJsonWithCredentials("https://api.bilibili.com/x/v2/history/toview/web");if(i.code===0){const s=i.data.list.map(e=>{return{aid:e.aid.toString(),title:e.title,cover:e.pic}});t.push(...e.map(e=>s.find(t=>t.aid===e)).filter(e=>e!==undefined));await this.toggleWatchlater(false,e)}else{console.error(`[显示失效视频信息] 稍后再看 API 未成功. message=${i.message}`)}return t}}const a=await SpinQuery.select("#app>.s-space");if(!a){return}Observer.childListSubtree(a,async()=>{const t=dqa(".disabled[data-aid]");if(t.length===0){return}const a=t.map(e=>e.getAttribute("data-aid"));const o=e.deadVideoTitleProvider==="BiliPlus"?new i:new s;const r=await o.queryInfo(a);console.log(`[显示失效视频信息]`,`deadVideos:`,t,`infos:`,r);t.forEach((t,i)=>{t.classList.remove("disabled");const s=t.getAttribute("data-aid");const a=(()=>{if(e.useBiliplusRedirect){return`https://hd.biliplus.com/video/av${s}`}else{return`//www.bilibili.com/video/av${s}`}})();const o=r.find(e=>e.aid===s);console.log(`[显示失效视频信息]`,"#"+i,o);if(o===undefined){console.error(`[显示失效视频信息]信息获取失败, aid=${s}`);return}const n=t.querySelector("a.cover");n.target="_blank";n.href=a;if(o.cover!==""){n.querySelector("img").src=o.cover.replace("http:","https:")}const l=t.querySelector("a.title");l.target="_blank";l.title=o.title;l.href=a;l.innerText=o.title})})})()}})(); 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:auto 1fr 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:1100px){.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 .info-row{display:none}.simple-home .feeds,.simple-home .trendings{transform:translateX(0)}}`,"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"},rankLink(){return this.rid===13?"https://www.bilibili.com/ranking/bangumi/13/0/3":"https://www.bilibili.com/ranking/bangumi/167/0/3"}},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,i)=>{const t=`
分区
{{t.name}}
{{reordering ? '完成' : '排序'}}
`;i.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 r={anime:"动画",bangumi:"番剧",china:"国创",music:"音乐",dance:"舞蹈",game:"游戏",tech:"科技",digital:"数码",life:"生活",kichiku:"鬼畜",fashion:"时尚",information:"资讯",entertainment:"娱乐",movie:"电影",tv:"TV剧",film:"影视",documentary:"纪录片"};return{export:Object.assign({template:t},{components:{Icon:()=>i.importAsync("icon.vue"),NormalCategory:()=>i.importAsync("simple-home-normal-category.vue"),BangumiCategory:()=>i.importAsync("simple-home-bangumi-category.vue")},data(){return{tabs:Object.entries(r).map(([e,i])=>{return{key:e,name:i}}),selectedTab:Object.entries(e.simpleHomeCategoryOrders).sort((e,i)=>e[1]-i[1])[0][0],reordering:false,reorder:null,regionCodes:null,regionLinks:null}},async mounted(){this.checkAds();const t=this.$refs.reorderContainer;const{RegionCodes:r,RegionLinks:a}=await i.importAsync("category-regions");this.regionCodes=r;this.regionLinks=a;const{Reorder:o}=await i.importAsync("reorder");const s=new o(t);this.reorder=s;s.addEventListener("reorder",i=>{const t=i.detail;for(const i of t){const{element:t,order:r}=i;e.simpleHomeCategoryOrders[t.getAttribute("data-key")]=r}e.simpleHomeCategoryOrders=e.simpleHomeCategoryOrders})},methods:{getOrder(i){return e.simpleHomeCategoryOrders[i]},checkAds(){if("ads"in e.simpleHomeCategoryOrders){e.simpleHomeCategoryOrders.information=e.simpleHomeCategoryOrders.ads;delete e.simpleHomeCategoryOrders.ads;e.simpleHomeCategoryOrders=e.simpleHomeCategoryOrders}},selectTab(e){if(this.selectedTab===e.key&&this.regionLinks){const i=this.regionLinks[e.key];window.open(`https://www.bilibili.com/${i}`,"_blank")}else{this.selectedTab=e.key}}},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-categories.vue.min.js"] = (()=>{return(e,i)=>{const t=`
分区
{{t.name}}
{{reordering ? '完成' : '排序'}}
`;i.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 r={anime:"动画",bangumi:"番剧",china:"国创",music:"音乐",dance:"舞蹈",game:"游戏",tech:"科技",digital:"数码",life:"生活",kichiku:"鬼畜",fashion:"时尚",information:"资讯",entertainment:"娱乐",movie:"影视",tv:"TV剧",film:"放映厅",documentary:"纪录片"};return{export:Object.assign({template:t},{components:{Icon:()=>i.importAsync("icon.vue"),NormalCategory:()=>i.importAsync("simple-home-normal-category.vue"),BangumiCategory:()=>i.importAsync("simple-home-bangumi-category.vue")},data(){return{tabs:Object.entries(r).map(([e,i])=>{return{key:e,name:i}}),selectedTab:Object.entries(e.simpleHomeCategoryOrders).sort((e,i)=>e[1]-i[1])[0][0],reordering:false,reorder:null,regionCodes:null,regionLinks:null}},async mounted(){this.checkAds();const t=this.$refs.reorderContainer;const{RegionCodes:r,RegionLinks:a}=await i.importAsync("category-regions");this.regionCodes=r;this.regionLinks=a;const{Reorder:o}=await i.importAsync("reorder");const s=new o(t);this.reorder=s;s.addEventListener("reorder",i=>{const t=i.detail;for(const i of t){const{element:t,order:r}=i;e.simpleHomeCategoryOrders[t.getAttribute("data-key")]=r}e.simpleHomeCategoryOrders=e.simpleHomeCategoryOrders})},methods:{getOrder(i){return e.simpleHomeCategoryOrders[i]},checkAds(){if("ads"in e.simpleHomeCategoryOrders){e.simpleHomeCategoryOrders.information=e.simpleHomeCategoryOrders.ads;delete e.simpleHomeCategoryOrders.ads;e.simpleHomeCategoryOrders=e.simpleHomeCategoryOrders}},selectTab(e){if(this.selectedTab===e.key&&this.regionLinks){const i=this.regionLinks[e.key];window.open(`https://www.bilibili.com/${i}`,"_blank")}else{this.selectedTab=e.key}}},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:4;width:calc((var(--card-width) + 16px) * var(--card-count));padding-bottom:16px;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(i,t)=>{const e=`
`;t.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:()=>t.importAsync("slideshow-cards.vue"),RankList:()=>t.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"]),rankLink(){if(this.rid===165){return null}let i="all";if(this.rid===177||this.rid===23||this.rid===11){i="cinema"}return`https://www.bilibili.com/ranking/${i}/${this.rid}/0/3`}},methods:{async loadCards(i,t,e){if(e===undefined){e=(i=>{const t=getUID();const e=_.get(i,"data.archives",[]);return e.map(i=>{return{id:i.aid,aid:i.aid,coverUrl:i.pic.replace("http:","https:"),title:i.title,upName:i.owner.name,upFaceUrl:i.owner.face.replace("http:","https:"),upID:i.owner.mid,playCount:i.stat.view,danmakuCount:i.stat.danmaku,like:i.stat.like,coins:i.stat.coin,description:i.desc,type:i.tname,watchlater:t?this.watchlaterList.includes(i.aid):null}})})}try{this[i].loading=true;const a=await Ajax.getJson(t);if(a.code!==0){this[i].error=true}this[i].videos=e(a)}catch(t){logError(t);this[i].error=true}finally{this[i].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`,i=>{const t=getUID();const e=i.data;return e.map(i=>{return{id:i.aid,aid:parseInt(i.aid),title:i.title,playCount:i.play,favorites:i.favorites,upID:i.mid,upName:i.author,description:i.description,coverUrl:i.pic.replace("http:","https:"),coins:i.coins,durationText:i.duration,points:i.pts,watchlater:t?this.watchlaterList.includes(parseInt(i.aid)):null}})})},...Vuex.mapActions(["toggleWatchlater"]),updateVideos(){this.loadNewActivity();this.loadNewPost();this.loadRank()}},watch:{rid(i){if(i>0){if(this.loaded){this.updateVideos()}}else{console.warn(`rid=${i}`)}}},mounted(){const i=new IntersectionObserver(()=>{this.updateVideos();this.loaded=true;i.disconnect()});i.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}`; diff --git a/bilibili-evolved.preview-offline.user.js b/bilibili-evolved.preview-offline.user.js index 40c5dd064..1fe505e26 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 678.02 +// @version 678.03 // @description Bilibili Evolved 的预览离线版, 可以抢先体验新功能, 并且所有功能都已内置于脚本中. // @author Grant Howard, Coulomb-G // @copyright 2020, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G) @@ -1260,7 +1260,7 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/blur-video-control.min.js"] = (()=>{return(o,e)=>{const l=async()=>{const o=await SpinQuery.count(".bui-slider .bui-track.bui-track-video-progress,.bilibili-player-video-control-bottom",2);o.forEach(o=>{if(!o.classList.contains("video-control-blur-container")){o.classList.add("video-control-blur-container");o.insertAdjacentHTML("afterbegin",`
`)}})};e.applyStyle("blurVideoControlStyle");Observer.videoChange(l);return{reload:()=>{document.querySelectorAll(".video-control-blur-layer").forEach(o=>o.style.display="block");e.applyStyle("blurVideoControlStyle")},unload:()=>{document.querySelectorAll(".video-control-blur-layer").forEach(o=>o.style.display="none");e.removeStyle("blurVideoControlStyle")}}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/bvid-convert.min.css"] = `.bvid-convert{border:2px solid #8882;border-radius:8px;padding:6px 8px;margin:4px 0;order:-1;width:100%;box-sizing:border-box;user-select:text}.bvid-convert-item{font-size:14px}`; offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/bvid-convert.min.js"] = (()=>{return(i,e)=>{const n=["https://www.bilibili.com/video/","https://www.bilibili.com/bangumi/"].some(i=>document.URL.startsWith(i));if(i.preferAvUrl&&document.URL.startsWith("https://www.bilibili.com/video/")){SpinQuery.select(()=>unsafeWindow.aid).then(i=>{if(!i){return}const e=document.URL.replace(/\/(video|bangumi)\/(BV[\w]+)/,(e,n)=>{return`/${n}/av${i}`});if(document.URL!==e){history.replaceState({},document.title,e)}})}return{widget:{content:`
`,condition:async()=>{if(n){return Boolean(await SpinQuery.select(()=>unsafeWindow.aid||unsafeWindow.bvid))}else{return false}},success:()=>{e.applyStyle("bvidConvertStyle");const i=dq(".bvid-convert");const n=(()=>{if(unsafeWindow.bvid){return unsafeWindow.bvid}const i=dq(".av-link,.bv-link,.bvid-link");return i.innerHTML||"未找到BV号"})();i.innerHTML=`\n
av${unsafeWindow.aid}
\n
${n}
\n`}}}}})(); -offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/category-regions.min.js"] = (()=>{return(i,n)=>{const e={anime:1,bangumi:13,china:167,manga:-1,music:3,dance:129,game:4,tech:36,digital:188,life:160,kichiku:119,fashion:155,information:202,entertainment:5,column:-1,movie:23,tv:11,film:181,documentary:177};const a={anime:"v/douga",bangumi:"anime",china:"guochuang",manga:"",music:"v/music",dance:"v/dance",game:"v/game",tech:"v/technology",digital:"v/digital",life:"v/life",kichiku:"v/kichiku",fashion:"v/fashion",information:"v/information/",entertainment:"v/ent",column:"",movie:"v/cinephile",tv:"tv",film:"cinema",documentary:"documentary"};return{export:{RegionCodes:e,RegionLinks:a}}}})(); +offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/category-regions.min.js"] = (()=>{return(i,n)=>{const e={anime:1,bangumi:13,china:167,manga:-1,music:3,dance:129,game:4,tech:36,digital:188,life:160,kichiku:119,fashion:155,information:202,entertainment:5,column:-1,movie:181,tv:11,film:23,documentary:177};const a={anime:"v/douga",bangumi:"anime",china:"guochuang",manga:"",music:"v/music",dance:"v/dance",game:"v/game",tech:"v/technology",digital:"v/digital",life:"v/life",kichiku:"v/kichiku",fashion:"v/fashion",information:"v/information/",entertainment:"v/ent",column:"",movie:"v/cinephile",tv:"tv",film:"cinema",documentary:"documentary"};return{export:{RegionCodes:e,RegionLinks:a}}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/clear-cache.min.js"] = (()=>{return(n,c)=>{return{widget:{content:`\n\n\n清除缓存\n`,condition:()=>typeof offlineData==="undefined",success:()=>{$("#clear-cache").on("click",()=>{n.cache={};Toast.success("已删除全部缓存.","清除缓存",5e3)})}}}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/collapse-live-side-bar.min.css"] = `.side-bar-cntr{transition:.24s ease-out!important;overflow:visible!important;transform:translateZ(0) translateX(100%)!important}.side-bar-cntr:hover{transform:translateZ(0)!important}.side-bar-cntr::after{right:calc(100% + 4px);transform:translateY(-50%) rotate(45deg);width:8px;height:8px;border-radius:2px;box-sizing:border-box;border:4px solid #aaa;border-top-color:transparent;border-right-color:transparent}body.dark .side-bar-cntr::after{border:4px solid #eee;border-top-color:transparent;border-right-color:transparent}.side-bar-cntr::before{right:calc(100% - 8px);transform:translateY(-50%);width:32px;height:48px;border-radius:8px 0 0 8px;background-color:#fff;border:1px solid #e9eaec}body.dark .side-bar-cntr::before{background-color:#222;border-color:transparent}.side-bar-cntr::after,.side-bar-cntr::before{content:"";transition:.24s ease-out;cursor:pointer;position:fixed;top:50%}.side-bar-cntr:hover::after,.side-bar-cntr:hover::before{opacity:0}`; offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/collapse-live-side-bar.min.js"] = (()=>{return(e,l)=>{return l.toggleStyle("collapseLiveSideBarStyle")}})(); @@ -1446,7 +1446,7 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/show-dead-video-title.min.js"] = (()=>{return(e,t)=>{(async()=>{if(!document.URL.startsWith("https://space.bilibili.com")){return}class t{}class i extends t{convertToDeadVideoInfo(e,t){return{aid:e,title:t.title,cover:t.pic}}async queryInfo(e){const t=[];if(e.length<=i.MaxCountPerRequest){const s=await Ajax.getJson(`${i.BiliplusHost}/api/aidinfo?aid=${e.join(",")}`);if(s.code===0){t.push(...e.map(e=>{if(e in s.data){return this.convertToDeadVideoInfo(e,s.data[e])}else{return{aid:e,title:"已失效视频",cover:""}}}))}else{console.error(`[显示失效视频信息] Biliplus API 未成功. message=${s.message}`)}}else{t.push(...await this.queryInfo(e.slice(0,i.MaxCountPerRequest)));t.push(...await this.queryInfo(e.slice(i.MaxCountPerRequest)))}return t}}i.BiliplusHost=`https://hd.biliplus.com`;i.MaxCountPerRequest=30;class s extends t{async toggleWatchlater(e,t){for(const i of t){await Ajax.postTextWithCredentials(`https://api.bilibili.com/x/v2/history/toview/${e?"add":"del"}`,`aid=${i}&csrf=${getCsrf()}}`)}}async queryInfo(e){const t=[];await this.toggleWatchlater(true,e);const i=await Ajax.getJsonWithCredentials("https://api.bilibili.com/x/v2/history/toview/web");if(i.code===0){const s=i.data.list.map(e=>{return{aid:e.aid.toString(),title:e.title,cover:e.pic}});t.push(...e.map(e=>s.find(t=>t.aid===e)).filter(e=>e!==undefined));await this.toggleWatchlater(false,e)}else{console.error(`[显示失效视频信息] 稍后再看 API 未成功. message=${i.message}`)}return t}}const a=await SpinQuery.select("#app>.s-space");if(!a){return}Observer.childListSubtree(a,async()=>{const t=dqa(".disabled[data-aid]");if(t.length===0){return}const a=t.map(e=>e.getAttribute("data-aid"));const o=e.deadVideoTitleProvider==="BiliPlus"?new i:new s;const r=await o.queryInfo(a);console.log(`[显示失效视频信息]`,`deadVideos:`,t,`infos:`,r);t.forEach((t,i)=>{t.classList.remove("disabled");const s=t.getAttribute("data-aid");const a=(()=>{if(e.useBiliplusRedirect){return`https://hd.biliplus.com/video/av${s}`}else{return`//www.bilibili.com/video/av${s}`}})();const o=r.find(e=>e.aid===s);console.log(`[显示失效视频信息]`,"#"+i,o);if(o===undefined){console.error(`[显示失效视频信息]信息获取失败, aid=${s}`);return}const n=t.querySelector("a.cover");n.target="_blank";n.href=a;if(o.cover!==""){n.querySelector("img").src=o.cover.replace("http:","https:")}const l=t.querySelector("a.title");l.target="_blank";l.title=o.title;l.href=a;l.innerText=o.title})})})()}})(); 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:auto 1fr 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:1100px){.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 .info-row{display:none}.simple-home .feeds,.simple-home .trendings{transform:translateX(0)}}`,"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"},rankLink(){return this.rid===13?"https://www.bilibili.com/ranking/bangumi/13/0/3":"https://www.bilibili.com/ranking/bangumi/167/0/3"}},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,i)=>{const t=`
分区
{{t.name}}
{{reordering ? '完成' : '排序'}}
`;i.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 r={anime:"动画",bangumi:"番剧",china:"国创",music:"音乐",dance:"舞蹈",game:"游戏",tech:"科技",digital:"数码",life:"生活",kichiku:"鬼畜",fashion:"时尚",information:"资讯",entertainment:"娱乐",movie:"电影",tv:"TV剧",film:"影视",documentary:"纪录片"};return{export:Object.assign({template:t},{components:{Icon:()=>i.importAsync("icon.vue"),NormalCategory:()=>i.importAsync("simple-home-normal-category.vue"),BangumiCategory:()=>i.importAsync("simple-home-bangumi-category.vue")},data(){return{tabs:Object.entries(r).map(([e,i])=>{return{key:e,name:i}}),selectedTab:Object.entries(e.simpleHomeCategoryOrders).sort((e,i)=>e[1]-i[1])[0][0],reordering:false,reorder:null,regionCodes:null,regionLinks:null}},async mounted(){this.checkAds();const t=this.$refs.reorderContainer;const{RegionCodes:r,RegionLinks:a}=await i.importAsync("category-regions");this.regionCodes=r;this.regionLinks=a;const{Reorder:o}=await i.importAsync("reorder");const s=new o(t);this.reorder=s;s.addEventListener("reorder",i=>{const t=i.detail;for(const i of t){const{element:t,order:r}=i;e.simpleHomeCategoryOrders[t.getAttribute("data-key")]=r}e.simpleHomeCategoryOrders=e.simpleHomeCategoryOrders})},methods:{getOrder(i){return e.simpleHomeCategoryOrders[i]},checkAds(){if("ads"in e.simpleHomeCategoryOrders){e.simpleHomeCategoryOrders.information=e.simpleHomeCategoryOrders.ads;delete e.simpleHomeCategoryOrders.ads;e.simpleHomeCategoryOrders=e.simpleHomeCategoryOrders}},selectTab(e){if(this.selectedTab===e.key&&this.regionLinks){const i=this.regionLinks[e.key];window.open(`https://www.bilibili.com/${i}`,"_blank")}else{this.selectedTab=e.key}}},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-categories.vue.min.js"] = (()=>{return(e,i)=>{const t=`
分区
{{t.name}}
{{reordering ? '完成' : '排序'}}
`;i.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 r={anime:"动画",bangumi:"番剧",china:"国创",music:"音乐",dance:"舞蹈",game:"游戏",tech:"科技",digital:"数码",life:"生活",kichiku:"鬼畜",fashion:"时尚",information:"资讯",entertainment:"娱乐",movie:"影视",tv:"TV剧",film:"放映厅",documentary:"纪录片"};return{export:Object.assign({template:t},{components:{Icon:()=>i.importAsync("icon.vue"),NormalCategory:()=>i.importAsync("simple-home-normal-category.vue"),BangumiCategory:()=>i.importAsync("simple-home-bangumi-category.vue")},data(){return{tabs:Object.entries(r).map(([e,i])=>{return{key:e,name:i}}),selectedTab:Object.entries(e.simpleHomeCategoryOrders).sort((e,i)=>e[1]-i[1])[0][0],reordering:false,reorder:null,regionCodes:null,regionLinks:null}},async mounted(){this.checkAds();const t=this.$refs.reorderContainer;const{RegionCodes:r,RegionLinks:a}=await i.importAsync("category-regions");this.regionCodes=r;this.regionLinks=a;const{Reorder:o}=await i.importAsync("reorder");const s=new o(t);this.reorder=s;s.addEventListener("reorder",i=>{const t=i.detail;for(const i of t){const{element:t,order:r}=i;e.simpleHomeCategoryOrders[t.getAttribute("data-key")]=r}e.simpleHomeCategoryOrders=e.simpleHomeCategoryOrders})},methods:{getOrder(i){return e.simpleHomeCategoryOrders[i]},checkAds(){if("ads"in e.simpleHomeCategoryOrders){e.simpleHomeCategoryOrders.information=e.simpleHomeCategoryOrders.ads;delete e.simpleHomeCategoryOrders.ads;e.simpleHomeCategoryOrders=e.simpleHomeCategoryOrders}},selectTab(e){if(this.selectedTab===e.key&&this.regionLinks){const i=this.regionLinks[e.key];window.open(`https://www.bilibili.com/${i}`,"_blank")}else{this.selectedTab=e.key}}},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:4;width:calc((var(--card-width) + 16px) * var(--card-count));padding-bottom:16px;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(i,t)=>{const e=`
`;t.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:()=>t.importAsync("slideshow-cards.vue"),RankList:()=>t.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"]),rankLink(){if(this.rid===165){return null}let i="all";if(this.rid===177||this.rid===23||this.rid===11){i="cinema"}return`https://www.bilibili.com/ranking/${i}/${this.rid}/0/3`}},methods:{async loadCards(i,t,e){if(e===undefined){e=(i=>{const t=getUID();const e=_.get(i,"data.archives",[]);return e.map(i=>{return{id:i.aid,aid:i.aid,coverUrl:i.pic.replace("http:","https:"),title:i.title,upName:i.owner.name,upFaceUrl:i.owner.face.replace("http:","https:"),upID:i.owner.mid,playCount:i.stat.view,danmakuCount:i.stat.danmaku,like:i.stat.like,coins:i.stat.coin,description:i.desc,type:i.tname,watchlater:t?this.watchlaterList.includes(i.aid):null}})})}try{this[i].loading=true;const a=await Ajax.getJson(t);if(a.code!==0){this[i].error=true}this[i].videos=e(a)}catch(t){logError(t);this[i].error=true}finally{this[i].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`,i=>{const t=getUID();const e=i.data;return e.map(i=>{return{id:i.aid,aid:parseInt(i.aid),title:i.title,playCount:i.play,favorites:i.favorites,upID:i.mid,upName:i.author,description:i.description,coverUrl:i.pic.replace("http:","https:"),coins:i.coins,durationText:i.duration,points:i.pts,watchlater:t?this.watchlaterList.includes(parseInt(i.aid)):null}})})},...Vuex.mapActions(["toggleWatchlater"]),updateVideos(){this.loadNewActivity();this.loadNewPost();this.loadRank()}},watch:{rid(i){if(i>0){if(this.loaded){this.updateVideos()}}else{console.warn(`rid=${i}`)}}},mounted(){const i=new IntersectionObserver(()=>{this.updateVideos();this.loaded=true;i.disconnect()});i.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}`; diff --git a/bilibili-evolved.preview.user.js b/bilibili-evolved.preview.user.js index 338fd3217..596ec31e2 100644 --- a/bilibili-evolved.preview.user.js +++ b/bilibili-evolved.preview.user.js @@ -1259,7 +1259,7 @@ onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/m onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/blur-video-control.min.js"] = (()=>{return(o,e)=>{const l=async()=>{const o=await SpinQuery.count(".bui-slider .bui-track.bui-track-video-progress,.bilibili-player-video-control-bottom",2);o.forEach(o=>{if(!o.classList.contains("video-control-blur-container")){o.classList.add("video-control-blur-container");o.insertAdjacentHTML("afterbegin",`
`)}})};e.applyStyle("blurVideoControlStyle");Observer.videoChange(l);return{reload:()=>{document.querySelectorAll(".video-control-blur-layer").forEach(o=>o.style.display="block");e.applyStyle("blurVideoControlStyle")},unload:()=>{document.querySelectorAll(".video-control-blur-layer").forEach(o=>o.style.display="none");e.removeStyle("blurVideoControlStyle")}}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/bvid-convert.min.css"] = `.bvid-convert{border:2px solid #8882;border-radius:8px;padding:6px 8px;margin:4px 0;order:-1;width:100%;box-sizing:border-box;user-select:text}.bvid-convert-item{font-size:14px}`; onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/bvid-convert.min.js"] = (()=>{return(i,e)=>{const n=["https://www.bilibili.com/video/","https://www.bilibili.com/bangumi/"].some(i=>document.URL.startsWith(i));if(i.preferAvUrl&&document.URL.startsWith("https://www.bilibili.com/video/")){SpinQuery.select(()=>unsafeWindow.aid).then(i=>{if(!i){return}const e=document.URL.replace(/\/(video|bangumi)\/(BV[\w]+)/,(e,n)=>{return`/${n}/av${i}`});if(document.URL!==e){history.replaceState({},document.title,e)}})}return{widget:{content:`
`,condition:async()=>{if(n){return Boolean(await SpinQuery.select(()=>unsafeWindow.aid||unsafeWindow.bvid))}else{return false}},success:()=>{e.applyStyle("bvidConvertStyle");const i=dq(".bvid-convert");const n=(()=>{if(unsafeWindow.bvid){return unsafeWindow.bvid}const i=dq(".av-link,.bv-link,.bvid-link");return i.innerHTML||"未找到BV号"})();i.innerHTML=`\n
av${unsafeWindow.aid}
\n
${n}
\n`}}}}})(); -onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/category-regions.min.js"] = (()=>{return(i,n)=>{const e={anime:1,bangumi:13,china:167,manga:-1,music:3,dance:129,game:4,tech:36,digital:188,life:160,kichiku:119,fashion:155,information:202,entertainment:5,column:-1,movie:23,tv:11,film:181,documentary:177};const a={anime:"v/douga",bangumi:"anime",china:"guochuang",manga:"",music:"v/music",dance:"v/dance",game:"v/game",tech:"v/technology",digital:"v/digital",life:"v/life",kichiku:"v/kichiku",fashion:"v/fashion",information:"v/information/",entertainment:"v/ent",column:"",movie:"v/cinephile",tv:"tv",film:"cinema",documentary:"documentary"};return{export:{RegionCodes:e,RegionLinks:a}}}})(); +onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/category-regions.min.js"] = (()=>{return(i,n)=>{const e={anime:1,bangumi:13,china:167,manga:-1,music:3,dance:129,game:4,tech:36,digital:188,life:160,kichiku:119,fashion:155,information:202,entertainment:5,column:-1,movie:181,tv:11,film:23,documentary:177};const a={anime:"v/douga",bangumi:"anime",china:"guochuang",manga:"",music:"v/music",dance:"v/dance",game:"v/game",tech:"v/technology",digital:"v/digital",life:"v/life",kichiku:"v/kichiku",fashion:"v/fashion",information:"v/information/",entertainment:"v/ent",column:"",movie:"v/cinephile",tv:"tv",film:"cinema",documentary:"documentary"};return{export:{RegionCodes:e,RegionLinks:a}}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/clear-cache.min.js"] = (()=>{return(n,c)=>{return{widget:{content:`\n\n\n清除缓存\n`,condition:()=>typeof offlineData==="undefined",success:()=>{$("#clear-cache").on("click",()=>{n.cache={};Toast.success("已删除全部缓存.","清除缓存",5e3)})}}}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/collapse-live-side-bar.min.css"] = `.side-bar-cntr{transition:.24s ease-out!important;overflow:visible!important;transform:translateZ(0) translateX(100%)!important}.side-bar-cntr:hover{transform:translateZ(0)!important}.side-bar-cntr::after{right:calc(100% + 4px);transform:translateY(-50%) rotate(45deg);width:8px;height:8px;border-radius:2px;box-sizing:border-box;border:4px solid #aaa;border-top-color:transparent;border-right-color:transparent}body.dark .side-bar-cntr::after{border:4px solid #eee;border-top-color:transparent;border-right-color:transparent}.side-bar-cntr::before{right:calc(100% - 8px);transform:translateY(-50%);width:32px;height:48px;border-radius:8px 0 0 8px;background-color:#fff;border:1px solid #e9eaec}body.dark .side-bar-cntr::before{background-color:#222;border-color:transparent}.side-bar-cntr::after,.side-bar-cntr::before{content:"";transition:.24s ease-out;cursor:pointer;position:fixed;top:50%}.side-bar-cntr:hover::after,.side-bar-cntr:hover::before{opacity:0}`; onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/collapse-live-side-bar.min.js"] = (()=>{return(e,l)=>{return l.toggleStyle("collapseLiveSideBarStyle")}})(); @@ -1445,7 +1445,7 @@ onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/m onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/show-dead-video-title.min.js"] = (()=>{return(e,t)=>{(async()=>{if(!document.URL.startsWith("https://space.bilibili.com")){return}class t{}class i extends t{convertToDeadVideoInfo(e,t){return{aid:e,title:t.title,cover:t.pic}}async queryInfo(e){const t=[];if(e.length<=i.MaxCountPerRequest){const s=await Ajax.getJson(`${i.BiliplusHost}/api/aidinfo?aid=${e.join(",")}`);if(s.code===0){t.push(...e.map(e=>{if(e in s.data){return this.convertToDeadVideoInfo(e,s.data[e])}else{return{aid:e,title:"已失效视频",cover:""}}}))}else{console.error(`[显示失效视频信息] Biliplus API 未成功. message=${s.message}`)}}else{t.push(...await this.queryInfo(e.slice(0,i.MaxCountPerRequest)));t.push(...await this.queryInfo(e.slice(i.MaxCountPerRequest)))}return t}}i.BiliplusHost=`https://hd.biliplus.com`;i.MaxCountPerRequest=30;class s extends t{async toggleWatchlater(e,t){for(const i of t){await Ajax.postTextWithCredentials(`https://api.bilibili.com/x/v2/history/toview/${e?"add":"del"}`,`aid=${i}&csrf=${getCsrf()}}`)}}async queryInfo(e){const t=[];await this.toggleWatchlater(true,e);const i=await Ajax.getJsonWithCredentials("https://api.bilibili.com/x/v2/history/toview/web");if(i.code===0){const s=i.data.list.map(e=>{return{aid:e.aid.toString(),title:e.title,cover:e.pic}});t.push(...e.map(e=>s.find(t=>t.aid===e)).filter(e=>e!==undefined));await this.toggleWatchlater(false,e)}else{console.error(`[显示失效视频信息] 稍后再看 API 未成功. message=${i.message}`)}return t}}const a=await SpinQuery.select("#app>.s-space");if(!a){return}Observer.childListSubtree(a,async()=>{const t=dqa(".disabled[data-aid]");if(t.length===0){return}const a=t.map(e=>e.getAttribute("data-aid"));const o=e.deadVideoTitleProvider==="BiliPlus"?new i:new s;const r=await o.queryInfo(a);console.log(`[显示失效视频信息]`,`deadVideos:`,t,`infos:`,r);t.forEach((t,i)=>{t.classList.remove("disabled");const s=t.getAttribute("data-aid");const a=(()=>{if(e.useBiliplusRedirect){return`https://hd.biliplus.com/video/av${s}`}else{return`//www.bilibili.com/video/av${s}`}})();const o=r.find(e=>e.aid===s);console.log(`[显示失效视频信息]`,"#"+i,o);if(o===undefined){console.error(`[显示失效视频信息]信息获取失败, aid=${s}`);return}const n=t.querySelector("a.cover");n.target="_blank";n.href=a;if(o.cover!==""){n.querySelector("img").src=o.cover.replace("http:","https:")}const l=t.querySelector("a.title");l.target="_blank";l.title=o.title;l.href=a;l.innerText=o.title})})})()}})(); 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:auto 1fr 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:1100px){.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 .info-row{display:none}.simple-home .feeds,.simple-home .trendings{transform:translateX(0)}}`,"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"},rankLink(){return this.rid===13?"https://www.bilibili.com/ranking/bangumi/13/0/3":"https://www.bilibili.com/ranking/bangumi/167/0/3"}},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,i)=>{const t=`
分区
{{t.name}}
{{reordering ? '完成' : '排序'}}
`;i.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 r={anime:"动画",bangumi:"番剧",china:"国创",music:"音乐",dance:"舞蹈",game:"游戏",tech:"科技",digital:"数码",life:"生活",kichiku:"鬼畜",fashion:"时尚",information:"资讯",entertainment:"娱乐",movie:"电影",tv:"TV剧",film:"影视",documentary:"纪录片"};return{export:Object.assign({template:t},{components:{Icon:()=>i.importAsync("icon.vue"),NormalCategory:()=>i.importAsync("simple-home-normal-category.vue"),BangumiCategory:()=>i.importAsync("simple-home-bangumi-category.vue")},data(){return{tabs:Object.entries(r).map(([e,i])=>{return{key:e,name:i}}),selectedTab:Object.entries(e.simpleHomeCategoryOrders).sort((e,i)=>e[1]-i[1])[0][0],reordering:false,reorder:null,regionCodes:null,regionLinks:null}},async mounted(){this.checkAds();const t=this.$refs.reorderContainer;const{RegionCodes:r,RegionLinks:a}=await i.importAsync("category-regions");this.regionCodes=r;this.regionLinks=a;const{Reorder:o}=await i.importAsync("reorder");const s=new o(t);this.reorder=s;s.addEventListener("reorder",i=>{const t=i.detail;for(const i of t){const{element:t,order:r}=i;e.simpleHomeCategoryOrders[t.getAttribute("data-key")]=r}e.simpleHomeCategoryOrders=e.simpleHomeCategoryOrders})},methods:{getOrder(i){return e.simpleHomeCategoryOrders[i]},checkAds(){if("ads"in e.simpleHomeCategoryOrders){e.simpleHomeCategoryOrders.information=e.simpleHomeCategoryOrders.ads;delete e.simpleHomeCategoryOrders.ads;e.simpleHomeCategoryOrders=e.simpleHomeCategoryOrders}},selectTab(e){if(this.selectedTab===e.key&&this.regionLinks){const i=this.regionLinks[e.key];window.open(`https://www.bilibili.com/${i}`,"_blank")}else{this.selectedTab=e.key}}},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-categories.vue.min.js"] = (()=>{return(e,i)=>{const t=`
分区
{{t.name}}
{{reordering ? '完成' : '排序'}}
`;i.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 r={anime:"动画",bangumi:"番剧",china:"国创",music:"音乐",dance:"舞蹈",game:"游戏",tech:"科技",digital:"数码",life:"生活",kichiku:"鬼畜",fashion:"时尚",information:"资讯",entertainment:"娱乐",movie:"影视",tv:"TV剧",film:"放映厅",documentary:"纪录片"};return{export:Object.assign({template:t},{components:{Icon:()=>i.importAsync("icon.vue"),NormalCategory:()=>i.importAsync("simple-home-normal-category.vue"),BangumiCategory:()=>i.importAsync("simple-home-bangumi-category.vue")},data(){return{tabs:Object.entries(r).map(([e,i])=>{return{key:e,name:i}}),selectedTab:Object.entries(e.simpleHomeCategoryOrders).sort((e,i)=>e[1]-i[1])[0][0],reordering:false,reorder:null,regionCodes:null,regionLinks:null}},async mounted(){this.checkAds();const t=this.$refs.reorderContainer;const{RegionCodes:r,RegionLinks:a}=await i.importAsync("category-regions");this.regionCodes=r;this.regionLinks=a;const{Reorder:o}=await i.importAsync("reorder");const s=new o(t);this.reorder=s;s.addEventListener("reorder",i=>{const t=i.detail;for(const i of t){const{element:t,order:r}=i;e.simpleHomeCategoryOrders[t.getAttribute("data-key")]=r}e.simpleHomeCategoryOrders=e.simpleHomeCategoryOrders})},methods:{getOrder(i){return e.simpleHomeCategoryOrders[i]},checkAds(){if("ads"in e.simpleHomeCategoryOrders){e.simpleHomeCategoryOrders.information=e.simpleHomeCategoryOrders.ads;delete e.simpleHomeCategoryOrders.ads;e.simpleHomeCategoryOrders=e.simpleHomeCategoryOrders}},selectTab(e){if(this.selectedTab===e.key&&this.regionLinks){const i=this.regionLinks[e.key];window.open(`https://www.bilibili.com/${i}`,"_blank")}else{this.selectedTab=e.key}}},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:4;width:calc((var(--card-width) + 16px) * var(--card-count));padding-bottom:16px;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(i,t)=>{const e=`
`;t.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:()=>t.importAsync("slideshow-cards.vue"),RankList:()=>t.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"]),rankLink(){if(this.rid===165){return null}let i="all";if(this.rid===177||this.rid===23||this.rid===11){i="cinema"}return`https://www.bilibili.com/ranking/${i}/${this.rid}/0/3`}},methods:{async loadCards(i,t,e){if(e===undefined){e=(i=>{const t=getUID();const e=_.get(i,"data.archives",[]);return e.map(i=>{return{id:i.aid,aid:i.aid,coverUrl:i.pic.replace("http:","https:"),title:i.title,upName:i.owner.name,upFaceUrl:i.owner.face.replace("http:","https:"),upID:i.owner.mid,playCount:i.stat.view,danmakuCount:i.stat.danmaku,like:i.stat.like,coins:i.stat.coin,description:i.desc,type:i.tname,watchlater:t?this.watchlaterList.includes(i.aid):null}})})}try{this[i].loading=true;const a=await Ajax.getJson(t);if(a.code!==0){this[i].error=true}this[i].videos=e(a)}catch(t){logError(t);this[i].error=true}finally{this[i].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`,i=>{const t=getUID();const e=i.data;return e.map(i=>{return{id:i.aid,aid:parseInt(i.aid),title:i.title,playCount:i.play,favorites:i.favorites,upID:i.mid,upName:i.author,description:i.description,coverUrl:i.pic.replace("http:","https:"),coins:i.coins,durationText:i.duration,points:i.pts,watchlater:t?this.watchlaterList.includes(parseInt(i.aid)):null}})})},...Vuex.mapActions(["toggleWatchlater"]),updateVideos(){this.loadNewActivity();this.loadNewPost();this.loadRank()}},watch:{rid(i){if(i>0){if(this.loaded){this.updateVideos()}}else{console.warn(`rid=${i}`)}}},mounted(){const i=new IntersectionObserver(()=>{this.updateVideos();this.loaded=true;i.disconnect()});i.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}`; diff --git a/bilibili-evolved.user.js b/bilibili-evolved.user.js index 89daf4fe8..b76d6458a 100644 --- a/bilibili-evolved.user.js +++ b/bilibili-evolved.user.js @@ -1259,7 +1259,7 @@ onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/mi onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/blur-video-control.min.js"] = (()=>{return(o,e)=>{const l=async()=>{const o=await SpinQuery.count(".bui-slider .bui-track.bui-track-video-progress,.bilibili-player-video-control-bottom",2);o.forEach(o=>{if(!o.classList.contains("video-control-blur-container")){o.classList.add("video-control-blur-container");o.insertAdjacentHTML("afterbegin",`
`)}})};e.applyStyle("blurVideoControlStyle");Observer.videoChange(l);return{reload:()=>{document.querySelectorAll(".video-control-blur-layer").forEach(o=>o.style.display="block");e.applyStyle("blurVideoControlStyle")},unload:()=>{document.querySelectorAll(".video-control-blur-layer").forEach(o=>o.style.display="none");e.removeStyle("blurVideoControlStyle")}}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/bvid-convert.min.css"] = `.bvid-convert{border:2px solid #8882;border-radius:8px;padding:6px 8px;margin:4px 0;order:-1;width:100%;box-sizing:border-box;user-select:text}.bvid-convert-item{font-size:14px}`; onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/bvid-convert.min.js"] = (()=>{return(i,e)=>{const n=["https://www.bilibili.com/video/","https://www.bilibili.com/bangumi/"].some(i=>document.URL.startsWith(i));if(i.preferAvUrl&&document.URL.startsWith("https://www.bilibili.com/video/")){SpinQuery.select(()=>unsafeWindow.aid).then(i=>{if(!i){return}const e=document.URL.replace(/\/(video|bangumi)\/(BV[\w]+)/,(e,n)=>{return`/${n}/av${i}`});if(document.URL!==e){history.replaceState({},document.title,e)}})}return{widget:{content:`
`,condition:async()=>{if(n){return Boolean(await SpinQuery.select(()=>unsafeWindow.aid||unsafeWindow.bvid))}else{return false}},success:()=>{e.applyStyle("bvidConvertStyle");const i=dq(".bvid-convert");const n=(()=>{if(unsafeWindow.bvid){return unsafeWindow.bvid}const i=dq(".av-link,.bv-link,.bvid-link");return i.innerHTML||"未找到BV号"})();i.innerHTML=`\n
av${unsafeWindow.aid}
\n
${n}
\n`}}}}})(); -onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/category-regions.min.js"] = (()=>{return(i,n)=>{const e={anime:1,bangumi:13,china:167,manga:-1,music:3,dance:129,game:4,tech:36,digital:188,life:160,kichiku:119,fashion:155,information:202,entertainment:5,column:-1,movie:23,tv:11,film:181,documentary:177};const a={anime:"v/douga",bangumi:"anime",china:"guochuang",manga:"",music:"v/music",dance:"v/dance",game:"v/game",tech:"v/technology",digital:"v/digital",life:"v/life",kichiku:"v/kichiku",fashion:"v/fashion",information:"v/information/",entertainment:"v/ent",column:"",movie:"v/cinephile",tv:"tv",film:"cinema",documentary:"documentary"};return{export:{RegionCodes:e,RegionLinks:a}}}})(); +onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/category-regions.min.js"] = (()=>{return(i,n)=>{const e={anime:1,bangumi:13,china:167,manga:-1,music:3,dance:129,game:4,tech:36,digital:188,life:160,kichiku:119,fashion:155,information:202,entertainment:5,column:-1,movie:181,tv:11,film:23,documentary:177};const a={anime:"v/douga",bangumi:"anime",china:"guochuang",manga:"",music:"v/music",dance:"v/dance",game:"v/game",tech:"v/technology",digital:"v/digital",life:"v/life",kichiku:"v/kichiku",fashion:"v/fashion",information:"v/information/",entertainment:"v/ent",column:"",movie:"v/cinephile",tv:"tv",film:"cinema",documentary:"documentary"};return{export:{RegionCodes:e,RegionLinks:a}}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/clear-cache.min.js"] = (()=>{return(n,c)=>{return{widget:{content:`\n\n\n清除缓存\n`,condition:()=>typeof offlineData==="undefined",success:()=>{$("#clear-cache").on("click",()=>{n.cache={};Toast.success("已删除全部缓存.","清除缓存",5e3)})}}}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/collapse-live-side-bar.min.css"] = `.side-bar-cntr{transition:.24s ease-out!important;overflow:visible!important;transform:translateZ(0) translateX(100%)!important}.side-bar-cntr:hover{transform:translateZ(0)!important}.side-bar-cntr::after{right:calc(100% + 4px);transform:translateY(-50%) rotate(45deg);width:8px;height:8px;border-radius:2px;box-sizing:border-box;border:4px solid #aaa;border-top-color:transparent;border-right-color:transparent}body.dark .side-bar-cntr::after{border:4px solid #eee;border-top-color:transparent;border-right-color:transparent}.side-bar-cntr::before{right:calc(100% - 8px);transform:translateY(-50%);width:32px;height:48px;border-radius:8px 0 0 8px;background-color:#fff;border:1px solid #e9eaec}body.dark .side-bar-cntr::before{background-color:#222;border-color:transparent}.side-bar-cntr::after,.side-bar-cntr::before{content:"";transition:.24s ease-out;cursor:pointer;position:fixed;top:50%}.side-bar-cntr:hover::after,.side-bar-cntr:hover::before{opacity:0}`; onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/collapse-live-side-bar.min.js"] = (()=>{return(e,l)=>{return l.toggleStyle("collapseLiveSideBarStyle")}})(); @@ -1445,7 +1445,7 @@ onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/mi onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/show-dead-video-title.min.js"] = (()=>{return(e,t)=>{(async()=>{if(!document.URL.startsWith("https://space.bilibili.com")){return}class t{}class i extends t{convertToDeadVideoInfo(e,t){return{aid:e,title:t.title,cover:t.pic}}async queryInfo(e){const t=[];if(e.length<=i.MaxCountPerRequest){const s=await Ajax.getJson(`${i.BiliplusHost}/api/aidinfo?aid=${e.join(",")}`);if(s.code===0){t.push(...e.map(e=>{if(e in s.data){return this.convertToDeadVideoInfo(e,s.data[e])}else{return{aid:e,title:"已失效视频",cover:""}}}))}else{console.error(`[显示失效视频信息] Biliplus API 未成功. message=${s.message}`)}}else{t.push(...await this.queryInfo(e.slice(0,i.MaxCountPerRequest)));t.push(...await this.queryInfo(e.slice(i.MaxCountPerRequest)))}return t}}i.BiliplusHost=`https://hd.biliplus.com`;i.MaxCountPerRequest=30;class s extends t{async toggleWatchlater(e,t){for(const i of t){await Ajax.postTextWithCredentials(`https://api.bilibili.com/x/v2/history/toview/${e?"add":"del"}`,`aid=${i}&csrf=${getCsrf()}}`)}}async queryInfo(e){const t=[];await this.toggleWatchlater(true,e);const i=await Ajax.getJsonWithCredentials("https://api.bilibili.com/x/v2/history/toview/web");if(i.code===0){const s=i.data.list.map(e=>{return{aid:e.aid.toString(),title:e.title,cover:e.pic}});t.push(...e.map(e=>s.find(t=>t.aid===e)).filter(e=>e!==undefined));await this.toggleWatchlater(false,e)}else{console.error(`[显示失效视频信息] 稍后再看 API 未成功. message=${i.message}`)}return t}}const a=await SpinQuery.select("#app>.s-space");if(!a){return}Observer.childListSubtree(a,async()=>{const t=dqa(".disabled[data-aid]");if(t.length===0){return}const a=t.map(e=>e.getAttribute("data-aid"));const o=e.deadVideoTitleProvider==="BiliPlus"?new i:new s;const r=await o.queryInfo(a);console.log(`[显示失效视频信息]`,`deadVideos:`,t,`infos:`,r);t.forEach((t,i)=>{t.classList.remove("disabled");const s=t.getAttribute("data-aid");const a=(()=>{if(e.useBiliplusRedirect){return`https://hd.biliplus.com/video/av${s}`}else{return`//www.bilibili.com/video/av${s}`}})();const o=r.find(e=>e.aid===s);console.log(`[显示失效视频信息]`,"#"+i,o);if(o===undefined){console.error(`[显示失效视频信息]信息获取失败, aid=${s}`);return}const n=t.querySelector("a.cover");n.target="_blank";n.href=a;if(o.cover!==""){n.querySelector("img").src=o.cover.replace("http:","https:")}const l=t.querySelector("a.title");l.target="_blank";l.title=o.title;l.href=a;l.innerText=o.title})})})()}})(); 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:auto 1fr 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:1100px){.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 .info-row{display:none}.simple-home .feeds,.simple-home .trendings{transform:translateX(0)}}`,"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"},rankLink(){return this.rid===13?"https://www.bilibili.com/ranking/bangumi/13/0/3":"https://www.bilibili.com/ranking/bangumi/167/0/3"}},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,i)=>{const t=`
分区
{{t.name}}
{{reordering ? '完成' : '排序'}}
`;i.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 r={anime:"动画",bangumi:"番剧",china:"国创",music:"音乐",dance:"舞蹈",game:"游戏",tech:"科技",digital:"数码",life:"生活",kichiku:"鬼畜",fashion:"时尚",information:"资讯",entertainment:"娱乐",movie:"电影",tv:"TV剧",film:"影视",documentary:"纪录片"};return{export:Object.assign({template:t},{components:{Icon:()=>i.importAsync("icon.vue"),NormalCategory:()=>i.importAsync("simple-home-normal-category.vue"),BangumiCategory:()=>i.importAsync("simple-home-bangumi-category.vue")},data(){return{tabs:Object.entries(r).map(([e,i])=>{return{key:e,name:i}}),selectedTab:Object.entries(e.simpleHomeCategoryOrders).sort((e,i)=>e[1]-i[1])[0][0],reordering:false,reorder:null,regionCodes:null,regionLinks:null}},async mounted(){this.checkAds();const t=this.$refs.reorderContainer;const{RegionCodes:r,RegionLinks:a}=await i.importAsync("category-regions");this.regionCodes=r;this.regionLinks=a;const{Reorder:o}=await i.importAsync("reorder");const s=new o(t);this.reorder=s;s.addEventListener("reorder",i=>{const t=i.detail;for(const i of t){const{element:t,order:r}=i;e.simpleHomeCategoryOrders[t.getAttribute("data-key")]=r}e.simpleHomeCategoryOrders=e.simpleHomeCategoryOrders})},methods:{getOrder(i){return e.simpleHomeCategoryOrders[i]},checkAds(){if("ads"in e.simpleHomeCategoryOrders){e.simpleHomeCategoryOrders.information=e.simpleHomeCategoryOrders.ads;delete e.simpleHomeCategoryOrders.ads;e.simpleHomeCategoryOrders=e.simpleHomeCategoryOrders}},selectTab(e){if(this.selectedTab===e.key&&this.regionLinks){const i=this.regionLinks[e.key];window.open(`https://www.bilibili.com/${i}`,"_blank")}else{this.selectedTab=e.key}}},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-categories.vue.min.js"] = (()=>{return(e,i)=>{const t=`
分区
{{t.name}}
{{reordering ? '完成' : '排序'}}
`;i.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 r={anime:"动画",bangumi:"番剧",china:"国创",music:"音乐",dance:"舞蹈",game:"游戏",tech:"科技",digital:"数码",life:"生活",kichiku:"鬼畜",fashion:"时尚",information:"资讯",entertainment:"娱乐",movie:"影视",tv:"TV剧",film:"放映厅",documentary:"纪录片"};return{export:Object.assign({template:t},{components:{Icon:()=>i.importAsync("icon.vue"),NormalCategory:()=>i.importAsync("simple-home-normal-category.vue"),BangumiCategory:()=>i.importAsync("simple-home-bangumi-category.vue")},data(){return{tabs:Object.entries(r).map(([e,i])=>{return{key:e,name:i}}),selectedTab:Object.entries(e.simpleHomeCategoryOrders).sort((e,i)=>e[1]-i[1])[0][0],reordering:false,reorder:null,regionCodes:null,regionLinks:null}},async mounted(){this.checkAds();const t=this.$refs.reorderContainer;const{RegionCodes:r,RegionLinks:a}=await i.importAsync("category-regions");this.regionCodes=r;this.regionLinks=a;const{Reorder:o}=await i.importAsync("reorder");const s=new o(t);this.reorder=s;s.addEventListener("reorder",i=>{const t=i.detail;for(const i of t){const{element:t,order:r}=i;e.simpleHomeCategoryOrders[t.getAttribute("data-key")]=r}e.simpleHomeCategoryOrders=e.simpleHomeCategoryOrders})},methods:{getOrder(i){return e.simpleHomeCategoryOrders[i]},checkAds(){if("ads"in e.simpleHomeCategoryOrders){e.simpleHomeCategoryOrders.information=e.simpleHomeCategoryOrders.ads;delete e.simpleHomeCategoryOrders.ads;e.simpleHomeCategoryOrders=e.simpleHomeCategoryOrders}},selectTab(e){if(this.selectedTab===e.key&&this.regionLinks){const i=this.regionLinks[e.key];window.open(`https://www.bilibili.com/${i}`,"_blank")}else{this.selectedTab=e.key}}},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:4;width:calc((var(--card-width) + 16px) * var(--card-count));padding-bottom:16px;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(i,t)=>{const e=`
`;t.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:()=>t.importAsync("slideshow-cards.vue"),RankList:()=>t.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"]),rankLink(){if(this.rid===165){return null}let i="all";if(this.rid===177||this.rid===23||this.rid===11){i="cinema"}return`https://www.bilibili.com/ranking/${i}/${this.rid}/0/3`}},methods:{async loadCards(i,t,e){if(e===undefined){e=(i=>{const t=getUID();const e=_.get(i,"data.archives",[]);return e.map(i=>{return{id:i.aid,aid:i.aid,coverUrl:i.pic.replace("http:","https:"),title:i.title,upName:i.owner.name,upFaceUrl:i.owner.face.replace("http:","https:"),upID:i.owner.mid,playCount:i.stat.view,danmakuCount:i.stat.danmaku,like:i.stat.like,coins:i.stat.coin,description:i.desc,type:i.tname,watchlater:t?this.watchlaterList.includes(i.aid):null}})})}try{this[i].loading=true;const a=await Ajax.getJson(t);if(a.code!==0){this[i].error=true}this[i].videos=e(a)}catch(t){logError(t);this[i].error=true}finally{this[i].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`,i=>{const t=getUID();const e=i.data;return e.map(i=>{return{id:i.aid,aid:parseInt(i.aid),title:i.title,playCount:i.play,favorites:i.favorites,upID:i.mid,upName:i.author,description:i.description,coverUrl:i.pic.replace("http:","https:"),coins:i.coins,durationText:i.duration,points:i.pts,watchlater:t?this.watchlaterList.includes(parseInt(i.aid)):null}})})},...Vuex.mapActions(["toggleWatchlater"]),updateVideos(){this.loadNewActivity();this.loadNewPost();this.loadRank()}},watch:{rid(i){if(i>0){if(this.loaded){this.updateVideos()}}else{console.warn(`rid=${i}`)}}},mounted(){const i=new IntersectionObserver(()=>{this.updateVideos();this.loaded=true;i.disconnect()});i.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}`; diff --git a/min/bundle.json b/min/bundle.json index 2d23b70bf..ee3da1346 100644 --- a/min/bundle.json +++ b/min/bundle.json @@ -20,7 +20,7 @@ "blur-video-control.min.js": "00A2AC837FC455DF2AED7D0C350265C7438CC6F5C203F085E19639DDB86D0E11", "bvid-convert.min.css": "F49ED1B27A86CC3957226474EE15E86D5B11974A2C9D6D4968B375222C802FD0", "bvid-convert.min.js": "19B9ECDC5B9E96884E093A0537757865F1D006DCC3FC8B9FD93D88EB0D99A2B5", - "category-regions.min.js": "75B36FF220C1BE8131CF9E9B1366530D1435E25166B7CD916A62C8959CFBF964", + "category-regions.min.js": "F646D084B252E37B85F4A6A9976ECE3E6E331CF0E554B1BF6F885C38E69406F1", "clear-cache.min.js": "9AB1536D8278DA681831A589AD1414425BF206B36AE109FB4EC1E8A685BB2A9F", "collapse-live-side-bar.min.css": "22348786547D2D8DB659A306AF2E9C1F2050D66488778C71545AAEF785FD57E6", "collapse-live-side-bar.min.js": "BB1B1CF157099A70F1AEA3F154C84D9CA1A84A29B5F6E42357CA9F51FFC4965C", @@ -194,7 +194,7 @@ "show-dead-video-title.min.js": "8D591930421EBA43A1BDF50DC8B645C1BD1A17E109FB1CFBCD6B78E6C74E1D68", "simple-home.vue.min.js": "1F5CF46DEE65549A30C5F0790578EED0C6B3AD6C5F20D9B88CD745C4B7664ABB", "simple-home-bangumi-category.vue.min.js": "87DCA2C8295CAD66C9FA01D65437EC2F9DD5E7F4A565B4384ABAB1746A6787EE", - "simple-home-categories.vue.min.js": "9F8198B04200457F5A0A7AB9A105DD6A1602F4DA67899EDBF546D64F06CEECB9", + "simple-home-categories.vue.min.js": "0A7D20E0489FAA3DF0A62669ABF42568E8006FFAAB8392E58524645C2E922245", "simple-home-feeds.vue.min.js": "FD8536D04043817395063E889E0C5A3C6158CDCD794A26398C635B8772EBA32B", "simple-home-normal-category.vue.min.js": "55B700EF840DBD1E9F5C249739DC24F80B4FEF96082169EC484E944A5189D6E6", "simplify-home.min.css": "50F0FA046D61ECE5183409CF97C8DBECB4CF64918DF813CD2B39BF9FBD314B42", diff --git a/min/bundle.zip b/min/bundle.zip index f6cc58fc3..f98da7e49 100644 Binary files a/min/bundle.zip and b/min/bundle.zip differ diff --git a/min/category-regions.min.js b/min/category-regions.min.js index fb613c08f..b4a364da8 100644 --- a/min/category-regions.min.js +++ b/min/category-regions.min.js @@ -1 +1 @@ -(()=>{return(i,n)=>{const e={anime:1,bangumi:13,china:167,manga:-1,music:3,dance:129,game:4,tech:36,digital:188,life:160,kichiku:119,fashion:155,information:202,entertainment:5,column:-1,movie:23,tv:11,film:181,documentary:177};const a={anime:"v/douga",bangumi:"anime",china:"guochuang",manga:"",music:"v/music",dance:"v/dance",game:"v/game",tech:"v/technology",digital:"v/digital",life:"v/life",kichiku:"v/kichiku",fashion:"v/fashion",information:"v/information/",entertainment:"v/ent",column:"",movie:"v/cinephile",tv:"tv",film:"cinema",documentary:"documentary"};return{export:{RegionCodes:e,RegionLinks:a}}}})(); \ No newline at end of file +(()=>{return(i,n)=>{const e={anime:1,bangumi:13,china:167,manga:-1,music:3,dance:129,game:4,tech:36,digital:188,life:160,kichiku:119,fashion:155,information:202,entertainment:5,column:-1,movie:181,tv:11,film:23,documentary:177};const a={anime:"v/douga",bangumi:"anime",china:"guochuang",manga:"",music:"v/music",dance:"v/dance",game:"v/game",tech:"v/technology",digital:"v/digital",life:"v/life",kichiku:"v/kichiku",fashion:"v/fashion",information:"v/information/",entertainment:"v/ent",column:"",movie:"v/cinephile",tv:"tv",film:"cinema",documentary:"documentary"};return{export:{RegionCodes:e,RegionLinks:a}}}})(); \ No newline at end of file diff --git a/min/simple-home-categories.vue.min.js b/min/simple-home-categories.vue.min.js index e8a499dfc..9b0ed6943 100644 --- a/min/simple-home-categories.vue.min.js +++ b/min/simple-home-categories.vue.min.js @@ -1 +1 @@ -(()=>{return(e,i)=>{const t=`
分区
{{t.name}}
{{reordering ? '完成' : '排序'}}
`;i.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 r={anime:"动画",bangumi:"番剧",china:"国创",music:"音乐",dance:"舞蹈",game:"游戏",tech:"科技",digital:"数码",life:"生活",kichiku:"鬼畜",fashion:"时尚",information:"资讯",entertainment:"娱乐",movie:"电影",tv:"TV剧",film:"影视",documentary:"纪录片"};return{export:Object.assign({template:t},{components:{Icon:()=>i.importAsync("icon.vue"),NormalCategory:()=>i.importAsync("simple-home-normal-category.vue"),BangumiCategory:()=>i.importAsync("simple-home-bangumi-category.vue")},data(){return{tabs:Object.entries(r).map(([e,i])=>{return{key:e,name:i}}),selectedTab:Object.entries(e.simpleHomeCategoryOrders).sort((e,i)=>e[1]-i[1])[0][0],reordering:false,reorder:null,regionCodes:null,regionLinks:null}},async mounted(){this.checkAds();const t=this.$refs.reorderContainer;const{RegionCodes:r,RegionLinks:a}=await i.importAsync("category-regions");this.regionCodes=r;this.regionLinks=a;const{Reorder:o}=await i.importAsync("reorder");const s=new o(t);this.reorder=s;s.addEventListener("reorder",i=>{const t=i.detail;for(const i of t){const{element:t,order:r}=i;e.simpleHomeCategoryOrders[t.getAttribute("data-key")]=r}e.simpleHomeCategoryOrders=e.simpleHomeCategoryOrders})},methods:{getOrder(i){return e.simpleHomeCategoryOrders[i]},checkAds(){if("ads"in e.simpleHomeCategoryOrders){e.simpleHomeCategoryOrders.information=e.simpleHomeCategoryOrders.ads;delete e.simpleHomeCategoryOrders.ads;e.simpleHomeCategoryOrders=e.simpleHomeCategoryOrders}},selectTab(e){if(this.selectedTab===e.key&&this.regionLinks){const i=this.regionLinks[e.key];window.open(`https://www.bilibili.com/${i}`,"_blank")}else{this.selectedTab=e.key}}},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]}}}})}}})(); \ No newline at end of file +(()=>{return(e,i)=>{const t=`
分区
{{t.name}}
{{reordering ? '完成' : '排序'}}
`;i.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 r={anime:"动画",bangumi:"番剧",china:"国创",music:"音乐",dance:"舞蹈",game:"游戏",tech:"科技",digital:"数码",life:"生活",kichiku:"鬼畜",fashion:"时尚",information:"资讯",entertainment:"娱乐",movie:"影视",tv:"TV剧",film:"放映厅",documentary:"纪录片"};return{export:Object.assign({template:t},{components:{Icon:()=>i.importAsync("icon.vue"),NormalCategory:()=>i.importAsync("simple-home-normal-category.vue"),BangumiCategory:()=>i.importAsync("simple-home-bangumi-category.vue")},data(){return{tabs:Object.entries(r).map(([e,i])=>{return{key:e,name:i}}),selectedTab:Object.entries(e.simpleHomeCategoryOrders).sort((e,i)=>e[1]-i[1])[0][0],reordering:false,reorder:null,regionCodes:null,regionLinks:null}},async mounted(){this.checkAds();const t=this.$refs.reorderContainer;const{RegionCodes:r,RegionLinks:a}=await i.importAsync("category-regions");this.regionCodes=r;this.regionLinks=a;const{Reorder:o}=await i.importAsync("reorder");const s=new o(t);this.reorder=s;s.addEventListener("reorder",i=>{const t=i.detail;for(const i of t){const{element:t,order:r}=i;e.simpleHomeCategoryOrders[t.getAttribute("data-key")]=r}e.simpleHomeCategoryOrders=e.simpleHomeCategoryOrders})},methods:{getOrder(i){return e.simpleHomeCategoryOrders[i]},checkAds(){if("ads"in e.simpleHomeCategoryOrders){e.simpleHomeCategoryOrders.information=e.simpleHomeCategoryOrders.ads;delete e.simpleHomeCategoryOrders.ads;e.simpleHomeCategoryOrders=e.simpleHomeCategoryOrders}},selectTab(e){if(this.selectedTab===e.key&&this.regionLinks){const i=this.regionLinks[e.key];window.open(`https://www.bilibili.com/${i}`,"_blank")}else{this.selectedTab=e.key}}},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]}}}})}}})(); \ No newline at end of file diff --git a/src/style/simplify-home/simple-home/categories/category-regions.ts b/src/style/simplify-home/simple-home/categories/category-regions.ts index e86df69e1..5bb68b9d8 100644 --- a/src/style/simplify-home/simple-home/categories/category-regions.ts +++ b/src/style/simplify-home/simple-home/categories/category-regions.ts @@ -15,9 +15,11 @@ export const RegionCodes: { [key in keyof SimpleHomeCategoryOrders]: number } = information: 202, entertainment: 5, column: -1, - movie: 23, + // movie: 23, + movie: 181, tv: 11, - film: 181, + film: 23, + // film: 181, documentary: 177, } export const RegionLinks: { [key in keyof SimpleHomeCategoryOrders]: string } = { diff --git a/src/style/simplify-home/simple-home/categories/simple-home-categories.vue b/src/style/simplify-home/simple-home/categories/simple-home-categories.vue index e18282ac1..cbff2e7f1 100644 --- a/src/style/simplify-home/simple-home/categories/simple-home-categories.vue +++ b/src/style/simplify-home/simple-home/categories/simple-home-categories.vue @@ -16,7 +16,10 @@
-
+
{{reordering ? '完成' : '排序'}}
@@ -46,32 +49,32 @@ const tabNames = { information: '资讯', entertainment: '娱乐', // column: '专栏', - movie: '电影', + movie: '影视', tv: 'TV剧', - film: '影视', - documentary: '纪录片' + film: '放映厅', + documentary: '纪录片', } export default { components: { Icon: () => import('../../../icon.vue'), NormalCategory: () => import('./simple-home-normal-category.vue'), - BangumiCategory: () => import('./simple-home-bangumi-category.vue') + BangumiCategory: () => import('./simple-home-bangumi-category.vue'), }, data() { return { tabs: Object.entries(tabNames).map(([key, name]) => { return { key, - name + name, } }), selectedTab: Object.entries(settings.simpleHomeCategoryOrders).sort( - (a, b) => a[1] - b[1] + (a, b) => a[1] - b[1], )[0][0], reordering: false, reorder: null, regionCodes: null, - regionLinks: null + regionLinks: null, } }, async mounted() { @@ -116,7 +119,7 @@ export default { } else { this.selectedTab = tab.key } - } + }, }, computed: { content() { @@ -138,8 +141,8 @@ export default { } else { return this.regionCodes[this.selectedTab] } - } - } + }, + }, }