diff --git a/@types/global/index.d.ts b/@types/global/index.d.ts index 694918271..1e1a98ccf 100644 --- a/@types/global/index.d.ts +++ b/@types/global/index.d.ts @@ -458,6 +458,7 @@ declare global { newVersionCheckInterval: number, useDarkStyleAsUserStyle: boolean, livePip: boolean, + extendFeedsLive: boolean, latestVersionLink: string, currentVersion: string, } diff --git a/bilibili-evolved.offline.user.js b/bilibili-evolved.offline.user.js index c077842fb..8087f9a2a 100644 --- a/bilibili-evolved.offline.user.js +++ b/bilibili-evolved.offline.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name Bilibili Evolved (Offline) -// @version 646.85 +// @version 647.01 // @description Bilibili Evolved 的离线版, 所有功能都已内置于脚本中. // @author Grant Howard, Coulomb-G // @copyright 2020, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G) @@ -527,6 +527,7 @@ const settings = { useDarkStyleAsUserStyle: false, autoHideSideBar: false, livePip: true, + extendFeedsLive: true, cache: {}, } const fixedSettings = { @@ -1294,6 +1295,8 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/expand-danmaku.min.js"] = (()=>{return(e,a)=>{if(typeof isEmbeddedPlayer!=="undefined"&&isEmbeddedPlayer()){return}Observer.videoChange(async()=>{const e=await SpinQuery.select(".bui-collapse-wrap");if(e&&e.classList.contains("bui-collapse-wrap-folded")){const e=await SpinQuery.select(".bui-collapse-header");e.click()}})}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/expand-description.min.css"] = `.play-up-info .play-up-self,.video-desc .info{height:auto!important}.play-up-info .play-up-self-btn,.video-desc .btn{display:none!important}`; offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/expand-description.min.js"] = (()=>{return(e,p)=>{p.applyStyle("expandDescriptionStyle")}})(); +offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/extend-feeds-live.min.css"] = `.live-up-list .up-name{font-size:13px!important}.live-up-list .live-detail{color:#000}body.dark .live-up-list .live-detail{color:#eee}.live-up-list .live-detail[data-live-title]::before{content:attr(data-live-title);color:#000;font-weight:700;line-height:1.5;display:flex}body.dark .live-up-list .live-detail[data-live-title]::before{color:#eee}`; +offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/extend-feeds-live.min.js"] = (()=>{return(e,t)=>{(async()=>{if(document.URL.replace(location.search,"")!=="https://t.bilibili.com/"){return}const e=await SpinQuery.select(".live-up-list");t.applyStyle("extendFeedsLiveStyle");const i=await Ajax.getJsonWithCredentials(`https://api.live.bilibili.com/relation/v1/feed/feed_list?page=1&pagesize=24`);if(i.code!==0){logError(`加载直播列表失败: ${i.message}`);return}const n=_.get(i,"data.list",[]);const l=dqa(e,".up-name");const a=l.map(e=>e.innerText.trim());const o=n.filter(e=>a.includes(e.uname));const r=n.filter(e=>!a.includes(e.uname));l.forEach((e,t)=>{e.parentElement.setAttribute("data-live-title",o.find(e=>e.uname===a[t]).title)});const s=e.children[0];r.forEach(t=>{const i=s.cloneNode(true);dqa(i,"a[href]").forEach(e=>e.setAttribute("href",`https://live.bilibili.com/${t.roomid}`));const n=dq(i,".live-up-img");n.style.backgroundImage=`url(${t.face})`;const l=dq(i,".live-detail");l.setAttribute("data-live-title",t.title);const a=dq(i,".up-name");a.innerHTML=t.uname;e.insertAdjacentElement("beforeend",i)});console.log(o,r)})()}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/favorites-redirect.min.js"] = (()=>{return(t,e)=>{function i(){const t=document.querySelectorAll("li[data-aid]>a");t.forEach(t=>{const e=t.getAttribute("href");if(e===null||!e.includes("medialist")){return}const i=t.parentElement.getAttribute("data-aid");t.setAttribute("href",`https://www.bilibili.com/video/av${i}`)})}(async()=>{const t=await SpinQuery.select("#app>.s-space");if(t!==null){Observer.childListSubtree("#app>.s-space",i)}})()}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/feeds-apis.min.js"] = (()=>{return(e,t)=>{const i={repost:{id:1,name:"转发"},textWithImages:{id:2,name:"图文"},text:{id:4,name:"文字"},video:{id:8,name:"视频"},miniVideo:{id:16,name:"小视频"},column:{id:64,name:"专栏"},audio:{id:256,name:"音频"},bangumi:{id:512,name:"番剧"},share:{id:2048,name:"分享"},manga:{id:2049,name:"漫画"},film:{id:4098,name:"电影"},tv:{id:4099,name:"TV剧"},chinese:{id:4100,name:"国创"},documentary:{id:4101,name:"纪录片"},mediaList:{id:4300,name:"收藏夹"}};const n=e=>{if(e.querySelector(".repost")){return i.repost}if(e.querySelector(".imagesbox")){return i.textWithImages}if(e.querySelector(".video-container")){return i.video}if(e.querySelector(".bangumi-container")){return i.bangumi}if(e.querySelector(".article-container")){return i.column}if(e.querySelector(".music-container")){return i.audio}if(e.querySelector(".h5share-container")){return i.share}if(e.querySelector(".vc-ctnr")){return i.miniVideo}return i.text};class a extends EventTarget{constructor(){super(...arguments);this.watching=false;this.cards=[]}addEventListener(e,t,i){super.addEventListener(e,t,i)}removeEventListener(e,t,i){super.removeEventListener(e,t,i)}async addCard(e){if(e instanceof HTMLElement&&e.classList.contains("card")){if(e.querySelector(".skeleton")!==null){const t=Observer.childList(e,()=>{if(e.querySelector(".skeleton")===null){t.stop();this.addCard(e)}})}else{const t=await this.parseCard(e);this.cards.push(t);this.cards.sort((e,t)=>{if(e.id===t.id){return 0}return e.id>t.id?-1:1});const i=new CustomEvent("addCard",{detail:t});this.dispatchEvent(i)}}}async removeCard(e){if(e instanceof HTMLElement&&e.classList.contains("card")){const t=(await this.parseCard(e)).id;const i=this.cards.findIndex(e=>e.id===t);const n=this.cards[i];this.cards.splice(i,1);const a=new CustomEvent("removeCard",{detail:n});this.dispatchEvent(a)}}async parseCard(e){const t=async t=>{const i=await SpinQuery.condition(()=>e.querySelector(t),e=>e!==null);if(i===null){console.warn(e,t);return""}const n=i.innerText.trim();return n};const a=async t=>{if(t===i.bangumi){return""}const n=await SpinQuery.condition(()=>e,e=>Boolean(e.__vue__));if(n===null){console.warn(n);return""}if(t===i.repost){const e=n.__vue__.originCardData.pureText;return n.__vue__.card.item.content+"\n"+e||""}return n.__vue__.originCardData.pureText||""};const r=async e=>{const i=parseInt(await t(e));if(isNaN(i)){return 0}return i};const s={id:e.getAttribute("data-did"),username:await t(".main-content .user-name"),text:"",reposts:await r(".button-bar .single-button:nth-child(1) .text-offset"),comments:await r(".button-bar .single-button:nth-child(2) .text-offset"),likes:await r(".button-bar .single-button:nth-child(3) .text-offset"),element:e,type:n(e),async getText(){const e=await a(this.type);this.text=e;return e}};await s.getText();e.setAttribute("data-type",s.type.id.toString());return s}async startWatching(){const e=await SpinQuery.select(".card-list .content");if(!e){return false}if(this.watching){return true}this.watching=true;const t=[...e.querySelectorAll(".content>.card")];t.forEach(e=>this.addCard(e));Observer.childList(e,e=>{e.forEach(e=>{e.addedNodes.forEach(e=>this.addCard(e));e.removedNodes.forEach(e=>this.removeCard(e))})});return true}}const r=new a;const s=async(e="video")=>{if(!getUID()){return[]}const t=await Ajax.getJsonWithCredentials(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${getUID()}&type_list=${e==="video"?8:512}`);if(t.code!==0){throw new Error(t.message)}if(e==="video"){return _.uniqBy(t.data.cards.map(e=>{const t=JSON.parse(e.card);const i=_.get(e,"display.topic_info.topic_details",[]).map(e=>{return{id:e.topic_id,name:e.topic_name}});return{id:e.desc.dynamic_id_str,aid:t.aid,bvid:e.desc.bvid||t.bvid,title:t.title,upID:e.desc.user_profile.info.uid,upName:e.desc.user_profile.info.uname,upFaceUrl:e.desc.user_profile.info.face,coverUrl:t.pic,description:t.desc,timestamp:e.timestamp,time:new Date(e.timestamp*1e3),topics:i,dynamic:t.dynamic,like:formatCount(e.desc.like),duration:t.duration,durationText:formatDuration(t.duration,0),playCount:formatCount(t.stat.view),danmakuCount:formatCount(t.stat.danmaku),watchlater:store.state.watchlaterList.includes(t.aid)}}),e=>e.aid)}else if(e==="bangumi"){return t.data.cards.map(e=>{const t=JSON.parse(e.card);return{id:e.desc.dynamic_id_str,aid:t.aid,bvid:e.desc.bvid||t.bvid,epID:t.episode_id,title:t.new_desc,upName:t.apiSeasonInfo.title,upFaceUrl:t.apiSeasonInfo.cover,coverUrl:t.cover,description:"",timestamp:e.timestamp,time:new Date(e.timestamp*1e3),like:formatCount(e.desc.like),durationText:"",playCount:formatCount(t.play_count),danmakuCount:formatCount(t.bullet_count),watchlater:false}})}else{return[]}};return{export:{feedsCardsManager:r,feedsCardTypes:i,getVideoFeeds:s}}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/feeds-filter.min.js"] = (()=>{return(e,t)=>{(async()=>{if(document.URL.replace(location.search,"")!=="https://t.bilibili.com/"){return}const e=await SpinQuery.select(".home-container .left-panel .scroll-content");if(e===null){return}e.insertAdjacentHTML("afterbegin",html``);new Vue({el:"feeds-filter-card",components:{FeedsFilterCard:()=>t.importAsync("feeds-filter-card.vue")}})})();return{reload:()=>document.body.classList.remove("disable-feeds-filter"),unload:()=>document.body.classList.add("disable-feeds-filter")}}})(); @@ -1304,7 +1307,7 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/ffmpeg-support.min.js"] = (()=>{return(e,t)=>{const n=[".mp4",".m4a"];const r=(e,t,n)=>{if(e<2){return null}const r=[];for(let s=1;s<=e;s++){let e=` - ${s}`;if(n.includes(".m4a")){e=""}const l=escapeFilename(`${t}${e}${n[s-1]}`).replace(/'/g,"'\\''");r.push(`file '${l}'`)}return r.join("\n")};const s=(e,t)=>{const r=e=>e.fragments.length>1;const s=e.filter(r);if(s.length===0){return null}const l=new Map;s.forEach(e=>{l.set(escapeFilename(`ffmpeg-files-${e.title}.txt`),e.fragments.map((r,s)=>{let l=` - ${s+1}`;if(t===true){l=""}const a=escapeFilename(`${e.title}${l}${t===true?n[s]:t}`).replace(/'/g,"'\\''");return`file '${a}'`}).join("\n"))});return l};const l=(e,t)=>{const r=[];e.forEach(e=>{e.fragments.forEach((s,l)=>{let a="";if(e.fragments.length>1&&t!==true){a=` - ${l+1}`}const c=escapeFilename(`${e.title}${a}${t===true?n[l]:t}`).replace(/'/g,"'\\''");r.push(`file '${c}'`)})});return r.join("\n")};return{export:{getFragmentsList:r,getBatchFragmentsList:s,getBatchEpisodesList:l}}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/fill-with-comments.min.js"] = (()=>{return(t,e)=>{const n="fill-with-comments-style";const l=t=>{};return{export:{fillWithComments:l}}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/filter-type-switch.vue.min.js"] = (()=>{return(e,s)=>{const i=`
`;return{export:Object.assign({template:i},{components:{Icon:()=>s.importAsync("icon.vue")},props:["name","type"],methods:{setFilter(s,i=true){document.body.classList[s?"add":"remove"](`feeds-filter-block-${this.name}`);if(!i){return}if(s){e.feedsFilterTypes.push(this.type.id)}else{const s=e.feedsFilterTypes.indexOf(this.type.id);if(s!==-1){e.feedsFilterTypes.splice(s,1)}}e.feedsFilterTypes=e.feedsFilterTypes}},data(){const s=e.feedsFilterTypes.includes(this.type.id);this.setFilter(s,false);return{disabled:s}},watch:{disabled(e){this.setFilter(e)}}})}}})(); -offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/fixed-sidebars.min.js"] = (()=>{return(n,t)=>{const a=`\n.custom-navbar {\n position: fixed !important;\n}\n.sticky-bar {\n display: none !important;\n}\n.left-panel, .right-panel {\n position: fixed !important;\n}\n.center-panel {\n margin-left: calc(244px + 8px) !important;\n}\n.right-panel {\n margin-left: calc(244px + 16px + 632px) !important;\n}\n`;const e="fixed-sidebars-style";const i=()=>{if(document.URL.replace(location.search,"")==="https://t.bilibili.com/"){t.applyStyleFromText(a,e)}};const o=()=>dqa("#"+e).forEach(n=>n.remove());i();return{reload:i,unload:o}}})(); +offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/fixed-sidebars.min.js"] = (()=>{return(n,t)=>{const e=`\n.custom-navbar {\n position: fixed !important;\n}\n.sticky-bar {\n display: none !important;\n}\n.left-panel, .right-panel {\n position: fixed !important;\n}\n.center-panel {\n margin-left: calc(244px + 8px) !important;\n}\n.right-panel {\n margin-left: calc(244px + 16px + 632px) !important;\n}\n.live-panel .live-up-list {\n max-height: calc(100vh - 200px);\n overflow: auto;\n scrollbar-width: none !important;\n}\n.live-panel .live-up-list::-webkit-scrollbar {\n height: 0 !important;\n width: 0 !important;\n}\n`;const i="fixed-sidebars-style";let a=true;if(document.URL.replace(location.search,"")==="https://t.bilibili.com/"){(async()=>{const n=await SpinQuery.select(".live-up-list");if(n!==null){n.addEventListener("mouseenter",n=>{if(a){n.stopImmediatePropagation()}},{capture:true})}})()}const l=()=>{if(document.URL.replace(location.search,"")==="https://t.bilibili.com/"){t.applyStyleFromText(e,i);a=true}};const o=()=>{dqa("#"+i).forEach(n=>n.remove());a=false};l();return{reload:l,unload:o}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/fix-fullscreen.min.js"] = (()=>{return(e,n)=>{unsafeWindow.Element.ALLOW_KEYBOARD_INPUT={};const t=unsafeWindow.Element.prototype.requestFullscreen;unsafeWindow.Element.prototype.requestFullscreen=function(){t.call(this)}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/fold-comment.min.css"] = `.panel-area .bb-comment .fold-comment{position:-webkit-sticky;position:sticky;bottom:0;height:40px;width:calc(100% + 48px);font-size:14px;transform:translateX(-24px);display:flex;align-items:center;justify-content:center;background-color:#fff;color:#99a2aa;cursor:pointer;transition:.2s ease-out;z-index:1000;border-radius:4px}.panel-area .bb-comment .fold-comment:hover{color:#000}body.dark .panel-area .bb-comment .fold-comment{background-color:#444;color:#eee}body.dark .panel-area .bb-comment .fold-comment:hover{color:var(--theme-color)}`; offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/fold-comment.min.js"] = (()=>{return(e,t)=>{if(document.URL.replace(window.location.search,"")==="https://t.bilibili.com/"){(async()=>{t.applyImportantStyle("foldCommentStyle");const e=await SpinQuery.select(".card-list .feed-card>.content");const l=e=>{const t=t=>{const l=document.createElement("div");l.classList.add("fold-comment");l.innerHTML="收起评论";const n=t.querySelector(".bb-comment");if(n===null){console.error("未找到评论区");return}else if(n.querySelector(".fold-comment")!==null){return}else{l.addEventListener("click",()=>{const t=e.querySelector(".button-bar").children[1];if(t!==null){t.click();e.scrollIntoView()}});n.insertAdjacentElement("beforeend",l)}};const l=e.querySelector(".panel-area");if(l===null){console.log(e)}if(l.childElementCount===0){const e=Observer.childList(l,n=>{if(n.length>0){t(l);e.forEach(e=>e.stop())}})}else{t(l)}};Observer.childList(e,()=>e.querySelectorAll("div.card").forEach(l))})()}}})(); @@ -1317,7 +1320,7 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/full-tweets-title.min.css"] = `.dynamic-m .info{height:auto!important}.dynamic-m .info a{white-space:normal!important}`; offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/full-tweets-title.min.js"] = (()=>{return(t,n)=>{const i=`\n.dynamic-m .info {\n height: auto !important;\n}\n.dynamic-m .info a {\n white-space: normal !important;\n}\n.custom-navbar .video-activity-card .title {\n display: block !important;\n max-height: unset !important;\n}\n.custom-navbar .video-activity-card .cover {\n height: unset !important;\n}\n`;return n.toggleStyle(i,"full-tweets-title")}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/gui-settings.min.css"] = `.gui-settings-icon-panel{height:auto;display:flex;flex-direction:column;justify-content:center;align-items:center;position:fixed;top:calc(50% + var(--side-bar-offset));left:0;width:32px;z-index:99999;transform:translateY(-50%);user-select:none}.gui-settings-icon-panel i{transition:.2s;opacity:.6;transform:rotate(360deg);font-size:12px}.gui-settings,.gui-settings-widgets{display:flex;justify-content:center;align-items:center;cursor:pointer;-webkit-tap-highlight-color:transparent;margin:16px 0;width:24px;height:24px;transition:.2s;opacity:1;transform-origin:center!important;transform:translateX(-16px);background-color:#dddc;border-radius:0 50% 50% 0;padding:6px;box-sizing:content-box}.gui-settings-widgets:hover i,.gui-settings:hover i{opacity:.75;transform:rotate(0)}body.dark .gui-settings,body.dark .gui-settings-widgets{background-color:rgba(0,0,0,.3)}.gui-settings-widgets:hover,.gui-settings:hover{opacity:1;transform:translateX(0)}.gui-settings-footer,.gui-settings-header{flex-grow:0;display:flex;align-items:center;justify-content:space-between;flex-shrink:0;padding:32px 24px 32px 32px}.gui-settings-header .operations{margin-left:16px;cursor:pointer;position:relative}.gui-settings-header .operations,.gui-settings-header .operations *{transition:.2s ease-out}.gui-settings-header .operations .mdi{font-size:20px}.gui-settings-header .operations .operations-menu{transition-delay:.2s;position:absolute;top:calc(100% + 8px);right:0;display:flex;flex-direction:column;opacity:0;transform-origin:top;transform:scaleY(0);z-index:102;background-color:#fff;border-radius:8px;box-shadow:0 2px 4px 1px #0002}body.dark .gui-settings-header .operations .operations-menu{background-color:#333}.gui-settings-header .operations .operations-menu .operation{display:flex;align-items:center;padding:8px 16px;white-space:nowrap;font-size:14px;border-radius:8px}.gui-settings-header .operations .operations-menu .operation .mdi{margin-right:8px}.gui-settings-header .operations .operations-menu .operation:hover{background-color:#8882}.gui-settings-header .operations:hover .operations-menu{opacity:1;transform:scaleY(1)}.gui-settings-footer{height:80px;justify-content:center;position:relative}.gui-settings-content{flex-grow:1;overflow:auto;position:relative;overscroll-behavior:contain}.gui-settings-content ul{padding:0;margin:0}.gui-settings-content ul li{font-size:16px;margin-bottom:18px;display:flex;height:24px;transition:.2s;box-sizing:content-box}.gui-settings-content ul li.disabled,.gui-settings-content ul li:not(.category).folded{height:0;margin:0;overflow:hidden}.gui-settings-content ul li.indent-0{margin-left:16px}.gui-settings-content ul li.indent-1{margin-left:80px}.gui-settings-content ul li.indent-2{margin-left:144px}.gui-settings-content ul li.indent-center{align-items:center;justify-content:center}.gui-settings-content ul li.category{padding:16px 0;margin-bottom:18px;border-top:1px dashed #8884;border-bottom:1px dashed #8884;background:#fff;position:-webkit-sticky;position:sticky;top:0;z-index:101;cursor:pointer;transition:.2s ease-out;-webkit-tap-highlight-color:transparent}.gui-settings-content ul li.category.folded{margin-bottom:-1px}.gui-settings-content ul li.category *{opacity:.8}.gui-settings-title{font-size:16pt;flex:0 0 auto}.gui-settings-box .gui-settings-title{margin-right:64px}.gui-settings-search[type=text]{flex:1 0 auto;height:auto;border:none;padding:6px;font-size:12pt;width:40%;border-bottom:1px solid #8884;transition:.2s;color:inherit;background:0 0;box-sizing:border-box;outline:0!important}.gui-settings-close{width:24px;height:24px;padding:16px}.gui-settings-header .gui-settings-close{cursor:pointer;-webkit-tap-highlight-color:transparent}.gui-settings-textbox-container{display:flex;justify-content:center;align-items:center;-webkit-tap-highlight-color:transparent}.gui-settings-textbox-container span{margin:0 16px;transition:.2s}.gui-settings-textbox-container input{border:none;height:100%;max-width:90px;padding:4px 8px!important;background:#8884;transition:.2s;font-size:16px}.gui-settings-textbox-container input:disabled,.gui-settings-textbox-container.disabled div,.gui-settings-textbox-container.disabled span{opacity:.5}.gui-settings-textbox-container input[key=batchFilenameFormat],.gui-settings-textbox-container input[key=filenameFormat]{max-width:500px}.gui-settings-dropdown-span{margin:0 16px;transition:.2s}.gui-settings-checkbox-container{cursor:pointer;display:flex;width:100%;justify-content:start;align-items:center;padding:0 16px;-webkit-tap-highlight-color:transparent}.gui-settings-checkbox-container .gui-settings-checkbox{width:28px;margin-right:24px;height:12px;background:#8884;border-radius:16px;position:relative}.gui-settings-checkbox-container .gui-settings-checkbox::after{content:"";width:20px;height:20px;background:#c6c6c6;position:absolute;border-radius:50%;top:-4px;left:-4px;box-shadow:0 2px 4px 0 #0003;transition:.2s ease-out}.gui-settings-checkbox-container .gui-settings-ok{width:24px;height:24px;margin-right:16px;transition:.2s}.gui-settings-checkbox-container input{visibility:collapse;transition:.2s;width:0;position:absolute}.gui-settings-checkbox-container input:checked~.gui-settings-checkbox{background:var(--theme-color-80)}.gui-settings-checkbox-container input:checked~.gui-settings-checkbox::after{background:var(--theme-color)!important;box-shadow:0 2px 4px 0 var(--theme-color-40);left:calc(100% - 16px)}.gui-settings-checkbox-container input:disabled~.gui-settings-checkbox{opacity:.5}.gui-settings-checkbox-container input~.gui-settings-ok{background-color:#8884}.gui-settings-checkbox-container input:checked~.gui-settings-ok{background-color:var(--theme-color)}.gui-settings-checkbox-container input~.gui-settings-ok>i{opacity:0;transform-origin:center;transform:scale(.9)}.gui-settings-checkbox-container input:checked~.gui-settings-ok>i{opacity:1}.gui-settings-checkbox-container input:disabled~.gui-settings-ok,.gui-settings-checkbox-container input:disabled~span{opacity:.5}button.gui-settings-button{padding:6px 20px;margin:0 4px;max-height:34px;border:none;background:#8884;font-size:16px;cursor:pointer;transition:.2s ease-out;font-family:inherit;-webkit-tap-highlight-color:transparent}button.gui-settings-button:hover{opacity:.9}button.gui-settings-button:active{opacity:.8}button.gui-settings-button:focus{outline:0}.custom-color-preview{width:28px;height:28px;border-radius:50%;background:var(--theme-color);margin-right:16px;position:relative;cursor:pointer;box-sizing:border-box;box-shadow:0 2px 4px 0 var(--theme-color-40)}.predefined-colors{transition:.2s;display:flex;opacity:0;background:#fff;width:168px;height:168px;position:absolute;box-shadow:rgba(0,0,0,.2) 0 4px 8px 0;top:32px;left:calc(-84px + 50%);transform:scale(0);transform-origin:top;z-index:9}.predefined-colors.opened{opacity:1;transform:scale(1)}.predefined-colors-grid{display:grid;grid-template-columns:auto auto auto auto;margin:0;flex-grow:1}.predefined-colors-grid-block{width:100%;height:100%;justify-self:center;align-self:center;cursor:pointer;transform-origin:center;transition:.1s ease-out}.predefined-colors-grid-block:hover{transform:scale(1.1);box-shadow:0 0 8px 1px #0004}input[key]:focus{outline:0}input[type=text][key]{height:auto;border:none;line-height:normal}.gui-settings-label{margin:0 16px;font-size:16px}.hidden{display:none!important}@supports (backdrop-filter:blur(24px)) or (-webkit-backdrop-filter:blur(24px)){.gui-settings-box.blur li.category{-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px);background:0 0}.gui-settings-box.blur{background:#fff8}.gui-settings-box.blur .gui-settings-content,.gui-settings-box.blur .gui-settings-footer,.gui-settings-box.blur .gui-settings-header{background:#fff8;-webkit-backdrop-filter:blur(64px);backdrop-filter:blur(64px)}}li.category i.icon-arrow{transition:.2s ease-out}li.category.folded i.icon-arrow{transform:rotate(180deg)}.gui-settings-dropdown-container{display:flex;align-items:center}.gui-settings-dropdown{position:relative;cursor:pointer;-webkit-tap-highlight-color:transparent;background-color:#8884;display:inline-flex;align-items:center;height:32px}.gui-settings-dropdown>i{transition:.2s ease-out;transform-origin:center;transform:rotate(180deg)}.gui-settings-dropdown>ul{position:absolute;top:calc(100%);width:100%;cursor:pointer;background:#fff;transform-origin:top;transform:scaleY(0);transition:.2s cubic-bezier(.6,-.28,.74,.05);display:flex;flex-direction:column;align-items:center;box-shadow:rgba(0,0,0,.2) 0 4px 8px 0;z-index:102}.gui-settings-dropdown ul li{margin:0;padding:8px 0;height:auto;width:100%;justify-content:center}.gui-settings-dropdown ul li:hover{background:rgba(0,0,0,.16)}.gui-settings-dropdown.opened>ul{transform:scaleY(1);transition-timing-function:cubic-bezier(.18,.89,.32,1.28)}.gui-settings-dropdown.opened>i{transform:rotate(0)}.gui-settings-dropdown input{cursor:pointer;border:none;height:100%;max-width:80px;padding:4px 8px;transition:.2s;font-size:16px;background-color:transparent}.gui-settings-dropdown input[key=defaultPlayerMode]{max-width:120px}.gui-settings-dropdown input[key=scriptLoadingMode]{max-width:170px}.gui-settings-dropdown input[key=defaultBangumiLayout],.gui-settings-dropdown input[key=defaultPlayerLayout],.gui-settings-dropdown input[key=defaultVideoSpeed]{max-width:50px}.gui-settings-mask{height:calc(100% + 5px);width:calc(100% + 5px);opacity:0;background:#000a;position:fixed;top:0;left:0;z-index:99999;pointer-events:none;transition:.3s cubic-bezier(0,.86,.58,1);overscroll-behavior:contain}.gui-settings-mask.opened{opacity:1;pointer-events:initial}.gui-settings-mask.opened.transparent{opacity:0;transition:.3s cubic-bezier(0,.86,.58,1) .3s}.gui-settings-box,.gui-settings-widgets-box{height:100%;width:420px;background:#fff;color:#000;position:fixed;top:0;left:0;z-index:100001;transform:translateX(-101%);transition:.3s cubic-bezier(0,.86,.58,1);display:none;flex-direction:column;box-shadow:4px 0 16px 0 #0000;user-select:none}.gui-settings-box.loaded,.gui-settings-widgets-box.loaded{display:flex}.gui-settings-box.opened,.gui-settings-widgets-box.opened{transform:translateX(0);box-shadow:4px 0 16px 0 #0005}.gui-settings-box kbd,.gui-settings-widgets-box kbd{padding:0 4px;border-radius:4px;border:1px solid #ccc;color:#ccc;border-bottom-width:3px;margin:0 4px}.gui-settings-box li i.downloading,.gui-settings-widgets-box li i.downloading{margin-left:8px;font-style:normal;display:flex;align-items:center;font-size:14px;background:var(--theme-color);color:var(--foreground-color);padding:2px 8px}.gui-settings-widgets-box{min-width:210px;width:auto}.gui-settings-widgets-box>.title{margin:32px;font-size:16pt}.gui-settings-widgets-box>.widgets-container{padding:32px;display:flex;flex-direction:column;align-items:start;justify-content:start;position:relative;overscroll-behavior:contain;overflow:auto;height:100%;scrollbar-width:none!important}.gui-settings-widgets-box>.widgets-container::-webkit-scrollbar{height:0!important;width:0!important}.gui-settings-widgets-box>.widgets-container .empty-tip{font-size:10pt;display:none}.gui-settings-widgets-box>.widgets-container .empty-tip.show{display:block}.gui-settings-widgets-box>.gui-settings-header{justify-content:start}.gui-settings-flat-button,.gui-settings-flat-button a,.gui-settings-flat-button a:hover{display:flex;align-items:center;justify-content:center;color:inherit}.gui-settings-flat-button{width:auto;white-space:nowrap;padding:8px 16px;background:#8882;border:none;color:#000;cursor:pointer;transition:.2s ease-out;font-size:10pt;flex:0 0 auto;margin:4px;border-radius:20px;box-shadow:#0004 0 2px 4px;height:40px;box-sizing:border-box;-webkit-tap-highlight-color:transparent!important}.gui-settings-flat-button:disabled{opacity:.5;cursor:not-allowed}.gui-settings-flat-button:hover:not(:disabled){background:#8884}.gui-settings-flat-button:active:not(:disabled){border-bottom-color:var(--theme-color)}.gui-settings-flat-button:focus{outline:0}.gui-settings-flat-button i{margin-right:8px;line-height:24px;height:24px}.gui-settings-flat-button .popup{position:absolute;top:calc(100% + 2px);transition:.2s ease-out;transform:translateX(-50%) translateY(-6px);opacity:0;pointer-events:none;left:50%;background:#fff;box-shadow:rgba(0,0,0,.2) 0 4px 8px 0;z-index:200;display:flex;flex-direction:column;align-items:center;width:max-content}.gui-settings-flat-button .popup *{transition:.2s}.gui-settings-flat-button .popup.opened{transform:translateX(-50%) translateY(0);opacity:1;pointer-events:initial}.gui-settings-flat-button .popup ul{list-style:none;margin:0;padding:0}.gui-settings-header>i{margin-right:8px}.player-full-win .app-content,.player-full-win .live-room-app .app-content,.player-mode-webfullscreen .player-module{z-index:100000!important}body.round-corner{--corner-radius:4px;--large-corner-radius:8px}body.round-corner .gui-settings-box li i.downloading,body.round-corner .gui-settings-dropdown,body.round-corner .gui-settings-dropdown ul li,body.round-corner .gui-settings-dropdown>ul,body.round-corner .gui-settings-flat-button .popup,body.round-corner .gui-settings-textbox-container input{border-radius:var(--corner-radius)}.gui-settings-dock-right .gui-settings-icon-panel{right:0;left:unset}.gui-settings-dock-right .gui-settings-icon-panel .gui-settings,.gui-settings-dock-right .gui-settings-icon-panel .gui-settings-widgets{transform:translateX(16px);border-radius:50% 0 0 50%}.gui-settings-dock-right .gui-settings-icon-panel .gui-settings-widgets:hover,.gui-settings-dock-right .gui-settings-icon-panel .gui-settings:hover{transform:translateX(0)}.gui-settings-dock-right .gui-settings-box,.gui-settings-dock-right .gui-settings-widgets-box{right:0;left:unset;transform:translateX(101%)}.gui-settings-dock-right .gui-settings-box.opened,.gui-settings-dock-right .gui-settings-widgets-box.opened{transform:translateX(0)}.gui-settings-dock-right .gui-settings-tooltip{right:440px;left:unset}.gui-settings-auto-hide-side-bar .gui-settings,.gui-settings-auto-hide-side-bar .gui-settings-widgets{transform:translateX(-36px)}.gui-settings-auto-hide-side-bar .gui-settings-icon-panel:hover .gui-settings,.gui-settings-auto-hide-side-bar .gui-settings-icon-panel:hover .gui-settings-widgets{transform:translateX(-16px)}.gui-settings-auto-hide-side-bar .gui-settings-icon-panel:hover .gui-settings-widgets:hover,.gui-settings-auto-hide-side-bar .gui-settings-icon-panel:hover .gui-settings:hover{transform:translateX(0)}.gui-settings-auto-hide-side-bar.gui-settings-dock-right .gui-settings,.gui-settings-auto-hide-side-bar.gui-settings-dock-right .gui-settings-widgets{transform:translateX(36px)}.gui-settings-auto-hide-side-bar.gui-settings-dock-right .gui-settings-icon-panel:hover .gui-settings,.gui-settings-auto-hide-side-bar.gui-settings-dock-right .gui-settings-icon-panel:hover .gui-settings-widgets{transform:translateX(16px)}.gui-settings-auto-hide-side-bar.gui-settings-dock-right .gui-settings-icon-panel:hover .gui-settings-widgets:hover,.gui-settings-auto-hide-side-bar.gui-settings-dock-right .gui-settings-icon-panel:hover .gui-settings:hover{transform:translateX(0)}::-webkit-scrollbar{width:5px!important;height:5px!important}::-webkit-scrollbar-corner,::-webkit-scrollbar-track{background:0 0!important}::-webkit-resizer,::-webkit-scrollbar-thumb{background:#aaa;border-radius:3px}::-webkit-scrollbar-thumb:hover{background:#888}*{scrollbar-color:#aaa transparent;scrollbar-width:thin!important}`; -offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/gui-settings.min.html"] = `
附加功能
空空如也哦 = ̄ω ̄=
设置
导出设置
导入设置
`; +offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/gui-settings.min.html"] = `
附加功能
空空如也哦 = ̄ω ̄=
设置
导出设置
导入设置
`; offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/gui-settings.min.js"] = (()=>{return(e,t)=>{const{ThemeColors:n}=t.import("theme-colors");const{SettingsSearch:i}=t.import("settings-search");const{Validator:s}=t.import("text-validate");let o=[];let c=[];let a=[];function r(e){let t=e.nextElementSibling;const n=[];while(t!==null&&!t.classList.contains("category")){n.push(t);t=t.nextElementSibling}return n}function l(){a.forEach(t=>t.value=e[t.getAttribute("key")]);c.forEach(t=>t.checked=e[t.getAttribute("key")])}function d(){document.querySelector(".gui-settings-mask").addEventListener("click",()=>{document.querySelectorAll(".gui-settings-widgets-box,.gui-settings-box,.gui-settings-mask,.bilibili-evolved-about").forEach(e=>e.classList.remove("opened"))});a.forEach(t=>{t.setAttribute("placeholder",e[t.getAttribute("key")])});document.querySelectorAll(".gui-settings-content ul li.category").forEach(e=>{e.addEventListener("click",e=>{const t=document.querySelector(".gui-settings-search");if(t.value!==""){t.value="";raiseEvent(t,"input")}e.currentTarget.classList.toggle("folded");r(e.currentTarget).forEach(e=>e.classList.toggle("folded"))})});document.querySelectorAll(".gui-settings-dropdown>input").forEach(e=>{e.addEventListener("click",e=>{e.currentTarget.parentElement.classList.toggle("opened")})});dqa(".gui-settings-header .operation").forEach(t=>{t.addEventListener("click",t=>{if(t.target.classList.contains("export")){const t=document.createElement("a");t.style.display="none";const n=URL.createObjectURL(new Blob([JSON.stringify(_.omit(e,"cache"))]));t.href=n;t.download="bilibili-evolved-settings.json";document.body.insertAdjacentElement("beforeend",t);t.click();URL.revokeObjectURL(n);t.remove()}else if(t.target.classList.contains("import")){const t=document.createElement("input");t.style.display="none";t.type="file";t.accept=".json,text/json";document.body.insertAdjacentElement("beforeend",t);t.addEventListener("change",async()=>{try{const n=t.files[0];const i=JSON.parse(await new Response(n).text());for(const[t,n]of Object.entries(i)){if(t in e&&t!=="cache"){e[t]=n}}Toast.success("已成功导入设置, 部分设置需要刷新后生效.","导入设置",3e3)}catch(e){Toast.error("选择的设置文件无效.","导入设置",3e3)}finally{t.remove()}},{once:true});t.click()}})})}function u(){c.forEach(t=>{t.addEventListener("change",()=>{const n=t.getAttribute("key");const i=t.checked;e[n]=i})});a.forEach(t=>{t.addEventListener("change",()=>{const n=t.getAttribute("key");const i=s.getValidator(n).validate(t.value);e[n]=i;t.value=i})})}function g(){const e=o.map(e=>[e.getAttribute("dependencies").split(" ").map(e=>o.find(t=>t.getAttribute("key")===e)),e]);const t=e=>e.nodeName.toUpperCase()==="LI"?e:t(e.parentElement);e.forEach(([e,n])=>{if(e[0]===undefined){return}const i=()=>{if(e.every(e=>e.checked)){t(n).classList.remove("disabled")}else{t(n).classList.add("disabled")}};e.forEach(e=>e.addEventListener("change",i));i()})}function f(){if(typeof offlineData!=="undefined"){}}function m(){if(window.devicePixelRatio===1){o.find(e=>e.getAttribute("key")==="harunaScale").disabled=true;o.find(e=>e.getAttribute("key")==="imageResolution").disabled=true;e.harunaScale=false;e.imageResolution=false}}function y(){for(const[e,t]of Object.entries(Resource.displayNames)){const n=o.find(t=>t.getAttribute("key")===e);if(!n){continue}switch(n.type){case"checkbox":n.nextElementSibling.nextElementSibling.innerHTML=t;break;case"text":const e=n.parentElement;if(e.classList.contains("gui-settings-textbox-container")){n.previousElementSibling.innerHTML=t}else if(e.classList.contains("gui-settings-dropdown")){e.previousElementSibling.innerHTML=t}break;default:break}}}(async()=>{t.applyStyle("guiSettingsStyle");t.applyImportantStyle("iconsStyle");document.body.classList.add("round-corner");const e=document.body&&unsafeWindow.parent.window!==unsafeWindow;if(e){document.querySelector(".gui-settings-icon-panel").style.display="none"}addSettingsListener("guiSettingsDockSide",e=>{document.body.classList.toggle("gui-settings-dock-right",e==="右侧")},true);addSettingsListener("autoHideSideBar",e=>{document.body.classList.toggle("gui-settings-auto-hide-side-bar",e)},true);const s=t.data.guiSettingsHtml.text;document.body.insertAdjacentHTML("beforeend",s);const{style:r}=await t.importAsync("mdi");if(!r){document.body.insertAdjacentHTML("afterbegin",``)}const p=document.querySelector(".widgets-container");const b=p.querySelector(".empty-tip");Observer.childList(p,()=>{if(p.childElementCount<=1){b.classList.add("show")}else{b.classList.remove("show")}});const h=document.querySelectorAll(".gui-settings-widgets-box,.gui-settings-box");const E=document.querySelector(".gui-settings-icon-panel");E.addEventListener("mouseover",async()=>{const{loadTooltip:e}=await t.importAsync("settings-tooltip.loader");await e();await t.applyDropdownOptions();t.applyWidgets();raiseEvent(E,"be:load");const s=dq(".bilibili-evolved-about");if(s){raiseEvent(s,"be:about-load")}(new n).setupDom();h.forEach(e=>e.classList.add("loaded"));o=[...document.querySelectorAll("input[key]")];c=o.filter(e=>e.type==="checkbox");a=o.filter(e=>e.type==="text"&&!e.parentElement.classList.contains("gui-settings-dropdown"));d();f();l();g();u();m();y();new i},{once:true})})()}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/haruna-scale.min.js"] = (()=>{return(n,e)=>{const t="haruna-scale";const a=()=>{if(document.getElementById(t)===null){e.applyStyleFromText(`\n .haruna-ctnr,\n .avatar-btn\n {\n transform: scale(${1/window.devicePixelRatio}) !important;\n }\n`,t)}};a();return{reload:a,unload:()=>{const n=document.getElementById(t);n&&n.remove()}}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/hide-bangumi-reviews.min.js"] = (()=>{return(e,n)=>{return n.toggleStyle(`\n #review_module { display: none !important; }\n`,`hide-bangumi-reviews-style`)}})(); @@ -2434,6 +2437,13 @@ Resource.manifest = { livePip: '直播画中画', }, }, + extendFeedsLive: { + path: 'extend-feeds-live.min.js', + style: true, + displayNames: { + extendFeedsLive: '直播信息扩充', + }, + }, } const resourceManifest = Resource.manifest diff --git a/bilibili-evolved.preview-offline.user.js b/bilibili-evolved.preview-offline.user.js index c1eaa2d43..0eb83fc7b 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 646.85 +// @version 647.01 // @description Bilibili Evolved 的预览离线版, 可以抢先体验新功能, 并且所有功能都已内置于脚本中. // @author Grant Howard, Coulomb-G // @copyright 2020, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G) @@ -527,6 +527,7 @@ const settings = { useDarkStyleAsUserStyle: false, autoHideSideBar: false, livePip: true, + extendFeedsLive: true, cache: {}, } const fixedSettings = { @@ -1294,6 +1295,8 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/expand-danmaku.min.js"] = (()=>{return(e,a)=>{if(typeof isEmbeddedPlayer!=="undefined"&&isEmbeddedPlayer()){return}Observer.videoChange(async()=>{const e=await SpinQuery.select(".bui-collapse-wrap");if(e&&e.classList.contains("bui-collapse-wrap-folded")){const e=await SpinQuery.select(".bui-collapse-header");e.click()}})}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/expand-description.min.css"] = `.play-up-info .play-up-self,.video-desc .info{height:auto!important}.play-up-info .play-up-self-btn,.video-desc .btn{display:none!important}`; offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/expand-description.min.js"] = (()=>{return(e,p)=>{p.applyStyle("expandDescriptionStyle")}})(); +offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/extend-feeds-live.min.css"] = `.live-up-list .up-name{font-size:13px!important}.live-up-list .live-detail{color:#000}body.dark .live-up-list .live-detail{color:#eee}.live-up-list .live-detail[data-live-title]::before{content:attr(data-live-title);color:#000;font-weight:700;line-height:1.5;display:flex}body.dark .live-up-list .live-detail[data-live-title]::before{color:#eee}`; +offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/extend-feeds-live.min.js"] = (()=>{return(e,t)=>{(async()=>{if(document.URL.replace(location.search,"")!=="https://t.bilibili.com/"){return}const e=await SpinQuery.select(".live-up-list");t.applyStyle("extendFeedsLiveStyle");const i=await Ajax.getJsonWithCredentials(`https://api.live.bilibili.com/relation/v1/feed/feed_list?page=1&pagesize=24`);if(i.code!==0){logError(`加载直播列表失败: ${i.message}`);return}const n=_.get(i,"data.list",[]);const l=dqa(e,".up-name");const a=l.map(e=>e.innerText.trim());const o=n.filter(e=>a.includes(e.uname));const r=n.filter(e=>!a.includes(e.uname));l.forEach((e,t)=>{e.parentElement.setAttribute("data-live-title",o.find(e=>e.uname===a[t]).title)});const s=e.children[0];r.forEach(t=>{const i=s.cloneNode(true);dqa(i,"a[href]").forEach(e=>e.setAttribute("href",`https://live.bilibili.com/${t.roomid}`));const n=dq(i,".live-up-img");n.style.backgroundImage=`url(${t.face})`;const l=dq(i,".live-detail");l.setAttribute("data-live-title",t.title);const a=dq(i,".up-name");a.innerHTML=t.uname;e.insertAdjacentElement("beforeend",i)});console.log(o,r)})()}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/favorites-redirect.min.js"] = (()=>{return(t,e)=>{function i(){const t=document.querySelectorAll("li[data-aid]>a");t.forEach(t=>{const e=t.getAttribute("href");if(e===null||!e.includes("medialist")){return}const i=t.parentElement.getAttribute("data-aid");t.setAttribute("href",`https://www.bilibili.com/video/av${i}`)})}(async()=>{const t=await SpinQuery.select("#app>.s-space");if(t!==null){Observer.childListSubtree("#app>.s-space",i)}})()}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/feeds-apis.min.js"] = (()=>{return(e,t)=>{const i={repost:{id:1,name:"转发"},textWithImages:{id:2,name:"图文"},text:{id:4,name:"文字"},video:{id:8,name:"视频"},miniVideo:{id:16,name:"小视频"},column:{id:64,name:"专栏"},audio:{id:256,name:"音频"},bangumi:{id:512,name:"番剧"},share:{id:2048,name:"分享"},manga:{id:2049,name:"漫画"},film:{id:4098,name:"电影"},tv:{id:4099,name:"TV剧"},chinese:{id:4100,name:"国创"},documentary:{id:4101,name:"纪录片"},mediaList:{id:4300,name:"收藏夹"}};const n=e=>{if(e.querySelector(".repost")){return i.repost}if(e.querySelector(".imagesbox")){return i.textWithImages}if(e.querySelector(".video-container")){return i.video}if(e.querySelector(".bangumi-container")){return i.bangumi}if(e.querySelector(".article-container")){return i.column}if(e.querySelector(".music-container")){return i.audio}if(e.querySelector(".h5share-container")){return i.share}if(e.querySelector(".vc-ctnr")){return i.miniVideo}return i.text};class a extends EventTarget{constructor(){super(...arguments);this.watching=false;this.cards=[]}addEventListener(e,t,i){super.addEventListener(e,t,i)}removeEventListener(e,t,i){super.removeEventListener(e,t,i)}async addCard(e){if(e instanceof HTMLElement&&e.classList.contains("card")){if(e.querySelector(".skeleton")!==null){const t=Observer.childList(e,()=>{if(e.querySelector(".skeleton")===null){t.stop();this.addCard(e)}})}else{const t=await this.parseCard(e);this.cards.push(t);this.cards.sort((e,t)=>{if(e.id===t.id){return 0}return e.id>t.id?-1:1});const i=new CustomEvent("addCard",{detail:t});this.dispatchEvent(i)}}}async removeCard(e){if(e instanceof HTMLElement&&e.classList.contains("card")){const t=(await this.parseCard(e)).id;const i=this.cards.findIndex(e=>e.id===t);const n=this.cards[i];this.cards.splice(i,1);const a=new CustomEvent("removeCard",{detail:n});this.dispatchEvent(a)}}async parseCard(e){const t=async t=>{const i=await SpinQuery.condition(()=>e.querySelector(t),e=>e!==null);if(i===null){console.warn(e,t);return""}const n=i.innerText.trim();return n};const a=async t=>{if(t===i.bangumi){return""}const n=await SpinQuery.condition(()=>e,e=>Boolean(e.__vue__));if(n===null){console.warn(n);return""}if(t===i.repost){const e=n.__vue__.originCardData.pureText;return n.__vue__.card.item.content+"\n"+e||""}return n.__vue__.originCardData.pureText||""};const r=async e=>{const i=parseInt(await t(e));if(isNaN(i)){return 0}return i};const s={id:e.getAttribute("data-did"),username:await t(".main-content .user-name"),text:"",reposts:await r(".button-bar .single-button:nth-child(1) .text-offset"),comments:await r(".button-bar .single-button:nth-child(2) .text-offset"),likes:await r(".button-bar .single-button:nth-child(3) .text-offset"),element:e,type:n(e),async getText(){const e=await a(this.type);this.text=e;return e}};await s.getText();e.setAttribute("data-type",s.type.id.toString());return s}async startWatching(){const e=await SpinQuery.select(".card-list .content");if(!e){return false}if(this.watching){return true}this.watching=true;const t=[...e.querySelectorAll(".content>.card")];t.forEach(e=>this.addCard(e));Observer.childList(e,e=>{e.forEach(e=>{e.addedNodes.forEach(e=>this.addCard(e));e.removedNodes.forEach(e=>this.removeCard(e))})});return true}}const r=new a;const s=async(e="video")=>{if(!getUID()){return[]}const t=await Ajax.getJsonWithCredentials(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${getUID()}&type_list=${e==="video"?8:512}`);if(t.code!==0){throw new Error(t.message)}if(e==="video"){return _.uniqBy(t.data.cards.map(e=>{const t=JSON.parse(e.card);const i=_.get(e,"display.topic_info.topic_details",[]).map(e=>{return{id:e.topic_id,name:e.topic_name}});return{id:e.desc.dynamic_id_str,aid:t.aid,bvid:e.desc.bvid||t.bvid,title:t.title,upID:e.desc.user_profile.info.uid,upName:e.desc.user_profile.info.uname,upFaceUrl:e.desc.user_profile.info.face,coverUrl:t.pic,description:t.desc,timestamp:e.timestamp,time:new Date(e.timestamp*1e3),topics:i,dynamic:t.dynamic,like:formatCount(e.desc.like),duration:t.duration,durationText:formatDuration(t.duration,0),playCount:formatCount(t.stat.view),danmakuCount:formatCount(t.stat.danmaku),watchlater:store.state.watchlaterList.includes(t.aid)}}),e=>e.aid)}else if(e==="bangumi"){return t.data.cards.map(e=>{const t=JSON.parse(e.card);return{id:e.desc.dynamic_id_str,aid:t.aid,bvid:e.desc.bvid||t.bvid,epID:t.episode_id,title:t.new_desc,upName:t.apiSeasonInfo.title,upFaceUrl:t.apiSeasonInfo.cover,coverUrl:t.cover,description:"",timestamp:e.timestamp,time:new Date(e.timestamp*1e3),like:formatCount(e.desc.like),durationText:"",playCount:formatCount(t.play_count),danmakuCount:formatCount(t.bullet_count),watchlater:false}})}else{return[]}};return{export:{feedsCardsManager:r,feedsCardTypes:i,getVideoFeeds:s}}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/feeds-filter.min.js"] = (()=>{return(e,t)=>{(async()=>{if(document.URL.replace(location.search,"")!=="https://t.bilibili.com/"){return}const e=await SpinQuery.select(".home-container .left-panel .scroll-content");if(e===null){return}e.insertAdjacentHTML("afterbegin",html``);new Vue({el:"feeds-filter-card",components:{FeedsFilterCard:()=>t.importAsync("feeds-filter-card.vue")}})})();return{reload:()=>document.body.classList.remove("disable-feeds-filter"),unload:()=>document.body.classList.add("disable-feeds-filter")}}})(); @@ -1304,7 +1307,7 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/ffmpeg-support.min.js"] = (()=>{return(e,t)=>{const n=[".mp4",".m4a"];const r=(e,t,n)=>{if(e<2){return null}const r=[];for(let s=1;s<=e;s++){let e=` - ${s}`;if(n.includes(".m4a")){e=""}const l=escapeFilename(`${t}${e}${n[s-1]}`).replace(/'/g,"'\\''");r.push(`file '${l}'`)}return r.join("\n")};const s=(e,t)=>{const r=e=>e.fragments.length>1;const s=e.filter(r);if(s.length===0){return null}const l=new Map;s.forEach(e=>{l.set(escapeFilename(`ffmpeg-files-${e.title}.txt`),e.fragments.map((r,s)=>{let l=` - ${s+1}`;if(t===true){l=""}const a=escapeFilename(`${e.title}${l}${t===true?n[s]:t}`).replace(/'/g,"'\\''");return`file '${a}'`}).join("\n"))});return l};const l=(e,t)=>{const r=[];e.forEach(e=>{e.fragments.forEach((s,l)=>{let a="";if(e.fragments.length>1&&t!==true){a=` - ${l+1}`}const c=escapeFilename(`${e.title}${a}${t===true?n[l]:t}`).replace(/'/g,"'\\''");r.push(`file '${c}'`)})});return r.join("\n")};return{export:{getFragmentsList:r,getBatchFragmentsList:s,getBatchEpisodesList:l}}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/fill-with-comments.min.js"] = (()=>{return(t,e)=>{const n="fill-with-comments-style";const l=t=>{};return{export:{fillWithComments:l}}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/filter-type-switch.vue.min.js"] = (()=>{return(e,s)=>{const i=`
`;return{export:Object.assign({template:i},{components:{Icon:()=>s.importAsync("icon.vue")},props:["name","type"],methods:{setFilter(s,i=true){document.body.classList[s?"add":"remove"](`feeds-filter-block-${this.name}`);if(!i){return}if(s){e.feedsFilterTypes.push(this.type.id)}else{const s=e.feedsFilterTypes.indexOf(this.type.id);if(s!==-1){e.feedsFilterTypes.splice(s,1)}}e.feedsFilterTypes=e.feedsFilterTypes}},data(){const s=e.feedsFilterTypes.includes(this.type.id);this.setFilter(s,false);return{disabled:s}},watch:{disabled(e){this.setFilter(e)}}})}}})(); -offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/fixed-sidebars.min.js"] = (()=>{return(n,t)=>{const a=`\n.custom-navbar {\n position: fixed !important;\n}\n.sticky-bar {\n display: none !important;\n}\n.left-panel, .right-panel {\n position: fixed !important;\n}\n.center-panel {\n margin-left: calc(244px + 8px) !important;\n}\n.right-panel {\n margin-left: calc(244px + 16px + 632px) !important;\n}\n`;const e="fixed-sidebars-style";const i=()=>{if(document.URL.replace(location.search,"")==="https://t.bilibili.com/"){t.applyStyleFromText(a,e)}};const o=()=>dqa("#"+e).forEach(n=>n.remove());i();return{reload:i,unload:o}}})(); +offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/fixed-sidebars.min.js"] = (()=>{return(n,t)=>{const e=`\n.custom-navbar {\n position: fixed !important;\n}\n.sticky-bar {\n display: none !important;\n}\n.left-panel, .right-panel {\n position: fixed !important;\n}\n.center-panel {\n margin-left: calc(244px + 8px) !important;\n}\n.right-panel {\n margin-left: calc(244px + 16px + 632px) !important;\n}\n.live-panel .live-up-list {\n max-height: calc(100vh - 200px);\n overflow: auto;\n scrollbar-width: none !important;\n}\n.live-panel .live-up-list::-webkit-scrollbar {\n height: 0 !important;\n width: 0 !important;\n}\n`;const i="fixed-sidebars-style";let a=true;if(document.URL.replace(location.search,"")==="https://t.bilibili.com/"){(async()=>{const n=await SpinQuery.select(".live-up-list");if(n!==null){n.addEventListener("mouseenter",n=>{if(a){n.stopImmediatePropagation()}},{capture:true})}})()}const l=()=>{if(document.URL.replace(location.search,"")==="https://t.bilibili.com/"){t.applyStyleFromText(e,i);a=true}};const o=()=>{dqa("#"+i).forEach(n=>n.remove());a=false};l();return{reload:l,unload:o}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/fix-fullscreen.min.js"] = (()=>{return(e,n)=>{unsafeWindow.Element.ALLOW_KEYBOARD_INPUT={};const t=unsafeWindow.Element.prototype.requestFullscreen;unsafeWindow.Element.prototype.requestFullscreen=function(){t.call(this)}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/fold-comment.min.css"] = `.panel-area .bb-comment .fold-comment{position:-webkit-sticky;position:sticky;bottom:0;height:40px;width:calc(100% + 48px);font-size:14px;transform:translateX(-24px);display:flex;align-items:center;justify-content:center;background-color:#fff;color:#99a2aa;cursor:pointer;transition:.2s ease-out;z-index:1000;border-radius:4px}.panel-area .bb-comment .fold-comment:hover{color:#000}body.dark .panel-area .bb-comment .fold-comment{background-color:#444;color:#eee}body.dark .panel-area .bb-comment .fold-comment:hover{color:var(--theme-color)}`; offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/fold-comment.min.js"] = (()=>{return(e,t)=>{if(document.URL.replace(window.location.search,"")==="https://t.bilibili.com/"){(async()=>{t.applyImportantStyle("foldCommentStyle");const e=await SpinQuery.select(".card-list .feed-card>.content");const l=e=>{const t=t=>{const l=document.createElement("div");l.classList.add("fold-comment");l.innerHTML="收起评论";const n=t.querySelector(".bb-comment");if(n===null){console.error("未找到评论区");return}else if(n.querySelector(".fold-comment")!==null){return}else{l.addEventListener("click",()=>{const t=e.querySelector(".button-bar").children[1];if(t!==null){t.click();e.scrollIntoView()}});n.insertAdjacentElement("beforeend",l)}};const l=e.querySelector(".panel-area");if(l===null){console.log(e)}if(l.childElementCount===0){const e=Observer.childList(l,n=>{if(n.length>0){t(l);e.forEach(e=>e.stop())}})}else{t(l)}};Observer.childList(e,()=>e.querySelectorAll("div.card").forEach(l))})()}}})(); @@ -1317,7 +1320,7 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/full-tweets-title.min.css"] = `.dynamic-m .info{height:auto!important}.dynamic-m .info a{white-space:normal!important}`; offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/full-tweets-title.min.js"] = (()=>{return(t,n)=>{const i=`\n.dynamic-m .info {\n height: auto !important;\n}\n.dynamic-m .info a {\n white-space: normal !important;\n}\n.custom-navbar .video-activity-card .title {\n display: block !important;\n max-height: unset !important;\n}\n.custom-navbar .video-activity-card .cover {\n height: unset !important;\n}\n`;return n.toggleStyle(i,"full-tweets-title")}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/gui-settings.min.css"] = `.gui-settings-icon-panel{height:auto;display:flex;flex-direction:column;justify-content:center;align-items:center;position:fixed;top:calc(50% + var(--side-bar-offset));left:0;width:32px;z-index:99999;transform:translateY(-50%);user-select:none}.gui-settings-icon-panel i{transition:.2s;opacity:.6;transform:rotate(360deg);font-size:12px}.gui-settings,.gui-settings-widgets{display:flex;justify-content:center;align-items:center;cursor:pointer;-webkit-tap-highlight-color:transparent;margin:16px 0;width:24px;height:24px;transition:.2s;opacity:1;transform-origin:center!important;transform:translateX(-16px);background-color:#dddc;border-radius:0 50% 50% 0;padding:6px;box-sizing:content-box}.gui-settings-widgets:hover i,.gui-settings:hover i{opacity:.75;transform:rotate(0)}body.dark .gui-settings,body.dark .gui-settings-widgets{background-color:rgba(0,0,0,.3)}.gui-settings-widgets:hover,.gui-settings:hover{opacity:1;transform:translateX(0)}.gui-settings-footer,.gui-settings-header{flex-grow:0;display:flex;align-items:center;justify-content:space-between;flex-shrink:0;padding:32px 24px 32px 32px}.gui-settings-header .operations{margin-left:16px;cursor:pointer;position:relative}.gui-settings-header .operations,.gui-settings-header .operations *{transition:.2s ease-out}.gui-settings-header .operations .mdi{font-size:20px}.gui-settings-header .operations .operations-menu{transition-delay:.2s;position:absolute;top:calc(100% + 8px);right:0;display:flex;flex-direction:column;opacity:0;transform-origin:top;transform:scaleY(0);z-index:102;background-color:#fff;border-radius:8px;box-shadow:0 2px 4px 1px #0002}body.dark .gui-settings-header .operations .operations-menu{background-color:#333}.gui-settings-header .operations .operations-menu .operation{display:flex;align-items:center;padding:8px 16px;white-space:nowrap;font-size:14px;border-radius:8px}.gui-settings-header .operations .operations-menu .operation .mdi{margin-right:8px}.gui-settings-header .operations .operations-menu .operation:hover{background-color:#8882}.gui-settings-header .operations:hover .operations-menu{opacity:1;transform:scaleY(1)}.gui-settings-footer{height:80px;justify-content:center;position:relative}.gui-settings-content{flex-grow:1;overflow:auto;position:relative;overscroll-behavior:contain}.gui-settings-content ul{padding:0;margin:0}.gui-settings-content ul li{font-size:16px;margin-bottom:18px;display:flex;height:24px;transition:.2s;box-sizing:content-box}.gui-settings-content ul li.disabled,.gui-settings-content ul li:not(.category).folded{height:0;margin:0;overflow:hidden}.gui-settings-content ul li.indent-0{margin-left:16px}.gui-settings-content ul li.indent-1{margin-left:80px}.gui-settings-content ul li.indent-2{margin-left:144px}.gui-settings-content ul li.indent-center{align-items:center;justify-content:center}.gui-settings-content ul li.category{padding:16px 0;margin-bottom:18px;border-top:1px dashed #8884;border-bottom:1px dashed #8884;background:#fff;position:-webkit-sticky;position:sticky;top:0;z-index:101;cursor:pointer;transition:.2s ease-out;-webkit-tap-highlight-color:transparent}.gui-settings-content ul li.category.folded{margin-bottom:-1px}.gui-settings-content ul li.category *{opacity:.8}.gui-settings-title{font-size:16pt;flex:0 0 auto}.gui-settings-box .gui-settings-title{margin-right:64px}.gui-settings-search[type=text]{flex:1 0 auto;height:auto;border:none;padding:6px;font-size:12pt;width:40%;border-bottom:1px solid #8884;transition:.2s;color:inherit;background:0 0;box-sizing:border-box;outline:0!important}.gui-settings-close{width:24px;height:24px;padding:16px}.gui-settings-header .gui-settings-close{cursor:pointer;-webkit-tap-highlight-color:transparent}.gui-settings-textbox-container{display:flex;justify-content:center;align-items:center;-webkit-tap-highlight-color:transparent}.gui-settings-textbox-container span{margin:0 16px;transition:.2s}.gui-settings-textbox-container input{border:none;height:100%;max-width:90px;padding:4px 8px!important;background:#8884;transition:.2s;font-size:16px}.gui-settings-textbox-container input:disabled,.gui-settings-textbox-container.disabled div,.gui-settings-textbox-container.disabled span{opacity:.5}.gui-settings-textbox-container input[key=batchFilenameFormat],.gui-settings-textbox-container input[key=filenameFormat]{max-width:500px}.gui-settings-dropdown-span{margin:0 16px;transition:.2s}.gui-settings-checkbox-container{cursor:pointer;display:flex;width:100%;justify-content:start;align-items:center;padding:0 16px;-webkit-tap-highlight-color:transparent}.gui-settings-checkbox-container .gui-settings-checkbox{width:28px;margin-right:24px;height:12px;background:#8884;border-radius:16px;position:relative}.gui-settings-checkbox-container .gui-settings-checkbox::after{content:"";width:20px;height:20px;background:#c6c6c6;position:absolute;border-radius:50%;top:-4px;left:-4px;box-shadow:0 2px 4px 0 #0003;transition:.2s ease-out}.gui-settings-checkbox-container .gui-settings-ok{width:24px;height:24px;margin-right:16px;transition:.2s}.gui-settings-checkbox-container input{visibility:collapse;transition:.2s;width:0;position:absolute}.gui-settings-checkbox-container input:checked~.gui-settings-checkbox{background:var(--theme-color-80)}.gui-settings-checkbox-container input:checked~.gui-settings-checkbox::after{background:var(--theme-color)!important;box-shadow:0 2px 4px 0 var(--theme-color-40);left:calc(100% - 16px)}.gui-settings-checkbox-container input:disabled~.gui-settings-checkbox{opacity:.5}.gui-settings-checkbox-container input~.gui-settings-ok{background-color:#8884}.gui-settings-checkbox-container input:checked~.gui-settings-ok{background-color:var(--theme-color)}.gui-settings-checkbox-container input~.gui-settings-ok>i{opacity:0;transform-origin:center;transform:scale(.9)}.gui-settings-checkbox-container input:checked~.gui-settings-ok>i{opacity:1}.gui-settings-checkbox-container input:disabled~.gui-settings-ok,.gui-settings-checkbox-container input:disabled~span{opacity:.5}button.gui-settings-button{padding:6px 20px;margin:0 4px;max-height:34px;border:none;background:#8884;font-size:16px;cursor:pointer;transition:.2s ease-out;font-family:inherit;-webkit-tap-highlight-color:transparent}button.gui-settings-button:hover{opacity:.9}button.gui-settings-button:active{opacity:.8}button.gui-settings-button:focus{outline:0}.custom-color-preview{width:28px;height:28px;border-radius:50%;background:var(--theme-color);margin-right:16px;position:relative;cursor:pointer;box-sizing:border-box;box-shadow:0 2px 4px 0 var(--theme-color-40)}.predefined-colors{transition:.2s;display:flex;opacity:0;background:#fff;width:168px;height:168px;position:absolute;box-shadow:rgba(0,0,0,.2) 0 4px 8px 0;top:32px;left:calc(-84px + 50%);transform:scale(0);transform-origin:top;z-index:9}.predefined-colors.opened{opacity:1;transform:scale(1)}.predefined-colors-grid{display:grid;grid-template-columns:auto auto auto auto;margin:0;flex-grow:1}.predefined-colors-grid-block{width:100%;height:100%;justify-self:center;align-self:center;cursor:pointer;transform-origin:center;transition:.1s ease-out}.predefined-colors-grid-block:hover{transform:scale(1.1);box-shadow:0 0 8px 1px #0004}input[key]:focus{outline:0}input[type=text][key]{height:auto;border:none;line-height:normal}.gui-settings-label{margin:0 16px;font-size:16px}.hidden{display:none!important}@supports (backdrop-filter:blur(24px)) or (-webkit-backdrop-filter:blur(24px)){.gui-settings-box.blur li.category{-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px);background:0 0}.gui-settings-box.blur{background:#fff8}.gui-settings-box.blur .gui-settings-content,.gui-settings-box.blur .gui-settings-footer,.gui-settings-box.blur .gui-settings-header{background:#fff8;-webkit-backdrop-filter:blur(64px);backdrop-filter:blur(64px)}}li.category i.icon-arrow{transition:.2s ease-out}li.category.folded i.icon-arrow{transform:rotate(180deg)}.gui-settings-dropdown-container{display:flex;align-items:center}.gui-settings-dropdown{position:relative;cursor:pointer;-webkit-tap-highlight-color:transparent;background-color:#8884;display:inline-flex;align-items:center;height:32px}.gui-settings-dropdown>i{transition:.2s ease-out;transform-origin:center;transform:rotate(180deg)}.gui-settings-dropdown>ul{position:absolute;top:calc(100%);width:100%;cursor:pointer;background:#fff;transform-origin:top;transform:scaleY(0);transition:.2s cubic-bezier(.6,-.28,.74,.05);display:flex;flex-direction:column;align-items:center;box-shadow:rgba(0,0,0,.2) 0 4px 8px 0;z-index:102}.gui-settings-dropdown ul li{margin:0;padding:8px 0;height:auto;width:100%;justify-content:center}.gui-settings-dropdown ul li:hover{background:rgba(0,0,0,.16)}.gui-settings-dropdown.opened>ul{transform:scaleY(1);transition-timing-function:cubic-bezier(.18,.89,.32,1.28)}.gui-settings-dropdown.opened>i{transform:rotate(0)}.gui-settings-dropdown input{cursor:pointer;border:none;height:100%;max-width:80px;padding:4px 8px;transition:.2s;font-size:16px;background-color:transparent}.gui-settings-dropdown input[key=defaultPlayerMode]{max-width:120px}.gui-settings-dropdown input[key=scriptLoadingMode]{max-width:170px}.gui-settings-dropdown input[key=defaultBangumiLayout],.gui-settings-dropdown input[key=defaultPlayerLayout],.gui-settings-dropdown input[key=defaultVideoSpeed]{max-width:50px}.gui-settings-mask{height:calc(100% + 5px);width:calc(100% + 5px);opacity:0;background:#000a;position:fixed;top:0;left:0;z-index:99999;pointer-events:none;transition:.3s cubic-bezier(0,.86,.58,1);overscroll-behavior:contain}.gui-settings-mask.opened{opacity:1;pointer-events:initial}.gui-settings-mask.opened.transparent{opacity:0;transition:.3s cubic-bezier(0,.86,.58,1) .3s}.gui-settings-box,.gui-settings-widgets-box{height:100%;width:420px;background:#fff;color:#000;position:fixed;top:0;left:0;z-index:100001;transform:translateX(-101%);transition:.3s cubic-bezier(0,.86,.58,1);display:none;flex-direction:column;box-shadow:4px 0 16px 0 #0000;user-select:none}.gui-settings-box.loaded,.gui-settings-widgets-box.loaded{display:flex}.gui-settings-box.opened,.gui-settings-widgets-box.opened{transform:translateX(0);box-shadow:4px 0 16px 0 #0005}.gui-settings-box kbd,.gui-settings-widgets-box kbd{padding:0 4px;border-radius:4px;border:1px solid #ccc;color:#ccc;border-bottom-width:3px;margin:0 4px}.gui-settings-box li i.downloading,.gui-settings-widgets-box li i.downloading{margin-left:8px;font-style:normal;display:flex;align-items:center;font-size:14px;background:var(--theme-color);color:var(--foreground-color);padding:2px 8px}.gui-settings-widgets-box{min-width:210px;width:auto}.gui-settings-widgets-box>.title{margin:32px;font-size:16pt}.gui-settings-widgets-box>.widgets-container{padding:32px;display:flex;flex-direction:column;align-items:start;justify-content:start;position:relative;overscroll-behavior:contain;overflow:auto;height:100%;scrollbar-width:none!important}.gui-settings-widgets-box>.widgets-container::-webkit-scrollbar{height:0!important;width:0!important}.gui-settings-widgets-box>.widgets-container .empty-tip{font-size:10pt;display:none}.gui-settings-widgets-box>.widgets-container .empty-tip.show{display:block}.gui-settings-widgets-box>.gui-settings-header{justify-content:start}.gui-settings-flat-button,.gui-settings-flat-button a,.gui-settings-flat-button a:hover{display:flex;align-items:center;justify-content:center;color:inherit}.gui-settings-flat-button{width:auto;white-space:nowrap;padding:8px 16px;background:#8882;border:none;color:#000;cursor:pointer;transition:.2s ease-out;font-size:10pt;flex:0 0 auto;margin:4px;border-radius:20px;box-shadow:#0004 0 2px 4px;height:40px;box-sizing:border-box;-webkit-tap-highlight-color:transparent!important}.gui-settings-flat-button:disabled{opacity:.5;cursor:not-allowed}.gui-settings-flat-button:hover:not(:disabled){background:#8884}.gui-settings-flat-button:active:not(:disabled){border-bottom-color:var(--theme-color)}.gui-settings-flat-button:focus{outline:0}.gui-settings-flat-button i{margin-right:8px;line-height:24px;height:24px}.gui-settings-flat-button .popup{position:absolute;top:calc(100% + 2px);transition:.2s ease-out;transform:translateX(-50%) translateY(-6px);opacity:0;pointer-events:none;left:50%;background:#fff;box-shadow:rgba(0,0,0,.2) 0 4px 8px 0;z-index:200;display:flex;flex-direction:column;align-items:center;width:max-content}.gui-settings-flat-button .popup *{transition:.2s}.gui-settings-flat-button .popup.opened{transform:translateX(-50%) translateY(0);opacity:1;pointer-events:initial}.gui-settings-flat-button .popup ul{list-style:none;margin:0;padding:0}.gui-settings-header>i{margin-right:8px}.player-full-win .app-content,.player-full-win .live-room-app .app-content,.player-mode-webfullscreen .player-module{z-index:100000!important}body.round-corner{--corner-radius:4px;--large-corner-radius:8px}body.round-corner .gui-settings-box li i.downloading,body.round-corner .gui-settings-dropdown,body.round-corner .gui-settings-dropdown ul li,body.round-corner .gui-settings-dropdown>ul,body.round-corner .gui-settings-flat-button .popup,body.round-corner .gui-settings-textbox-container input{border-radius:var(--corner-radius)}.gui-settings-dock-right .gui-settings-icon-panel{right:0;left:unset}.gui-settings-dock-right .gui-settings-icon-panel .gui-settings,.gui-settings-dock-right .gui-settings-icon-panel .gui-settings-widgets{transform:translateX(16px);border-radius:50% 0 0 50%}.gui-settings-dock-right .gui-settings-icon-panel .gui-settings-widgets:hover,.gui-settings-dock-right .gui-settings-icon-panel .gui-settings:hover{transform:translateX(0)}.gui-settings-dock-right .gui-settings-box,.gui-settings-dock-right .gui-settings-widgets-box{right:0;left:unset;transform:translateX(101%)}.gui-settings-dock-right .gui-settings-box.opened,.gui-settings-dock-right .gui-settings-widgets-box.opened{transform:translateX(0)}.gui-settings-dock-right .gui-settings-tooltip{right:440px;left:unset}.gui-settings-auto-hide-side-bar .gui-settings,.gui-settings-auto-hide-side-bar .gui-settings-widgets{transform:translateX(-36px)}.gui-settings-auto-hide-side-bar .gui-settings-icon-panel:hover .gui-settings,.gui-settings-auto-hide-side-bar .gui-settings-icon-panel:hover .gui-settings-widgets{transform:translateX(-16px)}.gui-settings-auto-hide-side-bar .gui-settings-icon-panel:hover .gui-settings-widgets:hover,.gui-settings-auto-hide-side-bar .gui-settings-icon-panel:hover .gui-settings:hover{transform:translateX(0)}.gui-settings-auto-hide-side-bar.gui-settings-dock-right .gui-settings,.gui-settings-auto-hide-side-bar.gui-settings-dock-right .gui-settings-widgets{transform:translateX(36px)}.gui-settings-auto-hide-side-bar.gui-settings-dock-right .gui-settings-icon-panel:hover .gui-settings,.gui-settings-auto-hide-side-bar.gui-settings-dock-right .gui-settings-icon-panel:hover .gui-settings-widgets{transform:translateX(16px)}.gui-settings-auto-hide-side-bar.gui-settings-dock-right .gui-settings-icon-panel:hover .gui-settings-widgets:hover,.gui-settings-auto-hide-side-bar.gui-settings-dock-right .gui-settings-icon-panel:hover .gui-settings:hover{transform:translateX(0)}::-webkit-scrollbar{width:5px!important;height:5px!important}::-webkit-scrollbar-corner,::-webkit-scrollbar-track{background:0 0!important}::-webkit-resizer,::-webkit-scrollbar-thumb{background:#aaa;border-radius:3px}::-webkit-scrollbar-thumb:hover{background:#888}*{scrollbar-color:#aaa transparent;scrollbar-width:thin!important}`; -offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/gui-settings.min.html"] = `
附加功能
空空如也哦 = ̄ω ̄=
设置
导出设置
导入设置
`; +offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/gui-settings.min.html"] = `
附加功能
空空如也哦 = ̄ω ̄=
设置
导出设置
导入设置
`; offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/gui-settings.min.js"] = (()=>{return(e,t)=>{const{ThemeColors:n}=t.import("theme-colors");const{SettingsSearch:i}=t.import("settings-search");const{Validator:s}=t.import("text-validate");let o=[];let c=[];let a=[];function r(e){let t=e.nextElementSibling;const n=[];while(t!==null&&!t.classList.contains("category")){n.push(t);t=t.nextElementSibling}return n}function l(){a.forEach(t=>t.value=e[t.getAttribute("key")]);c.forEach(t=>t.checked=e[t.getAttribute("key")])}function d(){document.querySelector(".gui-settings-mask").addEventListener("click",()=>{document.querySelectorAll(".gui-settings-widgets-box,.gui-settings-box,.gui-settings-mask,.bilibili-evolved-about").forEach(e=>e.classList.remove("opened"))});a.forEach(t=>{t.setAttribute("placeholder",e[t.getAttribute("key")])});document.querySelectorAll(".gui-settings-content ul li.category").forEach(e=>{e.addEventListener("click",e=>{const t=document.querySelector(".gui-settings-search");if(t.value!==""){t.value="";raiseEvent(t,"input")}e.currentTarget.classList.toggle("folded");r(e.currentTarget).forEach(e=>e.classList.toggle("folded"))})});document.querySelectorAll(".gui-settings-dropdown>input").forEach(e=>{e.addEventListener("click",e=>{e.currentTarget.parentElement.classList.toggle("opened")})});dqa(".gui-settings-header .operation").forEach(t=>{t.addEventListener("click",t=>{if(t.target.classList.contains("export")){const t=document.createElement("a");t.style.display="none";const n=URL.createObjectURL(new Blob([JSON.stringify(_.omit(e,"cache"))]));t.href=n;t.download="bilibili-evolved-settings.json";document.body.insertAdjacentElement("beforeend",t);t.click();URL.revokeObjectURL(n);t.remove()}else if(t.target.classList.contains("import")){const t=document.createElement("input");t.style.display="none";t.type="file";t.accept=".json,text/json";document.body.insertAdjacentElement("beforeend",t);t.addEventListener("change",async()=>{try{const n=t.files[0];const i=JSON.parse(await new Response(n).text());for(const[t,n]of Object.entries(i)){if(t in e&&t!=="cache"){e[t]=n}}Toast.success("已成功导入设置, 部分设置需要刷新后生效.","导入设置",3e3)}catch(e){Toast.error("选择的设置文件无效.","导入设置",3e3)}finally{t.remove()}},{once:true});t.click()}})})}function u(){c.forEach(t=>{t.addEventListener("change",()=>{const n=t.getAttribute("key");const i=t.checked;e[n]=i})});a.forEach(t=>{t.addEventListener("change",()=>{const n=t.getAttribute("key");const i=s.getValidator(n).validate(t.value);e[n]=i;t.value=i})})}function g(){const e=o.map(e=>[e.getAttribute("dependencies").split(" ").map(e=>o.find(t=>t.getAttribute("key")===e)),e]);const t=e=>e.nodeName.toUpperCase()==="LI"?e:t(e.parentElement);e.forEach(([e,n])=>{if(e[0]===undefined){return}const i=()=>{if(e.every(e=>e.checked)){t(n).classList.remove("disabled")}else{t(n).classList.add("disabled")}};e.forEach(e=>e.addEventListener("change",i));i()})}function f(){if(typeof offlineData!=="undefined"){}}function m(){if(window.devicePixelRatio===1){o.find(e=>e.getAttribute("key")==="harunaScale").disabled=true;o.find(e=>e.getAttribute("key")==="imageResolution").disabled=true;e.harunaScale=false;e.imageResolution=false}}function y(){for(const[e,t]of Object.entries(Resource.displayNames)){const n=o.find(t=>t.getAttribute("key")===e);if(!n){continue}switch(n.type){case"checkbox":n.nextElementSibling.nextElementSibling.innerHTML=t;break;case"text":const e=n.parentElement;if(e.classList.contains("gui-settings-textbox-container")){n.previousElementSibling.innerHTML=t}else if(e.classList.contains("gui-settings-dropdown")){e.previousElementSibling.innerHTML=t}break;default:break}}}(async()=>{t.applyStyle("guiSettingsStyle");t.applyImportantStyle("iconsStyle");document.body.classList.add("round-corner");const e=document.body&&unsafeWindow.parent.window!==unsafeWindow;if(e){document.querySelector(".gui-settings-icon-panel").style.display="none"}addSettingsListener("guiSettingsDockSide",e=>{document.body.classList.toggle("gui-settings-dock-right",e==="右侧")},true);addSettingsListener("autoHideSideBar",e=>{document.body.classList.toggle("gui-settings-auto-hide-side-bar",e)},true);const s=t.data.guiSettingsHtml.text;document.body.insertAdjacentHTML("beforeend",s);const{style:r}=await t.importAsync("mdi");if(!r){document.body.insertAdjacentHTML("afterbegin",``)}const p=document.querySelector(".widgets-container");const b=p.querySelector(".empty-tip");Observer.childList(p,()=>{if(p.childElementCount<=1){b.classList.add("show")}else{b.classList.remove("show")}});const h=document.querySelectorAll(".gui-settings-widgets-box,.gui-settings-box");const E=document.querySelector(".gui-settings-icon-panel");E.addEventListener("mouseover",async()=>{const{loadTooltip:e}=await t.importAsync("settings-tooltip.loader");await e();await t.applyDropdownOptions();t.applyWidgets();raiseEvent(E,"be:load");const s=dq(".bilibili-evolved-about");if(s){raiseEvent(s,"be:about-load")}(new n).setupDom();h.forEach(e=>e.classList.add("loaded"));o=[...document.querySelectorAll("input[key]")];c=o.filter(e=>e.type==="checkbox");a=o.filter(e=>e.type==="text"&&!e.parentElement.classList.contains("gui-settings-dropdown"));d();f();l();g();u();m();y();new i},{once:true})})()}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/haruna-scale.min.js"] = (()=>{return(n,e)=>{const t="haruna-scale";const a=()=>{if(document.getElementById(t)===null){e.applyStyleFromText(`\n .haruna-ctnr,\n .avatar-btn\n {\n transform: scale(${1/window.devicePixelRatio}) !important;\n }\n`,t)}};a();return{reload:a,unload:()=>{const n=document.getElementById(t);n&&n.remove()}}}})(); offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/hide-bangumi-reviews.min.js"] = (()=>{return(e,n)=>{return n.toggleStyle(`\n #review_module { display: none !important; }\n`,`hide-bangumi-reviews-style`)}})(); @@ -2434,6 +2437,13 @@ Resource.manifest = { livePip: '直播画中画', }, }, + extendFeedsLive: { + path: 'extend-feeds-live.min.js', + style: true, + displayNames: { + extendFeedsLive: '直播信息扩充', + }, + }, } const resourceManifest = Resource.manifest diff --git a/bilibili-evolved.preview.user.js b/bilibili-evolved.preview.user.js index 543df9a82..68eaf99a2 100644 --- a/bilibili-evolved.preview.user.js +++ b/bilibili-evolved.preview.user.js @@ -526,6 +526,7 @@ const settings = { useDarkStyleAsUserStyle: false, autoHideSideBar: false, livePip: true, + extendFeedsLive: true, cache: {}, } const fixedSettings = { @@ -1293,6 +1294,8 @@ onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/m onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/expand-danmaku.min.js"] = (()=>{return(e,a)=>{if(typeof isEmbeddedPlayer!=="undefined"&&isEmbeddedPlayer()){return}Observer.videoChange(async()=>{const e=await SpinQuery.select(".bui-collapse-wrap");if(e&&e.classList.contains("bui-collapse-wrap-folded")){const e=await SpinQuery.select(".bui-collapse-header");e.click()}})}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/expand-description.min.css"] = `.play-up-info .play-up-self,.video-desc .info{height:auto!important}.play-up-info .play-up-self-btn,.video-desc .btn{display:none!important}`; onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/expand-description.min.js"] = (()=>{return(e,p)=>{p.applyStyle("expandDescriptionStyle")}})(); +onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/extend-feeds-live.min.css"] = `.live-up-list .up-name{font-size:13px!important}.live-up-list .live-detail{color:#000}body.dark .live-up-list .live-detail{color:#eee}.live-up-list .live-detail[data-live-title]::before{content:attr(data-live-title);color:#000;font-weight:700;line-height:1.5;display:flex}body.dark .live-up-list .live-detail[data-live-title]::before{color:#eee}`; +onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/extend-feeds-live.min.js"] = (()=>{return(e,t)=>{(async()=>{if(document.URL.replace(location.search,"")!=="https://t.bilibili.com/"){return}const e=await SpinQuery.select(".live-up-list");t.applyStyle("extendFeedsLiveStyle");const i=await Ajax.getJsonWithCredentials(`https://api.live.bilibili.com/relation/v1/feed/feed_list?page=1&pagesize=24`);if(i.code!==0){logError(`加载直播列表失败: ${i.message}`);return}const n=_.get(i,"data.list",[]);const l=dqa(e,".up-name");const a=l.map(e=>e.innerText.trim());const o=n.filter(e=>a.includes(e.uname));const r=n.filter(e=>!a.includes(e.uname));l.forEach((e,t)=>{e.parentElement.setAttribute("data-live-title",o.find(e=>e.uname===a[t]).title)});const s=e.children[0];r.forEach(t=>{const i=s.cloneNode(true);dqa(i,"a[href]").forEach(e=>e.setAttribute("href",`https://live.bilibili.com/${t.roomid}`));const n=dq(i,".live-up-img");n.style.backgroundImage=`url(${t.face})`;const l=dq(i,".live-detail");l.setAttribute("data-live-title",t.title);const a=dq(i,".up-name");a.innerHTML=t.uname;e.insertAdjacentElement("beforeend",i)});console.log(o,r)})()}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/favorites-redirect.min.js"] = (()=>{return(t,e)=>{function i(){const t=document.querySelectorAll("li[data-aid]>a");t.forEach(t=>{const e=t.getAttribute("href");if(e===null||!e.includes("medialist")){return}const i=t.parentElement.getAttribute("data-aid");t.setAttribute("href",`https://www.bilibili.com/video/av${i}`)})}(async()=>{const t=await SpinQuery.select("#app>.s-space");if(t!==null){Observer.childListSubtree("#app>.s-space",i)}})()}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/feeds-apis.min.js"] = (()=>{return(e,t)=>{const i={repost:{id:1,name:"转发"},textWithImages:{id:2,name:"图文"},text:{id:4,name:"文字"},video:{id:8,name:"视频"},miniVideo:{id:16,name:"小视频"},column:{id:64,name:"专栏"},audio:{id:256,name:"音频"},bangumi:{id:512,name:"番剧"},share:{id:2048,name:"分享"},manga:{id:2049,name:"漫画"},film:{id:4098,name:"电影"},tv:{id:4099,name:"TV剧"},chinese:{id:4100,name:"国创"},documentary:{id:4101,name:"纪录片"},mediaList:{id:4300,name:"收藏夹"}};const n=e=>{if(e.querySelector(".repost")){return i.repost}if(e.querySelector(".imagesbox")){return i.textWithImages}if(e.querySelector(".video-container")){return i.video}if(e.querySelector(".bangumi-container")){return i.bangumi}if(e.querySelector(".article-container")){return i.column}if(e.querySelector(".music-container")){return i.audio}if(e.querySelector(".h5share-container")){return i.share}if(e.querySelector(".vc-ctnr")){return i.miniVideo}return i.text};class a extends EventTarget{constructor(){super(...arguments);this.watching=false;this.cards=[]}addEventListener(e,t,i){super.addEventListener(e,t,i)}removeEventListener(e,t,i){super.removeEventListener(e,t,i)}async addCard(e){if(e instanceof HTMLElement&&e.classList.contains("card")){if(e.querySelector(".skeleton")!==null){const t=Observer.childList(e,()=>{if(e.querySelector(".skeleton")===null){t.stop();this.addCard(e)}})}else{const t=await this.parseCard(e);this.cards.push(t);this.cards.sort((e,t)=>{if(e.id===t.id){return 0}return e.id>t.id?-1:1});const i=new CustomEvent("addCard",{detail:t});this.dispatchEvent(i)}}}async removeCard(e){if(e instanceof HTMLElement&&e.classList.contains("card")){const t=(await this.parseCard(e)).id;const i=this.cards.findIndex(e=>e.id===t);const n=this.cards[i];this.cards.splice(i,1);const a=new CustomEvent("removeCard",{detail:n});this.dispatchEvent(a)}}async parseCard(e){const t=async t=>{const i=await SpinQuery.condition(()=>e.querySelector(t),e=>e!==null);if(i===null){console.warn(e,t);return""}const n=i.innerText.trim();return n};const a=async t=>{if(t===i.bangumi){return""}const n=await SpinQuery.condition(()=>e,e=>Boolean(e.__vue__));if(n===null){console.warn(n);return""}if(t===i.repost){const e=n.__vue__.originCardData.pureText;return n.__vue__.card.item.content+"\n"+e||""}return n.__vue__.originCardData.pureText||""};const r=async e=>{const i=parseInt(await t(e));if(isNaN(i)){return 0}return i};const s={id:e.getAttribute("data-did"),username:await t(".main-content .user-name"),text:"",reposts:await r(".button-bar .single-button:nth-child(1) .text-offset"),comments:await r(".button-bar .single-button:nth-child(2) .text-offset"),likes:await r(".button-bar .single-button:nth-child(3) .text-offset"),element:e,type:n(e),async getText(){const e=await a(this.type);this.text=e;return e}};await s.getText();e.setAttribute("data-type",s.type.id.toString());return s}async startWatching(){const e=await SpinQuery.select(".card-list .content");if(!e){return false}if(this.watching){return true}this.watching=true;const t=[...e.querySelectorAll(".content>.card")];t.forEach(e=>this.addCard(e));Observer.childList(e,e=>{e.forEach(e=>{e.addedNodes.forEach(e=>this.addCard(e));e.removedNodes.forEach(e=>this.removeCard(e))})});return true}}const r=new a;const s=async(e="video")=>{if(!getUID()){return[]}const t=await Ajax.getJsonWithCredentials(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${getUID()}&type_list=${e==="video"?8:512}`);if(t.code!==0){throw new Error(t.message)}if(e==="video"){return _.uniqBy(t.data.cards.map(e=>{const t=JSON.parse(e.card);const i=_.get(e,"display.topic_info.topic_details",[]).map(e=>{return{id:e.topic_id,name:e.topic_name}});return{id:e.desc.dynamic_id_str,aid:t.aid,bvid:e.desc.bvid||t.bvid,title:t.title,upID:e.desc.user_profile.info.uid,upName:e.desc.user_profile.info.uname,upFaceUrl:e.desc.user_profile.info.face,coverUrl:t.pic,description:t.desc,timestamp:e.timestamp,time:new Date(e.timestamp*1e3),topics:i,dynamic:t.dynamic,like:formatCount(e.desc.like),duration:t.duration,durationText:formatDuration(t.duration,0),playCount:formatCount(t.stat.view),danmakuCount:formatCount(t.stat.danmaku),watchlater:store.state.watchlaterList.includes(t.aid)}}),e=>e.aid)}else if(e==="bangumi"){return t.data.cards.map(e=>{const t=JSON.parse(e.card);return{id:e.desc.dynamic_id_str,aid:t.aid,bvid:e.desc.bvid||t.bvid,epID:t.episode_id,title:t.new_desc,upName:t.apiSeasonInfo.title,upFaceUrl:t.apiSeasonInfo.cover,coverUrl:t.cover,description:"",timestamp:e.timestamp,time:new Date(e.timestamp*1e3),like:formatCount(e.desc.like),durationText:"",playCount:formatCount(t.play_count),danmakuCount:formatCount(t.bullet_count),watchlater:false}})}else{return[]}};return{export:{feedsCardsManager:r,feedsCardTypes:i,getVideoFeeds:s}}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/feeds-filter.min.js"] = (()=>{return(e,t)=>{(async()=>{if(document.URL.replace(location.search,"")!=="https://t.bilibili.com/"){return}const e=await SpinQuery.select(".home-container .left-panel .scroll-content");if(e===null){return}e.insertAdjacentHTML("afterbegin",html``);new Vue({el:"feeds-filter-card",components:{FeedsFilterCard:()=>t.importAsync("feeds-filter-card.vue")}})})();return{reload:()=>document.body.classList.remove("disable-feeds-filter"),unload:()=>document.body.classList.add("disable-feeds-filter")}}})(); @@ -1303,7 +1306,7 @@ onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/m onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/ffmpeg-support.min.js"] = (()=>{return(e,t)=>{const n=[".mp4",".m4a"];const r=(e,t,n)=>{if(e<2){return null}const r=[];for(let s=1;s<=e;s++){let e=` - ${s}`;if(n.includes(".m4a")){e=""}const l=escapeFilename(`${t}${e}${n[s-1]}`).replace(/'/g,"'\\''");r.push(`file '${l}'`)}return r.join("\n")};const s=(e,t)=>{const r=e=>e.fragments.length>1;const s=e.filter(r);if(s.length===0){return null}const l=new Map;s.forEach(e=>{l.set(escapeFilename(`ffmpeg-files-${e.title}.txt`),e.fragments.map((r,s)=>{let l=` - ${s+1}`;if(t===true){l=""}const a=escapeFilename(`${e.title}${l}${t===true?n[s]:t}`).replace(/'/g,"'\\''");return`file '${a}'`}).join("\n"))});return l};const l=(e,t)=>{const r=[];e.forEach(e=>{e.fragments.forEach((s,l)=>{let a="";if(e.fragments.length>1&&t!==true){a=` - ${l+1}`}const c=escapeFilename(`${e.title}${a}${t===true?n[l]:t}`).replace(/'/g,"'\\''");r.push(`file '${c}'`)})});return r.join("\n")};return{export:{getFragmentsList:r,getBatchFragmentsList:s,getBatchEpisodesList:l}}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/fill-with-comments.min.js"] = (()=>{return(t,e)=>{const n="fill-with-comments-style";const l=t=>{};return{export:{fillWithComments:l}}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/filter-type-switch.vue.min.js"] = (()=>{return(e,s)=>{const i=`
`;return{export:Object.assign({template:i},{components:{Icon:()=>s.importAsync("icon.vue")},props:["name","type"],methods:{setFilter(s,i=true){document.body.classList[s?"add":"remove"](`feeds-filter-block-${this.name}`);if(!i){return}if(s){e.feedsFilterTypes.push(this.type.id)}else{const s=e.feedsFilterTypes.indexOf(this.type.id);if(s!==-1){e.feedsFilterTypes.splice(s,1)}}e.feedsFilterTypes=e.feedsFilterTypes}},data(){const s=e.feedsFilterTypes.includes(this.type.id);this.setFilter(s,false);return{disabled:s}},watch:{disabled(e){this.setFilter(e)}}})}}})(); -onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/fixed-sidebars.min.js"] = (()=>{return(n,t)=>{const a=`\n.custom-navbar {\n position: fixed !important;\n}\n.sticky-bar {\n display: none !important;\n}\n.left-panel, .right-panel {\n position: fixed !important;\n}\n.center-panel {\n margin-left: calc(244px + 8px) !important;\n}\n.right-panel {\n margin-left: calc(244px + 16px + 632px) !important;\n}\n`;const e="fixed-sidebars-style";const i=()=>{if(document.URL.replace(location.search,"")==="https://t.bilibili.com/"){t.applyStyleFromText(a,e)}};const o=()=>dqa("#"+e).forEach(n=>n.remove());i();return{reload:i,unload:o}}})(); +onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/fixed-sidebars.min.js"] = (()=>{return(n,t)=>{const e=`\n.custom-navbar {\n position: fixed !important;\n}\n.sticky-bar {\n display: none !important;\n}\n.left-panel, .right-panel {\n position: fixed !important;\n}\n.center-panel {\n margin-left: calc(244px + 8px) !important;\n}\n.right-panel {\n margin-left: calc(244px + 16px + 632px) !important;\n}\n.live-panel .live-up-list {\n max-height: calc(100vh - 200px);\n overflow: auto;\n scrollbar-width: none !important;\n}\n.live-panel .live-up-list::-webkit-scrollbar {\n height: 0 !important;\n width: 0 !important;\n}\n`;const i="fixed-sidebars-style";let a=true;if(document.URL.replace(location.search,"")==="https://t.bilibili.com/"){(async()=>{const n=await SpinQuery.select(".live-up-list");if(n!==null){n.addEventListener("mouseenter",n=>{if(a){n.stopImmediatePropagation()}},{capture:true})}})()}const l=()=>{if(document.URL.replace(location.search,"")==="https://t.bilibili.com/"){t.applyStyleFromText(e,i);a=true}};const o=()=>{dqa("#"+i).forEach(n=>n.remove());a=false};l();return{reload:l,unload:o}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/fix-fullscreen.min.js"] = (()=>{return(e,n)=>{unsafeWindow.Element.ALLOW_KEYBOARD_INPUT={};const t=unsafeWindow.Element.prototype.requestFullscreen;unsafeWindow.Element.prototype.requestFullscreen=function(){t.call(this)}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/fold-comment.min.css"] = `.panel-area .bb-comment .fold-comment{position:-webkit-sticky;position:sticky;bottom:0;height:40px;width:calc(100% + 48px);font-size:14px;transform:translateX(-24px);display:flex;align-items:center;justify-content:center;background-color:#fff;color:#99a2aa;cursor:pointer;transition:.2s ease-out;z-index:1000;border-radius:4px}.panel-area .bb-comment .fold-comment:hover{color:#000}body.dark .panel-area .bb-comment .fold-comment{background-color:#444;color:#eee}body.dark .panel-area .bb-comment .fold-comment:hover{color:var(--theme-color)}`; onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/fold-comment.min.js"] = (()=>{return(e,t)=>{if(document.URL.replace(window.location.search,"")==="https://t.bilibili.com/"){(async()=>{t.applyImportantStyle("foldCommentStyle");const e=await SpinQuery.select(".card-list .feed-card>.content");const l=e=>{const t=t=>{const l=document.createElement("div");l.classList.add("fold-comment");l.innerHTML="收起评论";const n=t.querySelector(".bb-comment");if(n===null){console.error("未找到评论区");return}else if(n.querySelector(".fold-comment")!==null){return}else{l.addEventListener("click",()=>{const t=e.querySelector(".button-bar").children[1];if(t!==null){t.click();e.scrollIntoView()}});n.insertAdjacentElement("beforeend",l)}};const l=e.querySelector(".panel-area");if(l===null){console.log(e)}if(l.childElementCount===0){const e=Observer.childList(l,n=>{if(n.length>0){t(l);e.forEach(e=>e.stop())}})}else{t(l)}};Observer.childList(e,()=>e.querySelectorAll("div.card").forEach(l))})()}}})(); @@ -1316,7 +1319,7 @@ onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/m onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/full-tweets-title.min.css"] = `.dynamic-m .info{height:auto!important}.dynamic-m .info a{white-space:normal!important}`; onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/full-tweets-title.min.js"] = (()=>{return(t,n)=>{const i=`\n.dynamic-m .info {\n height: auto !important;\n}\n.dynamic-m .info a {\n white-space: normal !important;\n}\n.custom-navbar .video-activity-card .title {\n display: block !important;\n max-height: unset !important;\n}\n.custom-navbar .video-activity-card .cover {\n height: unset !important;\n}\n`;return n.toggleStyle(i,"full-tweets-title")}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/gui-settings.min.css"] = `.gui-settings-icon-panel{height:auto;display:flex;flex-direction:column;justify-content:center;align-items:center;position:fixed;top:calc(50% + var(--side-bar-offset));left:0;width:32px;z-index:99999;transform:translateY(-50%);user-select:none}.gui-settings-icon-panel i{transition:.2s;opacity:.6;transform:rotate(360deg);font-size:12px}.gui-settings,.gui-settings-widgets{display:flex;justify-content:center;align-items:center;cursor:pointer;-webkit-tap-highlight-color:transparent;margin:16px 0;width:24px;height:24px;transition:.2s;opacity:1;transform-origin:center!important;transform:translateX(-16px);background-color:#dddc;border-radius:0 50% 50% 0;padding:6px;box-sizing:content-box}.gui-settings-widgets:hover i,.gui-settings:hover i{opacity:.75;transform:rotate(0)}body.dark .gui-settings,body.dark .gui-settings-widgets{background-color:rgba(0,0,0,.3)}.gui-settings-widgets:hover,.gui-settings:hover{opacity:1;transform:translateX(0)}.gui-settings-footer,.gui-settings-header{flex-grow:0;display:flex;align-items:center;justify-content:space-between;flex-shrink:0;padding:32px 24px 32px 32px}.gui-settings-header .operations{margin-left:16px;cursor:pointer;position:relative}.gui-settings-header .operations,.gui-settings-header .operations *{transition:.2s ease-out}.gui-settings-header .operations .mdi{font-size:20px}.gui-settings-header .operations .operations-menu{transition-delay:.2s;position:absolute;top:calc(100% + 8px);right:0;display:flex;flex-direction:column;opacity:0;transform-origin:top;transform:scaleY(0);z-index:102;background-color:#fff;border-radius:8px;box-shadow:0 2px 4px 1px #0002}body.dark .gui-settings-header .operations .operations-menu{background-color:#333}.gui-settings-header .operations .operations-menu .operation{display:flex;align-items:center;padding:8px 16px;white-space:nowrap;font-size:14px;border-radius:8px}.gui-settings-header .operations .operations-menu .operation .mdi{margin-right:8px}.gui-settings-header .operations .operations-menu .operation:hover{background-color:#8882}.gui-settings-header .operations:hover .operations-menu{opacity:1;transform:scaleY(1)}.gui-settings-footer{height:80px;justify-content:center;position:relative}.gui-settings-content{flex-grow:1;overflow:auto;position:relative;overscroll-behavior:contain}.gui-settings-content ul{padding:0;margin:0}.gui-settings-content ul li{font-size:16px;margin-bottom:18px;display:flex;height:24px;transition:.2s;box-sizing:content-box}.gui-settings-content ul li.disabled,.gui-settings-content ul li:not(.category).folded{height:0;margin:0;overflow:hidden}.gui-settings-content ul li.indent-0{margin-left:16px}.gui-settings-content ul li.indent-1{margin-left:80px}.gui-settings-content ul li.indent-2{margin-left:144px}.gui-settings-content ul li.indent-center{align-items:center;justify-content:center}.gui-settings-content ul li.category{padding:16px 0;margin-bottom:18px;border-top:1px dashed #8884;border-bottom:1px dashed #8884;background:#fff;position:-webkit-sticky;position:sticky;top:0;z-index:101;cursor:pointer;transition:.2s ease-out;-webkit-tap-highlight-color:transparent}.gui-settings-content ul li.category.folded{margin-bottom:-1px}.gui-settings-content ul li.category *{opacity:.8}.gui-settings-title{font-size:16pt;flex:0 0 auto}.gui-settings-box .gui-settings-title{margin-right:64px}.gui-settings-search[type=text]{flex:1 0 auto;height:auto;border:none;padding:6px;font-size:12pt;width:40%;border-bottom:1px solid #8884;transition:.2s;color:inherit;background:0 0;box-sizing:border-box;outline:0!important}.gui-settings-close{width:24px;height:24px;padding:16px}.gui-settings-header .gui-settings-close{cursor:pointer;-webkit-tap-highlight-color:transparent}.gui-settings-textbox-container{display:flex;justify-content:center;align-items:center;-webkit-tap-highlight-color:transparent}.gui-settings-textbox-container span{margin:0 16px;transition:.2s}.gui-settings-textbox-container input{border:none;height:100%;max-width:90px;padding:4px 8px!important;background:#8884;transition:.2s;font-size:16px}.gui-settings-textbox-container input:disabled,.gui-settings-textbox-container.disabled div,.gui-settings-textbox-container.disabled span{opacity:.5}.gui-settings-textbox-container input[key=batchFilenameFormat],.gui-settings-textbox-container input[key=filenameFormat]{max-width:500px}.gui-settings-dropdown-span{margin:0 16px;transition:.2s}.gui-settings-checkbox-container{cursor:pointer;display:flex;width:100%;justify-content:start;align-items:center;padding:0 16px;-webkit-tap-highlight-color:transparent}.gui-settings-checkbox-container .gui-settings-checkbox{width:28px;margin-right:24px;height:12px;background:#8884;border-radius:16px;position:relative}.gui-settings-checkbox-container .gui-settings-checkbox::after{content:"";width:20px;height:20px;background:#c6c6c6;position:absolute;border-radius:50%;top:-4px;left:-4px;box-shadow:0 2px 4px 0 #0003;transition:.2s ease-out}.gui-settings-checkbox-container .gui-settings-ok{width:24px;height:24px;margin-right:16px;transition:.2s}.gui-settings-checkbox-container input{visibility:collapse;transition:.2s;width:0;position:absolute}.gui-settings-checkbox-container input:checked~.gui-settings-checkbox{background:var(--theme-color-80)}.gui-settings-checkbox-container input:checked~.gui-settings-checkbox::after{background:var(--theme-color)!important;box-shadow:0 2px 4px 0 var(--theme-color-40);left:calc(100% - 16px)}.gui-settings-checkbox-container input:disabled~.gui-settings-checkbox{opacity:.5}.gui-settings-checkbox-container input~.gui-settings-ok{background-color:#8884}.gui-settings-checkbox-container input:checked~.gui-settings-ok{background-color:var(--theme-color)}.gui-settings-checkbox-container input~.gui-settings-ok>i{opacity:0;transform-origin:center;transform:scale(.9)}.gui-settings-checkbox-container input:checked~.gui-settings-ok>i{opacity:1}.gui-settings-checkbox-container input:disabled~.gui-settings-ok,.gui-settings-checkbox-container input:disabled~span{opacity:.5}button.gui-settings-button{padding:6px 20px;margin:0 4px;max-height:34px;border:none;background:#8884;font-size:16px;cursor:pointer;transition:.2s ease-out;font-family:inherit;-webkit-tap-highlight-color:transparent}button.gui-settings-button:hover{opacity:.9}button.gui-settings-button:active{opacity:.8}button.gui-settings-button:focus{outline:0}.custom-color-preview{width:28px;height:28px;border-radius:50%;background:var(--theme-color);margin-right:16px;position:relative;cursor:pointer;box-sizing:border-box;box-shadow:0 2px 4px 0 var(--theme-color-40)}.predefined-colors{transition:.2s;display:flex;opacity:0;background:#fff;width:168px;height:168px;position:absolute;box-shadow:rgba(0,0,0,.2) 0 4px 8px 0;top:32px;left:calc(-84px + 50%);transform:scale(0);transform-origin:top;z-index:9}.predefined-colors.opened{opacity:1;transform:scale(1)}.predefined-colors-grid{display:grid;grid-template-columns:auto auto auto auto;margin:0;flex-grow:1}.predefined-colors-grid-block{width:100%;height:100%;justify-self:center;align-self:center;cursor:pointer;transform-origin:center;transition:.1s ease-out}.predefined-colors-grid-block:hover{transform:scale(1.1);box-shadow:0 0 8px 1px #0004}input[key]:focus{outline:0}input[type=text][key]{height:auto;border:none;line-height:normal}.gui-settings-label{margin:0 16px;font-size:16px}.hidden{display:none!important}@supports (backdrop-filter:blur(24px)) or (-webkit-backdrop-filter:blur(24px)){.gui-settings-box.blur li.category{-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px);background:0 0}.gui-settings-box.blur{background:#fff8}.gui-settings-box.blur .gui-settings-content,.gui-settings-box.blur .gui-settings-footer,.gui-settings-box.blur .gui-settings-header{background:#fff8;-webkit-backdrop-filter:blur(64px);backdrop-filter:blur(64px)}}li.category i.icon-arrow{transition:.2s ease-out}li.category.folded i.icon-arrow{transform:rotate(180deg)}.gui-settings-dropdown-container{display:flex;align-items:center}.gui-settings-dropdown{position:relative;cursor:pointer;-webkit-tap-highlight-color:transparent;background-color:#8884;display:inline-flex;align-items:center;height:32px}.gui-settings-dropdown>i{transition:.2s ease-out;transform-origin:center;transform:rotate(180deg)}.gui-settings-dropdown>ul{position:absolute;top:calc(100%);width:100%;cursor:pointer;background:#fff;transform-origin:top;transform:scaleY(0);transition:.2s cubic-bezier(.6,-.28,.74,.05);display:flex;flex-direction:column;align-items:center;box-shadow:rgba(0,0,0,.2) 0 4px 8px 0;z-index:102}.gui-settings-dropdown ul li{margin:0;padding:8px 0;height:auto;width:100%;justify-content:center}.gui-settings-dropdown ul li:hover{background:rgba(0,0,0,.16)}.gui-settings-dropdown.opened>ul{transform:scaleY(1);transition-timing-function:cubic-bezier(.18,.89,.32,1.28)}.gui-settings-dropdown.opened>i{transform:rotate(0)}.gui-settings-dropdown input{cursor:pointer;border:none;height:100%;max-width:80px;padding:4px 8px;transition:.2s;font-size:16px;background-color:transparent}.gui-settings-dropdown input[key=defaultPlayerMode]{max-width:120px}.gui-settings-dropdown input[key=scriptLoadingMode]{max-width:170px}.gui-settings-dropdown input[key=defaultBangumiLayout],.gui-settings-dropdown input[key=defaultPlayerLayout],.gui-settings-dropdown input[key=defaultVideoSpeed]{max-width:50px}.gui-settings-mask{height:calc(100% + 5px);width:calc(100% + 5px);opacity:0;background:#000a;position:fixed;top:0;left:0;z-index:99999;pointer-events:none;transition:.3s cubic-bezier(0,.86,.58,1);overscroll-behavior:contain}.gui-settings-mask.opened{opacity:1;pointer-events:initial}.gui-settings-mask.opened.transparent{opacity:0;transition:.3s cubic-bezier(0,.86,.58,1) .3s}.gui-settings-box,.gui-settings-widgets-box{height:100%;width:420px;background:#fff;color:#000;position:fixed;top:0;left:0;z-index:100001;transform:translateX(-101%);transition:.3s cubic-bezier(0,.86,.58,1);display:none;flex-direction:column;box-shadow:4px 0 16px 0 #0000;user-select:none}.gui-settings-box.loaded,.gui-settings-widgets-box.loaded{display:flex}.gui-settings-box.opened,.gui-settings-widgets-box.opened{transform:translateX(0);box-shadow:4px 0 16px 0 #0005}.gui-settings-box kbd,.gui-settings-widgets-box kbd{padding:0 4px;border-radius:4px;border:1px solid #ccc;color:#ccc;border-bottom-width:3px;margin:0 4px}.gui-settings-box li i.downloading,.gui-settings-widgets-box li i.downloading{margin-left:8px;font-style:normal;display:flex;align-items:center;font-size:14px;background:var(--theme-color);color:var(--foreground-color);padding:2px 8px}.gui-settings-widgets-box{min-width:210px;width:auto}.gui-settings-widgets-box>.title{margin:32px;font-size:16pt}.gui-settings-widgets-box>.widgets-container{padding:32px;display:flex;flex-direction:column;align-items:start;justify-content:start;position:relative;overscroll-behavior:contain;overflow:auto;height:100%;scrollbar-width:none!important}.gui-settings-widgets-box>.widgets-container::-webkit-scrollbar{height:0!important;width:0!important}.gui-settings-widgets-box>.widgets-container .empty-tip{font-size:10pt;display:none}.gui-settings-widgets-box>.widgets-container .empty-tip.show{display:block}.gui-settings-widgets-box>.gui-settings-header{justify-content:start}.gui-settings-flat-button,.gui-settings-flat-button a,.gui-settings-flat-button a:hover{display:flex;align-items:center;justify-content:center;color:inherit}.gui-settings-flat-button{width:auto;white-space:nowrap;padding:8px 16px;background:#8882;border:none;color:#000;cursor:pointer;transition:.2s ease-out;font-size:10pt;flex:0 0 auto;margin:4px;border-radius:20px;box-shadow:#0004 0 2px 4px;height:40px;box-sizing:border-box;-webkit-tap-highlight-color:transparent!important}.gui-settings-flat-button:disabled{opacity:.5;cursor:not-allowed}.gui-settings-flat-button:hover:not(:disabled){background:#8884}.gui-settings-flat-button:active:not(:disabled){border-bottom-color:var(--theme-color)}.gui-settings-flat-button:focus{outline:0}.gui-settings-flat-button i{margin-right:8px;line-height:24px;height:24px}.gui-settings-flat-button .popup{position:absolute;top:calc(100% + 2px);transition:.2s ease-out;transform:translateX(-50%) translateY(-6px);opacity:0;pointer-events:none;left:50%;background:#fff;box-shadow:rgba(0,0,0,.2) 0 4px 8px 0;z-index:200;display:flex;flex-direction:column;align-items:center;width:max-content}.gui-settings-flat-button .popup *{transition:.2s}.gui-settings-flat-button .popup.opened{transform:translateX(-50%) translateY(0);opacity:1;pointer-events:initial}.gui-settings-flat-button .popup ul{list-style:none;margin:0;padding:0}.gui-settings-header>i{margin-right:8px}.player-full-win .app-content,.player-full-win .live-room-app .app-content,.player-mode-webfullscreen .player-module{z-index:100000!important}body.round-corner{--corner-radius:4px;--large-corner-radius:8px}body.round-corner .gui-settings-box li i.downloading,body.round-corner .gui-settings-dropdown,body.round-corner .gui-settings-dropdown ul li,body.round-corner .gui-settings-dropdown>ul,body.round-corner .gui-settings-flat-button .popup,body.round-corner .gui-settings-textbox-container input{border-radius:var(--corner-radius)}.gui-settings-dock-right .gui-settings-icon-panel{right:0;left:unset}.gui-settings-dock-right .gui-settings-icon-panel .gui-settings,.gui-settings-dock-right .gui-settings-icon-panel .gui-settings-widgets{transform:translateX(16px);border-radius:50% 0 0 50%}.gui-settings-dock-right .gui-settings-icon-panel .gui-settings-widgets:hover,.gui-settings-dock-right .gui-settings-icon-panel .gui-settings:hover{transform:translateX(0)}.gui-settings-dock-right .gui-settings-box,.gui-settings-dock-right .gui-settings-widgets-box{right:0;left:unset;transform:translateX(101%)}.gui-settings-dock-right .gui-settings-box.opened,.gui-settings-dock-right .gui-settings-widgets-box.opened{transform:translateX(0)}.gui-settings-dock-right .gui-settings-tooltip{right:440px;left:unset}.gui-settings-auto-hide-side-bar .gui-settings,.gui-settings-auto-hide-side-bar .gui-settings-widgets{transform:translateX(-36px)}.gui-settings-auto-hide-side-bar .gui-settings-icon-panel:hover .gui-settings,.gui-settings-auto-hide-side-bar .gui-settings-icon-panel:hover .gui-settings-widgets{transform:translateX(-16px)}.gui-settings-auto-hide-side-bar .gui-settings-icon-panel:hover .gui-settings-widgets:hover,.gui-settings-auto-hide-side-bar .gui-settings-icon-panel:hover .gui-settings:hover{transform:translateX(0)}.gui-settings-auto-hide-side-bar.gui-settings-dock-right .gui-settings,.gui-settings-auto-hide-side-bar.gui-settings-dock-right .gui-settings-widgets{transform:translateX(36px)}.gui-settings-auto-hide-side-bar.gui-settings-dock-right .gui-settings-icon-panel:hover .gui-settings,.gui-settings-auto-hide-side-bar.gui-settings-dock-right .gui-settings-icon-panel:hover .gui-settings-widgets{transform:translateX(16px)}.gui-settings-auto-hide-side-bar.gui-settings-dock-right .gui-settings-icon-panel:hover .gui-settings-widgets:hover,.gui-settings-auto-hide-side-bar.gui-settings-dock-right .gui-settings-icon-panel:hover .gui-settings:hover{transform:translateX(0)}::-webkit-scrollbar{width:5px!important;height:5px!important}::-webkit-scrollbar-corner,::-webkit-scrollbar-track{background:0 0!important}::-webkit-resizer,::-webkit-scrollbar-thumb{background:#aaa;border-radius:3px}::-webkit-scrollbar-thumb:hover{background:#888}*{scrollbar-color:#aaa transparent;scrollbar-width:thin!important}`; -onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/gui-settings.min.html"] = `
附加功能
空空如也哦 = ̄ω ̄=
设置
导出设置
导入设置
`; +onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/gui-settings.min.html"] = `
附加功能
空空如也哦 = ̄ω ̄=
设置
导出设置
导入设置
`; onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/gui-settings.min.js"] = (()=>{return(e,t)=>{const{ThemeColors:n}=t.import("theme-colors");const{SettingsSearch:i}=t.import("settings-search");const{Validator:s}=t.import("text-validate");let o=[];let c=[];let a=[];function r(e){let t=e.nextElementSibling;const n=[];while(t!==null&&!t.classList.contains("category")){n.push(t);t=t.nextElementSibling}return n}function l(){a.forEach(t=>t.value=e[t.getAttribute("key")]);c.forEach(t=>t.checked=e[t.getAttribute("key")])}function d(){document.querySelector(".gui-settings-mask").addEventListener("click",()=>{document.querySelectorAll(".gui-settings-widgets-box,.gui-settings-box,.gui-settings-mask,.bilibili-evolved-about").forEach(e=>e.classList.remove("opened"))});a.forEach(t=>{t.setAttribute("placeholder",e[t.getAttribute("key")])});document.querySelectorAll(".gui-settings-content ul li.category").forEach(e=>{e.addEventListener("click",e=>{const t=document.querySelector(".gui-settings-search");if(t.value!==""){t.value="";raiseEvent(t,"input")}e.currentTarget.classList.toggle("folded");r(e.currentTarget).forEach(e=>e.classList.toggle("folded"))})});document.querySelectorAll(".gui-settings-dropdown>input").forEach(e=>{e.addEventListener("click",e=>{e.currentTarget.parentElement.classList.toggle("opened")})});dqa(".gui-settings-header .operation").forEach(t=>{t.addEventListener("click",t=>{if(t.target.classList.contains("export")){const t=document.createElement("a");t.style.display="none";const n=URL.createObjectURL(new Blob([JSON.stringify(_.omit(e,"cache"))]));t.href=n;t.download="bilibili-evolved-settings.json";document.body.insertAdjacentElement("beforeend",t);t.click();URL.revokeObjectURL(n);t.remove()}else if(t.target.classList.contains("import")){const t=document.createElement("input");t.style.display="none";t.type="file";t.accept=".json,text/json";document.body.insertAdjacentElement("beforeend",t);t.addEventListener("change",async()=>{try{const n=t.files[0];const i=JSON.parse(await new Response(n).text());for(const[t,n]of Object.entries(i)){if(t in e&&t!=="cache"){e[t]=n}}Toast.success("已成功导入设置, 部分设置需要刷新后生效.","导入设置",3e3)}catch(e){Toast.error("选择的设置文件无效.","导入设置",3e3)}finally{t.remove()}},{once:true});t.click()}})})}function u(){c.forEach(t=>{t.addEventListener("change",()=>{const n=t.getAttribute("key");const i=t.checked;e[n]=i})});a.forEach(t=>{t.addEventListener("change",()=>{const n=t.getAttribute("key");const i=s.getValidator(n).validate(t.value);e[n]=i;t.value=i})})}function g(){const e=o.map(e=>[e.getAttribute("dependencies").split(" ").map(e=>o.find(t=>t.getAttribute("key")===e)),e]);const t=e=>e.nodeName.toUpperCase()==="LI"?e:t(e.parentElement);e.forEach(([e,n])=>{if(e[0]===undefined){return}const i=()=>{if(e.every(e=>e.checked)){t(n).classList.remove("disabled")}else{t(n).classList.add("disabled")}};e.forEach(e=>e.addEventListener("change",i));i()})}function f(){if(typeof offlineData!=="undefined"){}}function m(){if(window.devicePixelRatio===1){o.find(e=>e.getAttribute("key")==="harunaScale").disabled=true;o.find(e=>e.getAttribute("key")==="imageResolution").disabled=true;e.harunaScale=false;e.imageResolution=false}}function y(){for(const[e,t]of Object.entries(Resource.displayNames)){const n=o.find(t=>t.getAttribute("key")===e);if(!n){continue}switch(n.type){case"checkbox":n.nextElementSibling.nextElementSibling.innerHTML=t;break;case"text":const e=n.parentElement;if(e.classList.contains("gui-settings-textbox-container")){n.previousElementSibling.innerHTML=t}else if(e.classList.contains("gui-settings-dropdown")){e.previousElementSibling.innerHTML=t}break;default:break}}}(async()=>{t.applyStyle("guiSettingsStyle");t.applyImportantStyle("iconsStyle");document.body.classList.add("round-corner");const e=document.body&&unsafeWindow.parent.window!==unsafeWindow;if(e){document.querySelector(".gui-settings-icon-panel").style.display="none"}addSettingsListener("guiSettingsDockSide",e=>{document.body.classList.toggle("gui-settings-dock-right",e==="右侧")},true);addSettingsListener("autoHideSideBar",e=>{document.body.classList.toggle("gui-settings-auto-hide-side-bar",e)},true);const s=t.data.guiSettingsHtml.text;document.body.insertAdjacentHTML("beforeend",s);const{style:r}=await t.importAsync("mdi");if(!r){document.body.insertAdjacentHTML("afterbegin",``)}const p=document.querySelector(".widgets-container");const b=p.querySelector(".empty-tip");Observer.childList(p,()=>{if(p.childElementCount<=1){b.classList.add("show")}else{b.classList.remove("show")}});const h=document.querySelectorAll(".gui-settings-widgets-box,.gui-settings-box");const E=document.querySelector(".gui-settings-icon-panel");E.addEventListener("mouseover",async()=>{const{loadTooltip:e}=await t.importAsync("settings-tooltip.loader");await e();await t.applyDropdownOptions();t.applyWidgets();raiseEvent(E,"be:load");const s=dq(".bilibili-evolved-about");if(s){raiseEvent(s,"be:about-load")}(new n).setupDom();h.forEach(e=>e.classList.add("loaded"));o=[...document.querySelectorAll("input[key]")];c=o.filter(e=>e.type==="checkbox");a=o.filter(e=>e.type==="text"&&!e.parentElement.classList.contains("gui-settings-dropdown"));d();f();l();g();u();m();y();new i},{once:true})})()}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/haruna-scale.min.js"] = (()=>{return(n,e)=>{const t="haruna-scale";const a=()=>{if(document.getElementById(t)===null){e.applyStyleFromText(`\n .haruna-ctnr,\n .avatar-btn\n {\n transform: scale(${1/window.devicePixelRatio}) !important;\n }\n`,t)}};a();return{reload:a,unload:()=>{const n=document.getElementById(t);n&&n.remove()}}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/hide-bangumi-reviews.min.js"] = (()=>{return(e,n)=>{return n.toggleStyle(`\n #review_module { display: none !important; }\n`,`hide-bangumi-reviews-style`)}})(); @@ -2493,6 +2496,13 @@ Resource.manifest = { livePip: '直播画中画', }, }, + extendFeedsLive: { + path: 'extend-feeds-live.min.js', + style: true, + displayNames: { + extendFeedsLive: '直播信息扩充', + }, + }, } const resourceManifest = Resource.manifest diff --git a/bilibili-evolved.user.js b/bilibili-evolved.user.js index 1fada20cc..4cb9d80fd 100644 --- a/bilibili-evolved.user.js +++ b/bilibili-evolved.user.js @@ -526,6 +526,7 @@ const settings = { useDarkStyleAsUserStyle: false, autoHideSideBar: false, livePip: true, + extendFeedsLive: true, cache: {}, } const fixedSettings = { @@ -1293,6 +1294,8 @@ onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/mi onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/expand-danmaku.min.js"] = (()=>{return(e,a)=>{if(typeof isEmbeddedPlayer!=="undefined"&&isEmbeddedPlayer()){return}Observer.videoChange(async()=>{const e=await SpinQuery.select(".bui-collapse-wrap");if(e&&e.classList.contains("bui-collapse-wrap-folded")){const e=await SpinQuery.select(".bui-collapse-header");e.click()}})}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/expand-description.min.css"] = `.play-up-info .play-up-self,.video-desc .info{height:auto!important}.play-up-info .play-up-self-btn,.video-desc .btn{display:none!important}`; onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/expand-description.min.js"] = (()=>{return(e,p)=>{p.applyStyle("expandDescriptionStyle")}})(); +onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/extend-feeds-live.min.css"] = `.live-up-list .up-name{font-size:13px!important}.live-up-list .live-detail{color:#000}body.dark .live-up-list .live-detail{color:#eee}.live-up-list .live-detail[data-live-title]::before{content:attr(data-live-title);color:#000;font-weight:700;line-height:1.5;display:flex}body.dark .live-up-list .live-detail[data-live-title]::before{color:#eee}`; +onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/extend-feeds-live.min.js"] = (()=>{return(e,t)=>{(async()=>{if(document.URL.replace(location.search,"")!=="https://t.bilibili.com/"){return}const e=await SpinQuery.select(".live-up-list");t.applyStyle("extendFeedsLiveStyle");const i=await Ajax.getJsonWithCredentials(`https://api.live.bilibili.com/relation/v1/feed/feed_list?page=1&pagesize=24`);if(i.code!==0){logError(`加载直播列表失败: ${i.message}`);return}const n=_.get(i,"data.list",[]);const l=dqa(e,".up-name");const a=l.map(e=>e.innerText.trim());const o=n.filter(e=>a.includes(e.uname));const r=n.filter(e=>!a.includes(e.uname));l.forEach((e,t)=>{e.parentElement.setAttribute("data-live-title",o.find(e=>e.uname===a[t]).title)});const s=e.children[0];r.forEach(t=>{const i=s.cloneNode(true);dqa(i,"a[href]").forEach(e=>e.setAttribute("href",`https://live.bilibili.com/${t.roomid}`));const n=dq(i,".live-up-img");n.style.backgroundImage=`url(${t.face})`;const l=dq(i,".live-detail");l.setAttribute("data-live-title",t.title);const a=dq(i,".up-name");a.innerHTML=t.uname;e.insertAdjacentElement("beforeend",i)});console.log(o,r)})()}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/favorites-redirect.min.js"] = (()=>{return(t,e)=>{function i(){const t=document.querySelectorAll("li[data-aid]>a");t.forEach(t=>{const e=t.getAttribute("href");if(e===null||!e.includes("medialist")){return}const i=t.parentElement.getAttribute("data-aid");t.setAttribute("href",`https://www.bilibili.com/video/av${i}`)})}(async()=>{const t=await SpinQuery.select("#app>.s-space");if(t!==null){Observer.childListSubtree("#app>.s-space",i)}})()}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/feeds-apis.min.js"] = (()=>{return(e,t)=>{const i={repost:{id:1,name:"转发"},textWithImages:{id:2,name:"图文"},text:{id:4,name:"文字"},video:{id:8,name:"视频"},miniVideo:{id:16,name:"小视频"},column:{id:64,name:"专栏"},audio:{id:256,name:"音频"},bangumi:{id:512,name:"番剧"},share:{id:2048,name:"分享"},manga:{id:2049,name:"漫画"},film:{id:4098,name:"电影"},tv:{id:4099,name:"TV剧"},chinese:{id:4100,name:"国创"},documentary:{id:4101,name:"纪录片"},mediaList:{id:4300,name:"收藏夹"}};const n=e=>{if(e.querySelector(".repost")){return i.repost}if(e.querySelector(".imagesbox")){return i.textWithImages}if(e.querySelector(".video-container")){return i.video}if(e.querySelector(".bangumi-container")){return i.bangumi}if(e.querySelector(".article-container")){return i.column}if(e.querySelector(".music-container")){return i.audio}if(e.querySelector(".h5share-container")){return i.share}if(e.querySelector(".vc-ctnr")){return i.miniVideo}return i.text};class a extends EventTarget{constructor(){super(...arguments);this.watching=false;this.cards=[]}addEventListener(e,t,i){super.addEventListener(e,t,i)}removeEventListener(e,t,i){super.removeEventListener(e,t,i)}async addCard(e){if(e instanceof HTMLElement&&e.classList.contains("card")){if(e.querySelector(".skeleton")!==null){const t=Observer.childList(e,()=>{if(e.querySelector(".skeleton")===null){t.stop();this.addCard(e)}})}else{const t=await this.parseCard(e);this.cards.push(t);this.cards.sort((e,t)=>{if(e.id===t.id){return 0}return e.id>t.id?-1:1});const i=new CustomEvent("addCard",{detail:t});this.dispatchEvent(i)}}}async removeCard(e){if(e instanceof HTMLElement&&e.classList.contains("card")){const t=(await this.parseCard(e)).id;const i=this.cards.findIndex(e=>e.id===t);const n=this.cards[i];this.cards.splice(i,1);const a=new CustomEvent("removeCard",{detail:n});this.dispatchEvent(a)}}async parseCard(e){const t=async t=>{const i=await SpinQuery.condition(()=>e.querySelector(t),e=>e!==null);if(i===null){console.warn(e,t);return""}const n=i.innerText.trim();return n};const a=async t=>{if(t===i.bangumi){return""}const n=await SpinQuery.condition(()=>e,e=>Boolean(e.__vue__));if(n===null){console.warn(n);return""}if(t===i.repost){const e=n.__vue__.originCardData.pureText;return n.__vue__.card.item.content+"\n"+e||""}return n.__vue__.originCardData.pureText||""};const r=async e=>{const i=parseInt(await t(e));if(isNaN(i)){return 0}return i};const s={id:e.getAttribute("data-did"),username:await t(".main-content .user-name"),text:"",reposts:await r(".button-bar .single-button:nth-child(1) .text-offset"),comments:await r(".button-bar .single-button:nth-child(2) .text-offset"),likes:await r(".button-bar .single-button:nth-child(3) .text-offset"),element:e,type:n(e),async getText(){const e=await a(this.type);this.text=e;return e}};await s.getText();e.setAttribute("data-type",s.type.id.toString());return s}async startWatching(){const e=await SpinQuery.select(".card-list .content");if(!e){return false}if(this.watching){return true}this.watching=true;const t=[...e.querySelectorAll(".content>.card")];t.forEach(e=>this.addCard(e));Observer.childList(e,e=>{e.forEach(e=>{e.addedNodes.forEach(e=>this.addCard(e));e.removedNodes.forEach(e=>this.removeCard(e))})});return true}}const r=new a;const s=async(e="video")=>{if(!getUID()){return[]}const t=await Ajax.getJsonWithCredentials(`https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=${getUID()}&type_list=${e==="video"?8:512}`);if(t.code!==0){throw new Error(t.message)}if(e==="video"){return _.uniqBy(t.data.cards.map(e=>{const t=JSON.parse(e.card);const i=_.get(e,"display.topic_info.topic_details",[]).map(e=>{return{id:e.topic_id,name:e.topic_name}});return{id:e.desc.dynamic_id_str,aid:t.aid,bvid:e.desc.bvid||t.bvid,title:t.title,upID:e.desc.user_profile.info.uid,upName:e.desc.user_profile.info.uname,upFaceUrl:e.desc.user_profile.info.face,coverUrl:t.pic,description:t.desc,timestamp:e.timestamp,time:new Date(e.timestamp*1e3),topics:i,dynamic:t.dynamic,like:formatCount(e.desc.like),duration:t.duration,durationText:formatDuration(t.duration,0),playCount:formatCount(t.stat.view),danmakuCount:formatCount(t.stat.danmaku),watchlater:store.state.watchlaterList.includes(t.aid)}}),e=>e.aid)}else if(e==="bangumi"){return t.data.cards.map(e=>{const t=JSON.parse(e.card);return{id:e.desc.dynamic_id_str,aid:t.aid,bvid:e.desc.bvid||t.bvid,epID:t.episode_id,title:t.new_desc,upName:t.apiSeasonInfo.title,upFaceUrl:t.apiSeasonInfo.cover,coverUrl:t.cover,description:"",timestamp:e.timestamp,time:new Date(e.timestamp*1e3),like:formatCount(e.desc.like),durationText:"",playCount:formatCount(t.play_count),danmakuCount:formatCount(t.bullet_count),watchlater:false}})}else{return[]}};return{export:{feedsCardsManager:r,feedsCardTypes:i,getVideoFeeds:s}}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/feeds-filter.min.js"] = (()=>{return(e,t)=>{(async()=>{if(document.URL.replace(location.search,"")!=="https://t.bilibili.com/"){return}const e=await SpinQuery.select(".home-container .left-panel .scroll-content");if(e===null){return}e.insertAdjacentHTML("afterbegin",html``);new Vue({el:"feeds-filter-card",components:{FeedsFilterCard:()=>t.importAsync("feeds-filter-card.vue")}})})();return{reload:()=>document.body.classList.remove("disable-feeds-filter"),unload:()=>document.body.classList.add("disable-feeds-filter")}}})(); @@ -1303,7 +1306,7 @@ onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/mi onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/ffmpeg-support.min.js"] = (()=>{return(e,t)=>{const n=[".mp4",".m4a"];const r=(e,t,n)=>{if(e<2){return null}const r=[];for(let s=1;s<=e;s++){let e=` - ${s}`;if(n.includes(".m4a")){e=""}const l=escapeFilename(`${t}${e}${n[s-1]}`).replace(/'/g,"'\\''");r.push(`file '${l}'`)}return r.join("\n")};const s=(e,t)=>{const r=e=>e.fragments.length>1;const s=e.filter(r);if(s.length===0){return null}const l=new Map;s.forEach(e=>{l.set(escapeFilename(`ffmpeg-files-${e.title}.txt`),e.fragments.map((r,s)=>{let l=` - ${s+1}`;if(t===true){l=""}const a=escapeFilename(`${e.title}${l}${t===true?n[s]:t}`).replace(/'/g,"'\\''");return`file '${a}'`}).join("\n"))});return l};const l=(e,t)=>{const r=[];e.forEach(e=>{e.fragments.forEach((s,l)=>{let a="";if(e.fragments.length>1&&t!==true){a=` - ${l+1}`}const c=escapeFilename(`${e.title}${a}${t===true?n[l]:t}`).replace(/'/g,"'\\''");r.push(`file '${c}'`)})});return r.join("\n")};return{export:{getFragmentsList:r,getBatchFragmentsList:s,getBatchEpisodesList:l}}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/fill-with-comments.min.js"] = (()=>{return(t,e)=>{const n="fill-with-comments-style";const l=t=>{};return{export:{fillWithComments:l}}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/filter-type-switch.vue.min.js"] = (()=>{return(e,s)=>{const i=`
`;return{export:Object.assign({template:i},{components:{Icon:()=>s.importAsync("icon.vue")},props:["name","type"],methods:{setFilter(s,i=true){document.body.classList[s?"add":"remove"](`feeds-filter-block-${this.name}`);if(!i){return}if(s){e.feedsFilterTypes.push(this.type.id)}else{const s=e.feedsFilterTypes.indexOf(this.type.id);if(s!==-1){e.feedsFilterTypes.splice(s,1)}}e.feedsFilterTypes=e.feedsFilterTypes}},data(){const s=e.feedsFilterTypes.includes(this.type.id);this.setFilter(s,false);return{disabled:s}},watch:{disabled(e){this.setFilter(e)}}})}}})(); -onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/fixed-sidebars.min.js"] = (()=>{return(n,t)=>{const a=`\n.custom-navbar {\n position: fixed !important;\n}\n.sticky-bar {\n display: none !important;\n}\n.left-panel, .right-panel {\n position: fixed !important;\n}\n.center-panel {\n margin-left: calc(244px + 8px) !important;\n}\n.right-panel {\n margin-left: calc(244px + 16px + 632px) !important;\n}\n`;const e="fixed-sidebars-style";const i=()=>{if(document.URL.replace(location.search,"")==="https://t.bilibili.com/"){t.applyStyleFromText(a,e)}};const o=()=>dqa("#"+e).forEach(n=>n.remove());i();return{reload:i,unload:o}}})(); +onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/fixed-sidebars.min.js"] = (()=>{return(n,t)=>{const e=`\n.custom-navbar {\n position: fixed !important;\n}\n.sticky-bar {\n display: none !important;\n}\n.left-panel, .right-panel {\n position: fixed !important;\n}\n.center-panel {\n margin-left: calc(244px + 8px) !important;\n}\n.right-panel {\n margin-left: calc(244px + 16px + 632px) !important;\n}\n.live-panel .live-up-list {\n max-height: calc(100vh - 200px);\n overflow: auto;\n scrollbar-width: none !important;\n}\n.live-panel .live-up-list::-webkit-scrollbar {\n height: 0 !important;\n width: 0 !important;\n}\n`;const i="fixed-sidebars-style";let a=true;if(document.URL.replace(location.search,"")==="https://t.bilibili.com/"){(async()=>{const n=await SpinQuery.select(".live-up-list");if(n!==null){n.addEventListener("mouseenter",n=>{if(a){n.stopImmediatePropagation()}},{capture:true})}})()}const l=()=>{if(document.URL.replace(location.search,"")==="https://t.bilibili.com/"){t.applyStyleFromText(e,i);a=true}};const o=()=>{dqa("#"+i).forEach(n=>n.remove());a=false};l();return{reload:l,unload:o}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/fix-fullscreen.min.js"] = (()=>{return(e,n)=>{unsafeWindow.Element.ALLOW_KEYBOARD_INPUT={};const t=unsafeWindow.Element.prototype.requestFullscreen;unsafeWindow.Element.prototype.requestFullscreen=function(){t.call(this)}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/fold-comment.min.css"] = `.panel-area .bb-comment .fold-comment{position:-webkit-sticky;position:sticky;bottom:0;height:40px;width:calc(100% + 48px);font-size:14px;transform:translateX(-24px);display:flex;align-items:center;justify-content:center;background-color:#fff;color:#99a2aa;cursor:pointer;transition:.2s ease-out;z-index:1000;border-radius:4px}.panel-area .bb-comment .fold-comment:hover{color:#000}body.dark .panel-area .bb-comment .fold-comment{background-color:#444;color:#eee}body.dark .panel-area .bb-comment .fold-comment:hover{color:var(--theme-color)}`; onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/fold-comment.min.js"] = (()=>{return(e,t)=>{if(document.URL.replace(window.location.search,"")==="https://t.bilibili.com/"){(async()=>{t.applyImportantStyle("foldCommentStyle");const e=await SpinQuery.select(".card-list .feed-card>.content");const l=e=>{const t=t=>{const l=document.createElement("div");l.classList.add("fold-comment");l.innerHTML="收起评论";const n=t.querySelector(".bb-comment");if(n===null){console.error("未找到评论区");return}else if(n.querySelector(".fold-comment")!==null){return}else{l.addEventListener("click",()=>{const t=e.querySelector(".button-bar").children[1];if(t!==null){t.click();e.scrollIntoView()}});n.insertAdjacentElement("beforeend",l)}};const l=e.querySelector(".panel-area");if(l===null){console.log(e)}if(l.childElementCount===0){const e=Observer.childList(l,n=>{if(n.length>0){t(l);e.forEach(e=>e.stop())}})}else{t(l)}};Observer.childList(e,()=>e.querySelectorAll("div.card").forEach(l))})()}}})(); @@ -1316,7 +1319,7 @@ onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/mi onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/full-tweets-title.min.css"] = `.dynamic-m .info{height:auto!important}.dynamic-m .info a{white-space:normal!important}`; onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/full-tweets-title.min.js"] = (()=>{return(t,n)=>{const i=`\n.dynamic-m .info {\n height: auto !important;\n}\n.dynamic-m .info a {\n white-space: normal !important;\n}\n.custom-navbar .video-activity-card .title {\n display: block !important;\n max-height: unset !important;\n}\n.custom-navbar .video-activity-card .cover {\n height: unset !important;\n}\n`;return n.toggleStyle(i,"full-tweets-title")}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/gui-settings.min.css"] = `.gui-settings-icon-panel{height:auto;display:flex;flex-direction:column;justify-content:center;align-items:center;position:fixed;top:calc(50% + var(--side-bar-offset));left:0;width:32px;z-index:99999;transform:translateY(-50%);user-select:none}.gui-settings-icon-panel i{transition:.2s;opacity:.6;transform:rotate(360deg);font-size:12px}.gui-settings,.gui-settings-widgets{display:flex;justify-content:center;align-items:center;cursor:pointer;-webkit-tap-highlight-color:transparent;margin:16px 0;width:24px;height:24px;transition:.2s;opacity:1;transform-origin:center!important;transform:translateX(-16px);background-color:#dddc;border-radius:0 50% 50% 0;padding:6px;box-sizing:content-box}.gui-settings-widgets:hover i,.gui-settings:hover i{opacity:.75;transform:rotate(0)}body.dark .gui-settings,body.dark .gui-settings-widgets{background-color:rgba(0,0,0,.3)}.gui-settings-widgets:hover,.gui-settings:hover{opacity:1;transform:translateX(0)}.gui-settings-footer,.gui-settings-header{flex-grow:0;display:flex;align-items:center;justify-content:space-between;flex-shrink:0;padding:32px 24px 32px 32px}.gui-settings-header .operations{margin-left:16px;cursor:pointer;position:relative}.gui-settings-header .operations,.gui-settings-header .operations *{transition:.2s ease-out}.gui-settings-header .operations .mdi{font-size:20px}.gui-settings-header .operations .operations-menu{transition-delay:.2s;position:absolute;top:calc(100% + 8px);right:0;display:flex;flex-direction:column;opacity:0;transform-origin:top;transform:scaleY(0);z-index:102;background-color:#fff;border-radius:8px;box-shadow:0 2px 4px 1px #0002}body.dark .gui-settings-header .operations .operations-menu{background-color:#333}.gui-settings-header .operations .operations-menu .operation{display:flex;align-items:center;padding:8px 16px;white-space:nowrap;font-size:14px;border-radius:8px}.gui-settings-header .operations .operations-menu .operation .mdi{margin-right:8px}.gui-settings-header .operations .operations-menu .operation:hover{background-color:#8882}.gui-settings-header .operations:hover .operations-menu{opacity:1;transform:scaleY(1)}.gui-settings-footer{height:80px;justify-content:center;position:relative}.gui-settings-content{flex-grow:1;overflow:auto;position:relative;overscroll-behavior:contain}.gui-settings-content ul{padding:0;margin:0}.gui-settings-content ul li{font-size:16px;margin-bottom:18px;display:flex;height:24px;transition:.2s;box-sizing:content-box}.gui-settings-content ul li.disabled,.gui-settings-content ul li:not(.category).folded{height:0;margin:0;overflow:hidden}.gui-settings-content ul li.indent-0{margin-left:16px}.gui-settings-content ul li.indent-1{margin-left:80px}.gui-settings-content ul li.indent-2{margin-left:144px}.gui-settings-content ul li.indent-center{align-items:center;justify-content:center}.gui-settings-content ul li.category{padding:16px 0;margin-bottom:18px;border-top:1px dashed #8884;border-bottom:1px dashed #8884;background:#fff;position:-webkit-sticky;position:sticky;top:0;z-index:101;cursor:pointer;transition:.2s ease-out;-webkit-tap-highlight-color:transparent}.gui-settings-content ul li.category.folded{margin-bottom:-1px}.gui-settings-content ul li.category *{opacity:.8}.gui-settings-title{font-size:16pt;flex:0 0 auto}.gui-settings-box .gui-settings-title{margin-right:64px}.gui-settings-search[type=text]{flex:1 0 auto;height:auto;border:none;padding:6px;font-size:12pt;width:40%;border-bottom:1px solid #8884;transition:.2s;color:inherit;background:0 0;box-sizing:border-box;outline:0!important}.gui-settings-close{width:24px;height:24px;padding:16px}.gui-settings-header .gui-settings-close{cursor:pointer;-webkit-tap-highlight-color:transparent}.gui-settings-textbox-container{display:flex;justify-content:center;align-items:center;-webkit-tap-highlight-color:transparent}.gui-settings-textbox-container span{margin:0 16px;transition:.2s}.gui-settings-textbox-container input{border:none;height:100%;max-width:90px;padding:4px 8px!important;background:#8884;transition:.2s;font-size:16px}.gui-settings-textbox-container input:disabled,.gui-settings-textbox-container.disabled div,.gui-settings-textbox-container.disabled span{opacity:.5}.gui-settings-textbox-container input[key=batchFilenameFormat],.gui-settings-textbox-container input[key=filenameFormat]{max-width:500px}.gui-settings-dropdown-span{margin:0 16px;transition:.2s}.gui-settings-checkbox-container{cursor:pointer;display:flex;width:100%;justify-content:start;align-items:center;padding:0 16px;-webkit-tap-highlight-color:transparent}.gui-settings-checkbox-container .gui-settings-checkbox{width:28px;margin-right:24px;height:12px;background:#8884;border-radius:16px;position:relative}.gui-settings-checkbox-container .gui-settings-checkbox::after{content:"";width:20px;height:20px;background:#c6c6c6;position:absolute;border-radius:50%;top:-4px;left:-4px;box-shadow:0 2px 4px 0 #0003;transition:.2s ease-out}.gui-settings-checkbox-container .gui-settings-ok{width:24px;height:24px;margin-right:16px;transition:.2s}.gui-settings-checkbox-container input{visibility:collapse;transition:.2s;width:0;position:absolute}.gui-settings-checkbox-container input:checked~.gui-settings-checkbox{background:var(--theme-color-80)}.gui-settings-checkbox-container input:checked~.gui-settings-checkbox::after{background:var(--theme-color)!important;box-shadow:0 2px 4px 0 var(--theme-color-40);left:calc(100% - 16px)}.gui-settings-checkbox-container input:disabled~.gui-settings-checkbox{opacity:.5}.gui-settings-checkbox-container input~.gui-settings-ok{background-color:#8884}.gui-settings-checkbox-container input:checked~.gui-settings-ok{background-color:var(--theme-color)}.gui-settings-checkbox-container input~.gui-settings-ok>i{opacity:0;transform-origin:center;transform:scale(.9)}.gui-settings-checkbox-container input:checked~.gui-settings-ok>i{opacity:1}.gui-settings-checkbox-container input:disabled~.gui-settings-ok,.gui-settings-checkbox-container input:disabled~span{opacity:.5}button.gui-settings-button{padding:6px 20px;margin:0 4px;max-height:34px;border:none;background:#8884;font-size:16px;cursor:pointer;transition:.2s ease-out;font-family:inherit;-webkit-tap-highlight-color:transparent}button.gui-settings-button:hover{opacity:.9}button.gui-settings-button:active{opacity:.8}button.gui-settings-button:focus{outline:0}.custom-color-preview{width:28px;height:28px;border-radius:50%;background:var(--theme-color);margin-right:16px;position:relative;cursor:pointer;box-sizing:border-box;box-shadow:0 2px 4px 0 var(--theme-color-40)}.predefined-colors{transition:.2s;display:flex;opacity:0;background:#fff;width:168px;height:168px;position:absolute;box-shadow:rgba(0,0,0,.2) 0 4px 8px 0;top:32px;left:calc(-84px + 50%);transform:scale(0);transform-origin:top;z-index:9}.predefined-colors.opened{opacity:1;transform:scale(1)}.predefined-colors-grid{display:grid;grid-template-columns:auto auto auto auto;margin:0;flex-grow:1}.predefined-colors-grid-block{width:100%;height:100%;justify-self:center;align-self:center;cursor:pointer;transform-origin:center;transition:.1s ease-out}.predefined-colors-grid-block:hover{transform:scale(1.1);box-shadow:0 0 8px 1px #0004}input[key]:focus{outline:0}input[type=text][key]{height:auto;border:none;line-height:normal}.gui-settings-label{margin:0 16px;font-size:16px}.hidden{display:none!important}@supports (backdrop-filter:blur(24px)) or (-webkit-backdrop-filter:blur(24px)){.gui-settings-box.blur li.category{-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px);background:0 0}.gui-settings-box.blur{background:#fff8}.gui-settings-box.blur .gui-settings-content,.gui-settings-box.blur .gui-settings-footer,.gui-settings-box.blur .gui-settings-header{background:#fff8;-webkit-backdrop-filter:blur(64px);backdrop-filter:blur(64px)}}li.category i.icon-arrow{transition:.2s ease-out}li.category.folded i.icon-arrow{transform:rotate(180deg)}.gui-settings-dropdown-container{display:flex;align-items:center}.gui-settings-dropdown{position:relative;cursor:pointer;-webkit-tap-highlight-color:transparent;background-color:#8884;display:inline-flex;align-items:center;height:32px}.gui-settings-dropdown>i{transition:.2s ease-out;transform-origin:center;transform:rotate(180deg)}.gui-settings-dropdown>ul{position:absolute;top:calc(100%);width:100%;cursor:pointer;background:#fff;transform-origin:top;transform:scaleY(0);transition:.2s cubic-bezier(.6,-.28,.74,.05);display:flex;flex-direction:column;align-items:center;box-shadow:rgba(0,0,0,.2) 0 4px 8px 0;z-index:102}.gui-settings-dropdown ul li{margin:0;padding:8px 0;height:auto;width:100%;justify-content:center}.gui-settings-dropdown ul li:hover{background:rgba(0,0,0,.16)}.gui-settings-dropdown.opened>ul{transform:scaleY(1);transition-timing-function:cubic-bezier(.18,.89,.32,1.28)}.gui-settings-dropdown.opened>i{transform:rotate(0)}.gui-settings-dropdown input{cursor:pointer;border:none;height:100%;max-width:80px;padding:4px 8px;transition:.2s;font-size:16px;background-color:transparent}.gui-settings-dropdown input[key=defaultPlayerMode]{max-width:120px}.gui-settings-dropdown input[key=scriptLoadingMode]{max-width:170px}.gui-settings-dropdown input[key=defaultBangumiLayout],.gui-settings-dropdown input[key=defaultPlayerLayout],.gui-settings-dropdown input[key=defaultVideoSpeed]{max-width:50px}.gui-settings-mask{height:calc(100% + 5px);width:calc(100% + 5px);opacity:0;background:#000a;position:fixed;top:0;left:0;z-index:99999;pointer-events:none;transition:.3s cubic-bezier(0,.86,.58,1);overscroll-behavior:contain}.gui-settings-mask.opened{opacity:1;pointer-events:initial}.gui-settings-mask.opened.transparent{opacity:0;transition:.3s cubic-bezier(0,.86,.58,1) .3s}.gui-settings-box,.gui-settings-widgets-box{height:100%;width:420px;background:#fff;color:#000;position:fixed;top:0;left:0;z-index:100001;transform:translateX(-101%);transition:.3s cubic-bezier(0,.86,.58,1);display:none;flex-direction:column;box-shadow:4px 0 16px 0 #0000;user-select:none}.gui-settings-box.loaded,.gui-settings-widgets-box.loaded{display:flex}.gui-settings-box.opened,.gui-settings-widgets-box.opened{transform:translateX(0);box-shadow:4px 0 16px 0 #0005}.gui-settings-box kbd,.gui-settings-widgets-box kbd{padding:0 4px;border-radius:4px;border:1px solid #ccc;color:#ccc;border-bottom-width:3px;margin:0 4px}.gui-settings-box li i.downloading,.gui-settings-widgets-box li i.downloading{margin-left:8px;font-style:normal;display:flex;align-items:center;font-size:14px;background:var(--theme-color);color:var(--foreground-color);padding:2px 8px}.gui-settings-widgets-box{min-width:210px;width:auto}.gui-settings-widgets-box>.title{margin:32px;font-size:16pt}.gui-settings-widgets-box>.widgets-container{padding:32px;display:flex;flex-direction:column;align-items:start;justify-content:start;position:relative;overscroll-behavior:contain;overflow:auto;height:100%;scrollbar-width:none!important}.gui-settings-widgets-box>.widgets-container::-webkit-scrollbar{height:0!important;width:0!important}.gui-settings-widgets-box>.widgets-container .empty-tip{font-size:10pt;display:none}.gui-settings-widgets-box>.widgets-container .empty-tip.show{display:block}.gui-settings-widgets-box>.gui-settings-header{justify-content:start}.gui-settings-flat-button,.gui-settings-flat-button a,.gui-settings-flat-button a:hover{display:flex;align-items:center;justify-content:center;color:inherit}.gui-settings-flat-button{width:auto;white-space:nowrap;padding:8px 16px;background:#8882;border:none;color:#000;cursor:pointer;transition:.2s ease-out;font-size:10pt;flex:0 0 auto;margin:4px;border-radius:20px;box-shadow:#0004 0 2px 4px;height:40px;box-sizing:border-box;-webkit-tap-highlight-color:transparent!important}.gui-settings-flat-button:disabled{opacity:.5;cursor:not-allowed}.gui-settings-flat-button:hover:not(:disabled){background:#8884}.gui-settings-flat-button:active:not(:disabled){border-bottom-color:var(--theme-color)}.gui-settings-flat-button:focus{outline:0}.gui-settings-flat-button i{margin-right:8px;line-height:24px;height:24px}.gui-settings-flat-button .popup{position:absolute;top:calc(100% + 2px);transition:.2s ease-out;transform:translateX(-50%) translateY(-6px);opacity:0;pointer-events:none;left:50%;background:#fff;box-shadow:rgba(0,0,0,.2) 0 4px 8px 0;z-index:200;display:flex;flex-direction:column;align-items:center;width:max-content}.gui-settings-flat-button .popup *{transition:.2s}.gui-settings-flat-button .popup.opened{transform:translateX(-50%) translateY(0);opacity:1;pointer-events:initial}.gui-settings-flat-button .popup ul{list-style:none;margin:0;padding:0}.gui-settings-header>i{margin-right:8px}.player-full-win .app-content,.player-full-win .live-room-app .app-content,.player-mode-webfullscreen .player-module{z-index:100000!important}body.round-corner{--corner-radius:4px;--large-corner-radius:8px}body.round-corner .gui-settings-box li i.downloading,body.round-corner .gui-settings-dropdown,body.round-corner .gui-settings-dropdown ul li,body.round-corner .gui-settings-dropdown>ul,body.round-corner .gui-settings-flat-button .popup,body.round-corner .gui-settings-textbox-container input{border-radius:var(--corner-radius)}.gui-settings-dock-right .gui-settings-icon-panel{right:0;left:unset}.gui-settings-dock-right .gui-settings-icon-panel .gui-settings,.gui-settings-dock-right .gui-settings-icon-panel .gui-settings-widgets{transform:translateX(16px);border-radius:50% 0 0 50%}.gui-settings-dock-right .gui-settings-icon-panel .gui-settings-widgets:hover,.gui-settings-dock-right .gui-settings-icon-panel .gui-settings:hover{transform:translateX(0)}.gui-settings-dock-right .gui-settings-box,.gui-settings-dock-right .gui-settings-widgets-box{right:0;left:unset;transform:translateX(101%)}.gui-settings-dock-right .gui-settings-box.opened,.gui-settings-dock-right .gui-settings-widgets-box.opened{transform:translateX(0)}.gui-settings-dock-right .gui-settings-tooltip{right:440px;left:unset}.gui-settings-auto-hide-side-bar .gui-settings,.gui-settings-auto-hide-side-bar .gui-settings-widgets{transform:translateX(-36px)}.gui-settings-auto-hide-side-bar .gui-settings-icon-panel:hover .gui-settings,.gui-settings-auto-hide-side-bar .gui-settings-icon-panel:hover .gui-settings-widgets{transform:translateX(-16px)}.gui-settings-auto-hide-side-bar .gui-settings-icon-panel:hover .gui-settings-widgets:hover,.gui-settings-auto-hide-side-bar .gui-settings-icon-panel:hover .gui-settings:hover{transform:translateX(0)}.gui-settings-auto-hide-side-bar.gui-settings-dock-right .gui-settings,.gui-settings-auto-hide-side-bar.gui-settings-dock-right .gui-settings-widgets{transform:translateX(36px)}.gui-settings-auto-hide-side-bar.gui-settings-dock-right .gui-settings-icon-panel:hover .gui-settings,.gui-settings-auto-hide-side-bar.gui-settings-dock-right .gui-settings-icon-panel:hover .gui-settings-widgets{transform:translateX(16px)}.gui-settings-auto-hide-side-bar.gui-settings-dock-right .gui-settings-icon-panel:hover .gui-settings-widgets:hover,.gui-settings-auto-hide-side-bar.gui-settings-dock-right .gui-settings-icon-panel:hover .gui-settings:hover{transform:translateX(0)}::-webkit-scrollbar{width:5px!important;height:5px!important}::-webkit-scrollbar-corner,::-webkit-scrollbar-track{background:0 0!important}::-webkit-resizer,::-webkit-scrollbar-thumb{background:#aaa;border-radius:3px}::-webkit-scrollbar-thumb:hover{background:#888}*{scrollbar-color:#aaa transparent;scrollbar-width:thin!important}`; -onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/gui-settings.min.html"] = `
附加功能
空空如也哦 = ̄ω ̄=
设置
导出设置
导入设置
`; +onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/gui-settings.min.html"] = `
附加功能
空空如也哦 = ̄ω ̄=
设置
导出设置
导入设置
`; onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/gui-settings.min.js"] = (()=>{return(e,t)=>{const{ThemeColors:n}=t.import("theme-colors");const{SettingsSearch:i}=t.import("settings-search");const{Validator:s}=t.import("text-validate");let o=[];let c=[];let a=[];function r(e){let t=e.nextElementSibling;const n=[];while(t!==null&&!t.classList.contains("category")){n.push(t);t=t.nextElementSibling}return n}function l(){a.forEach(t=>t.value=e[t.getAttribute("key")]);c.forEach(t=>t.checked=e[t.getAttribute("key")])}function d(){document.querySelector(".gui-settings-mask").addEventListener("click",()=>{document.querySelectorAll(".gui-settings-widgets-box,.gui-settings-box,.gui-settings-mask,.bilibili-evolved-about").forEach(e=>e.classList.remove("opened"))});a.forEach(t=>{t.setAttribute("placeholder",e[t.getAttribute("key")])});document.querySelectorAll(".gui-settings-content ul li.category").forEach(e=>{e.addEventListener("click",e=>{const t=document.querySelector(".gui-settings-search");if(t.value!==""){t.value="";raiseEvent(t,"input")}e.currentTarget.classList.toggle("folded");r(e.currentTarget).forEach(e=>e.classList.toggle("folded"))})});document.querySelectorAll(".gui-settings-dropdown>input").forEach(e=>{e.addEventListener("click",e=>{e.currentTarget.parentElement.classList.toggle("opened")})});dqa(".gui-settings-header .operation").forEach(t=>{t.addEventListener("click",t=>{if(t.target.classList.contains("export")){const t=document.createElement("a");t.style.display="none";const n=URL.createObjectURL(new Blob([JSON.stringify(_.omit(e,"cache"))]));t.href=n;t.download="bilibili-evolved-settings.json";document.body.insertAdjacentElement("beforeend",t);t.click();URL.revokeObjectURL(n);t.remove()}else if(t.target.classList.contains("import")){const t=document.createElement("input");t.style.display="none";t.type="file";t.accept=".json,text/json";document.body.insertAdjacentElement("beforeend",t);t.addEventListener("change",async()=>{try{const n=t.files[0];const i=JSON.parse(await new Response(n).text());for(const[t,n]of Object.entries(i)){if(t in e&&t!=="cache"){e[t]=n}}Toast.success("已成功导入设置, 部分设置需要刷新后生效.","导入设置",3e3)}catch(e){Toast.error("选择的设置文件无效.","导入设置",3e3)}finally{t.remove()}},{once:true});t.click()}})})}function u(){c.forEach(t=>{t.addEventListener("change",()=>{const n=t.getAttribute("key");const i=t.checked;e[n]=i})});a.forEach(t=>{t.addEventListener("change",()=>{const n=t.getAttribute("key");const i=s.getValidator(n).validate(t.value);e[n]=i;t.value=i})})}function g(){const e=o.map(e=>[e.getAttribute("dependencies").split(" ").map(e=>o.find(t=>t.getAttribute("key")===e)),e]);const t=e=>e.nodeName.toUpperCase()==="LI"?e:t(e.parentElement);e.forEach(([e,n])=>{if(e[0]===undefined){return}const i=()=>{if(e.every(e=>e.checked)){t(n).classList.remove("disabled")}else{t(n).classList.add("disabled")}};e.forEach(e=>e.addEventListener("change",i));i()})}function f(){if(typeof offlineData!=="undefined"){}}function m(){if(window.devicePixelRatio===1){o.find(e=>e.getAttribute("key")==="harunaScale").disabled=true;o.find(e=>e.getAttribute("key")==="imageResolution").disabled=true;e.harunaScale=false;e.imageResolution=false}}function y(){for(const[e,t]of Object.entries(Resource.displayNames)){const n=o.find(t=>t.getAttribute("key")===e);if(!n){continue}switch(n.type){case"checkbox":n.nextElementSibling.nextElementSibling.innerHTML=t;break;case"text":const e=n.parentElement;if(e.classList.contains("gui-settings-textbox-container")){n.previousElementSibling.innerHTML=t}else if(e.classList.contains("gui-settings-dropdown")){e.previousElementSibling.innerHTML=t}break;default:break}}}(async()=>{t.applyStyle("guiSettingsStyle");t.applyImportantStyle("iconsStyle");document.body.classList.add("round-corner");const e=document.body&&unsafeWindow.parent.window!==unsafeWindow;if(e){document.querySelector(".gui-settings-icon-panel").style.display="none"}addSettingsListener("guiSettingsDockSide",e=>{document.body.classList.toggle("gui-settings-dock-right",e==="右侧")},true);addSettingsListener("autoHideSideBar",e=>{document.body.classList.toggle("gui-settings-auto-hide-side-bar",e)},true);const s=t.data.guiSettingsHtml.text;document.body.insertAdjacentHTML("beforeend",s);const{style:r}=await t.importAsync("mdi");if(!r){document.body.insertAdjacentHTML("afterbegin",``)}const p=document.querySelector(".widgets-container");const b=p.querySelector(".empty-tip");Observer.childList(p,()=>{if(p.childElementCount<=1){b.classList.add("show")}else{b.classList.remove("show")}});const h=document.querySelectorAll(".gui-settings-widgets-box,.gui-settings-box");const E=document.querySelector(".gui-settings-icon-panel");E.addEventListener("mouseover",async()=>{const{loadTooltip:e}=await t.importAsync("settings-tooltip.loader");await e();await t.applyDropdownOptions();t.applyWidgets();raiseEvent(E,"be:load");const s=dq(".bilibili-evolved-about");if(s){raiseEvent(s,"be:about-load")}(new n).setupDom();h.forEach(e=>e.classList.add("loaded"));o=[...document.querySelectorAll("input[key]")];c=o.filter(e=>e.type==="checkbox");a=o.filter(e=>e.type==="text"&&!e.parentElement.classList.contains("gui-settings-dropdown"));d();f();l();g();u();m();y();new i},{once:true})})()}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/haruna-scale.min.js"] = (()=>{return(n,e)=>{const t="haruna-scale";const a=()=>{if(document.getElementById(t)===null){e.applyStyleFromText(`\n .haruna-ctnr,\n .avatar-btn\n {\n transform: scale(${1/window.devicePixelRatio}) !important;\n }\n`,t)}};a();return{reload:a,unload:()=>{const n=document.getElementById(t);n&&n.remove()}}}})(); onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/hide-bangumi-reviews.min.js"] = (()=>{return(e,n)=>{return n.toggleStyle(`\n #review_module { display: none !important; }\n`,`hide-bangumi-reviews-style`)}})(); @@ -2493,6 +2496,13 @@ Resource.manifest = { livePip: '直播画中画', }, }, + extendFeedsLive: { + path: 'extend-feeds-live.min.js', + style: true, + displayNames: { + extendFeedsLive: '直播信息扩充', + }, + }, } const resourceManifest = Resource.manifest diff --git a/min/bundle.json b/min/bundle.json index 0d01d49b4..cb7390e92 100644 --- a/min/bundle.json +++ b/min/bundle.json @@ -81,6 +81,8 @@ "expand-danmaku.min.js": "B21658C40085AEA8DC49652AE62EB8610BB2EBEAF7A9C9AF69EF3B11E08EEC8D", "expand-description.min.css": "58C7710A50521B80F7D872BDC4C652610D84C4FABC6874BA66DA37B4F8759224", "expand-description.min.js": "A56857AD6B1C9F431B233D188E857D30DD5A2EB644986DE32A21280B1B7BC7A7", + "extend-feeds-live.min.css": "289FF668C6612FDD84B05ADB030B762EA22F8CB23D38A4954D8784194BFBA85A", + "extend-feeds-live.min.js": "C0BF0CA43264C5A9413FB1DC727EEAC4620F0EDBF3B1AB89A2E538D102BB625A", "favorites-redirect.min.js": "70D6ECCE0402AA76387D2A3288C1148C60CC88D5378B7A2BDC813F3F78E4EE84", "feeds-apis.min.js": "F0D840B5D85455B8E3159C6A0286CDE78E29B99A3B89DF73FCBD489B27398163", "feeds-filter.min.js": "B0C6884958870914F6583C4BA86936C3E7A24E27570B1837BAB69F0611EA8FDD", @@ -91,7 +93,7 @@ "ffmpeg-support.min.js": "B88C5BFDC1CC582CA25098D6BA47189FF628B7323EF9F90D4CFBC4E946648927", "fill-with-comments.min.js": "A32B6D4ADFA29C164F9675E07715EAC0A5CFE0BBB346735DD691BDA2D9F338C3", "filter-type-switch.vue.min.js": "E06B00EF48F3CCFACC82B858A266CE0DF48F8332C5900B3AD579330D4C6D3125", - "fixed-sidebars.min.js": "A0AB37CF2219EA0008DC828C22EB6726D93B0CF320DEB503BE78ECA1B2DFEC6F", + "fixed-sidebars.min.js": "BAC6F19321BC7F75A28553B4F758B633C3FFB40A55326719C77421D90C0CCD7C", "fix-fullscreen.min.js": "C0628A7CABB4421FCBD7663700EF9965C96F6D79979B9F7523A9F9B0B009C8B6", "fold-comment.min.css": "74DF4566EB80AD7078E65E8B68633E05FC41D3B4E47A20D6E415E8A743F35378", "fold-comment.min.js": "B149A9A8EA03DCB39BC4FF59591BE9D8E7BA45B2049A545F9611251EBE85FEA9", @@ -104,7 +106,7 @@ "full-tweets-title.min.css": "13A0CF1C96F374CED3FA59A532E28B4B620D7A4C374385A363F32AD1A7656764", "full-tweets-title.min.js": "DD57BB732ABEF7739CA84AEFF97E86F8984FCC4A8A75B957213622350B2A7C37", "gui-settings.min.css": "5413D79650A771E7ED2C2E5FBF0C70978C6BBB74A6599554B79F4295035484D7", - "gui-settings.min.html": "11001E94C551C19C1337316DB5D572903F4B472DA47786FE4209FE633A3FEC62", + "gui-settings.min.html": "E43292A60ACFE4ED684914AF7721C211AC4D651780DF2A653D7CCFCC3C31F7F0", "gui-settings.min.js": "05E3D8E28ED1EC8B1887023EA1EA112880274224B5DB3296AFF83B6A09B52412", "haruna-scale.min.js": "FD079C86741F614FD63E733CF9B7B896A7D20110754815A540F3341D4DC252B2", "hide-bangumi-reviews.min.js": "7265C0CE994FDA926355A9A4F9B207E7E68E749D47332F3C537EF93E97927A23", diff --git a/min/bundle.zip b/min/bundle.zip index 8d442038d..b899b1f4c 100644 Binary files a/min/bundle.zip and b/min/bundle.zip differ diff --git a/min/extend-feeds-live.min.css b/min/extend-feeds-live.min.css new file mode 100644 index 000000000..e6ffdb552 --- /dev/null +++ b/min/extend-feeds-live.min.css @@ -0,0 +1 @@ +.live-up-list .up-name{font-size:13px!important}.live-up-list .live-detail{color:#000}body.dark .live-up-list .live-detail{color:#eee}.live-up-list .live-detail[data-live-title]::before{content:attr(data-live-title);color:#000;font-weight:700;line-height:1.5;display:flex}body.dark .live-up-list .live-detail[data-live-title]::before{color:#eee} \ No newline at end of file diff --git a/min/extend-feeds-live.min.js b/min/extend-feeds-live.min.js new file mode 100644 index 000000000..629eabe61 --- /dev/null +++ b/min/extend-feeds-live.min.js @@ -0,0 +1 @@ +(()=>{return(e,t)=>{(async()=>{if(document.URL.replace(location.search,"")!=="https://t.bilibili.com/"){return}const e=await SpinQuery.select(".live-up-list");t.applyStyle("extendFeedsLiveStyle");const i=await Ajax.getJsonWithCredentials(`https://api.live.bilibili.com/relation/v1/feed/feed_list?page=1&pagesize=24`);if(i.code!==0){logError(`加载直播列表失败: ${i.message}`);return}const n=_.get(i,"data.list",[]);const l=dqa(e,".up-name");const a=l.map(e=>e.innerText.trim());const o=n.filter(e=>a.includes(e.uname));const r=n.filter(e=>!a.includes(e.uname));l.forEach((e,t)=>{e.parentElement.setAttribute("data-live-title",o.find(e=>e.uname===a[t]).title)});const s=e.children[0];r.forEach(t=>{const i=s.cloneNode(true);dqa(i,"a[href]").forEach(e=>e.setAttribute("href",`https://live.bilibili.com/${t.roomid}`));const n=dq(i,".live-up-img");n.style.backgroundImage=`url(${t.face})`;const l=dq(i,".live-detail");l.setAttribute("data-live-title",t.title);const a=dq(i,".up-name");a.innerHTML=t.uname;e.insertAdjacentElement("beforeend",i)});console.log(o,r)})()}})(); \ No newline at end of file diff --git a/min/fixed-sidebars.min.js b/min/fixed-sidebars.min.js index d758bc69f..42730d67a 100644 --- a/min/fixed-sidebars.min.js +++ b/min/fixed-sidebars.min.js @@ -1 +1 @@ -(()=>{return(n,t)=>{const a=`\n.custom-navbar {\n position: fixed !important;\n}\n.sticky-bar {\n display: none !important;\n}\n.left-panel, .right-panel {\n position: fixed !important;\n}\n.center-panel {\n margin-left: calc(244px + 8px) !important;\n}\n.right-panel {\n margin-left: calc(244px + 16px + 632px) !important;\n}\n`;const e="fixed-sidebars-style";const i=()=>{if(document.URL.replace(location.search,"")==="https://t.bilibili.com/"){t.applyStyleFromText(a,e)}};const o=()=>dqa("#"+e).forEach(n=>n.remove());i();return{reload:i,unload:o}}})(); \ No newline at end of file +(()=>{return(n,t)=>{const e=`\n.custom-navbar {\n position: fixed !important;\n}\n.sticky-bar {\n display: none !important;\n}\n.left-panel, .right-panel {\n position: fixed !important;\n}\n.center-panel {\n margin-left: calc(244px + 8px) !important;\n}\n.right-panel {\n margin-left: calc(244px + 16px + 632px) !important;\n}\n.live-panel .live-up-list {\n max-height: calc(100vh - 200px);\n overflow: auto;\n scrollbar-width: none !important;\n}\n.live-panel .live-up-list::-webkit-scrollbar {\n height: 0 !important;\n width: 0 !important;\n}\n`;const i="fixed-sidebars-style";let a=true;if(document.URL.replace(location.search,"")==="https://t.bilibili.com/"){(async()=>{const n=await SpinQuery.select(".live-up-list");if(n!==null){n.addEventListener("mouseenter",n=>{if(a){n.stopImmediatePropagation()}},{capture:true})}})()}const l=()=>{if(document.URL.replace(location.search,"")==="https://t.bilibili.com/"){t.applyStyleFromText(e,i);a=true}};const o=()=>{dqa("#"+i).forEach(n=>n.remove());a=false};l();return{reload:l,unload:o}}})(); \ No newline at end of file diff --git a/min/gui-settings.min.html b/min/gui-settings.min.html index 418b5e5b6..f18f7f642 100644 --- a/min/gui-settings.min.html +++ b/min/gui-settings.min.html @@ -1 +1 @@ -
附加功能
空空如也哦 = ̄ω ̄=
设置
导出设置
导入设置
\ No newline at end of file +
附加功能
空空如也哦 = ̄ω ̄=
设置
导出设置
导入设置
\ No newline at end of file diff --git a/src/activity/extend-feeds-live/extend-feeds-live.scss b/src/activity/extend-feeds-live/extend-feeds-live.scss new file mode 100644 index 000000000..a700c0fb4 --- /dev/null +++ b/src/activity/extend-feeds-live/extend-feeds-live.scss @@ -0,0 +1,21 @@ +.live-up-list { + .up-name { + font-size: 13px !important; + } + .live-detail { + color: black; + body.dark & { + color: #eee; + } + } + .live-detail[data-live-title]::before { + content: attr(data-live-title); + color: black; + font-weight: bold; + line-height: 1.5; + display: flex; + body.dark & { + color: #eee; + } + } +} diff --git a/src/activity/extend-feeds-live/extend-feeds-live.ts b/src/activity/extend-feeds-live/extend-feeds-live.ts new file mode 100644 index 000000000..b9d08875b --- /dev/null +++ b/src/activity/extend-feeds-live/extend-feeds-live.ts @@ -0,0 +1,56 @@ +interface LiveInfo { + cover: string + face: string + uname: string + title: string + roomid: number + pic: string + online: number + link: string +} +(async () => { + if (document.URL.replace(location.search, '') !== 'https://t.bilibili.com/') { + return + } + const liveList = await SpinQuery.select('.live-up-list') as HTMLElement + resources.applyStyle('extendFeedsLiveStyle') + const fullListJson = await Ajax.getJsonWithCredentials(`https://api.live.bilibili.com/relation/v1/feed/feed_list?page=1&pagesize=24`) + if (fullListJson.code !== 0) { + logError(`加载直播列表失败: ${fullListJson.message}`) + return + } + const fullList = _.get(fullListJson, 'data.list', []) as LiveInfo[] + const liveListNames = dqa(liveList, '.up-name') + const presentedNames = liveListNames.map((it: HTMLElement) => it.innerText.trim()) + const presented = fullList.filter(it => presentedNames.includes(it.uname)) + // const fakeLiveInfo = { + // cover: "https://i1.hdslb.com/bfs/face/4209b8ebcac96b1d38b6c05492877e8b21017724.jpg", + // face: "https://i1.hdslb.com/bfs/face/4209b8ebcac96b1d38b6c05492877e8b21017724.jpg", + // link: "https://live.bilibili.com/6983385", + // online: 359, + // pic: "https://i0.hdslb.com/bfs/live/new_room_cover/dbd7025817dcbcb7478e38a062f310509109dbba.jpg", + // roomid: 6983385, + // title: "pekope?", + // uname: "Snozaki筱崎", + // } + // const extend = [fakeLiveInfo, fakeLiveInfo, fakeLiveInfo, fakeLiveInfo, fakeLiveInfo, fakeLiveInfo, fakeLiveInfo, fakeLiveInfo, fakeLiveInfo, fakeLiveInfo,] as LiveInfo[] + const extend = fullList.filter(it => !presentedNames.includes(it.uname)) + liveListNames.forEach((it, index) => { + it.parentElement!.setAttribute('data-live-title', + presented.find(p => p.uname === presentedNames[index])!.title + ) + }) + const liveDetailItem = liveList.children[0] as HTMLElement + extend.forEach(it => { + const clone = liveDetailItem.cloneNode(true) as HTMLElement + dqa(clone, 'a[href]').forEach(a => a.setAttribute('href', `https://live.bilibili.com/${it.roomid}`)) + const face = dq(clone, '.live-up-img') as HTMLElement + face.style.backgroundImage = `url(${it.face})` + const detail = dq(clone, '.live-detail') as HTMLElement + detail.setAttribute('data-live-title', it.title) + const name = dq(clone, '.up-name') as HTMLElement + name.innerHTML = it.uname + liveList.insertAdjacentElement('beforeend', clone) + }) + console.log(presented, extend) +})() \ No newline at end of file diff --git a/src/activity/fixed-sidebars.ts b/src/activity/fixed-sidebars.ts index a9ef76f0d..02a57caff 100644 --- a/src/activity/fixed-sidebars.ts +++ b/src/activity/fixed-sidebars.ts @@ -1,27 +1,53 @@ const style = ` .custom-navbar { - position: fixed !important; + position: fixed !important; } .sticky-bar { - display: none !important; + display: none !important; } .left-panel, .right-panel { - position: fixed !important; + position: fixed !important; } .center-panel { - margin-left: calc(244px + 8px) !important; + margin-left: calc(244px + 8px) !important; } .right-panel { - margin-left: calc(244px + 16px + 632px) !important; + margin-left: calc(244px + 16px + 632px) !important; +} +.live-panel .live-up-list { + max-height: calc(100vh - 200px); + overflow: auto; + scrollbar-width: none !important; +} +.live-panel .live-up-list::-webkit-scrollbar { + height: 0 !important; + width: 0 !important; } ` const id = 'fixed-sidebars-style' +let disableProfilePopup = true +if (document.URL.replace(location.search, '') === 'https://t.bilibili.com/') { + (async () => { + const list = await SpinQuery.select('.live-up-list') as HTMLElement + if (list !== null) { + list.addEventListener('mouseenter', e => { + if (disableProfilePopup) { + e.stopImmediatePropagation() + } + }, { capture: true }) + } + })() +} const add = () => { if (document.URL.replace(location.search, '') === 'https://t.bilibili.com/') { resources.applyStyleFromText(style, id) + disableProfilePopup = true } } -const remove = () => dqa('#' + id).forEach(it => it.remove()) +const remove = () => { + dqa('#' + id).forEach(it => it.remove()) + disableProfilePopup = false +} add() export default { reload: add, diff --git a/src/client/resource-manifest.js b/src/client/resource-manifest.js index dda754c4e..27f67529a 100644 --- a/src/client/resource-manifest.js +++ b/src/client/resource-manifest.js @@ -858,5 +858,12 @@ Resource.manifest = { livePip: '直播画中画', }, }, + extendFeedsLive: { + path: 'extend-feeds-live.min.js', + style: true, + displayNames: { + extendFeedsLive: '直播信息扩充', + }, + }, } export const resourceManifest = Resource.manifest diff --git a/src/client/settings.js b/src/client/settings.js index b513c283f..a5a62495a 100644 --- a/src/client/settings.js +++ b/src/client/settings.js @@ -225,6 +225,7 @@ export const settings = { useDarkStyleAsUserStyle: false, autoHideSideBar: false, livePip: true, + extendFeedsLive: true, cache: {}, } const fixedSettings = { diff --git a/src/utils/gui-settings/gui-settings.html b/src/utils/gui-settings/gui-settings.html index d15795a16..2326fdfc3 100644 --- a/src/utils/gui-settings/gui-settings.html +++ b/src/utils/gui-settings/gui-settings.html @@ -118,6 +118,7 @@ + 直播