From 4530bf14e8ea61ac57442063bdcaf3c876be3993 Mon Sep 17 00:00:00 2001 From: the1812 Date: Thu, 23 Apr 2020 16:14:56 +0800 Subject: [PATCH] Fix max-height --- bilibili-evolved.offline.user.js | 6 +++--- bilibili-evolved.preview-offline.user.js | 6 +++--- bilibili-evolved.preview.user.js | 4 ++-- bilibili-evolved.user.js | 4 ++-- min/bundle.json | 4 ++-- min/bundle.zip | Bin 2189977 -> 2190137 bytes min/extend-feeds-live.min.css | 2 +- min/fixed-sidebars.min.js | 2 +- .../extend-feeds-live/extend-feeds-live.scss | 4 ++++ src/activity/fixed-sidebars.ts | 2 +- 10 files changed, 19 insertions(+), 15 deletions(-) diff --git a/bilibili-evolved.offline.user.js b/bilibili-evolved.offline.user.js index 8087f9a2a..7305d6219 100644 --- a/bilibili-evolved.offline.user.js +++ b/bilibili-evolved.offline.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name Bilibili Evolved (Offline) -// @version 647.01 +// @version 647.02 // @description Bilibili Evolved 的离线版, 所有功能都已内置于脚本中. // @author Grant Howard, Coulomb-G // @copyright 2020, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G) @@ -1295,7 +1295,7 @@ 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.css"] = `.live-up-list{max-height:calc(100vh - 320px);overflow:auto;scrollbar-width:none!important}.live-up-list::-webkit-scrollbar{height:0!important;width:0!important}.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}}}})(); @@ -1307,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 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/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 - 320px);\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))})()}}})(); diff --git a/bilibili-evolved.preview-offline.user.js b/bilibili-evolved.preview-offline.user.js index 0eb83fc7b..c15e2982a 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 647.01 +// @version 647.02 // @description Bilibili Evolved 的预览离线版, 可以抢先体验新功能, 并且所有功能都已内置于脚本中. // @author Grant Howard, Coulomb-G // @copyright 2020, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G) @@ -1295,7 +1295,7 @@ 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.css"] = `.live-up-list{max-height:calc(100vh - 320px);overflow:auto;scrollbar-width:none!important}.live-up-list::-webkit-scrollbar{height:0!important;width:0!important}.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}}}})(); @@ -1307,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 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/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 - 320px);\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))})()}}})(); diff --git a/bilibili-evolved.preview.user.js b/bilibili-evolved.preview.user.js index 726e6fd4a..dec01967b 100644 --- a/bilibili-evolved.preview.user.js +++ b/bilibili-evolved.preview.user.js @@ -1294,7 +1294,7 @@ 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.css"] = `.live-up-list{max-height:calc(100vh - 320px);overflow:auto;scrollbar-width:none!important}.live-up-list::-webkit-scrollbar{height:0!important;width:0!important}.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}}}})(); @@ -1306,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 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/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 - 320px);\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))})()}}})(); diff --git a/bilibili-evolved.user.js b/bilibili-evolved.user.js index b6f299acc..2e1853074 100644 --- a/bilibili-evolved.user.js +++ b/bilibili-evolved.user.js @@ -1294,7 +1294,7 @@ 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.css"] = `.live-up-list{max-height:calc(100vh - 320px);overflow:auto;scrollbar-width:none!important}.live-up-list::-webkit-scrollbar{height:0!important;width:0!important}.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}}}})(); @@ -1306,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 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/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 - 320px);\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))})()}}})(); diff --git a/min/bundle.json b/min/bundle.json index cb7390e92..1176827d4 100644 --- a/min/bundle.json +++ b/min/bundle.json @@ -81,7 +81,7 @@ "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.css": "A73102E5C30FD904DE51F39158B2B6F6BA02CAF583E3DFEC082E3F1EFF89DC08", "extend-feeds-live.min.js": "C0BF0CA43264C5A9413FB1DC727EEAC4620F0EDBF3B1AB89A2E538D102BB625A", "favorites-redirect.min.js": "70D6ECCE0402AA76387D2A3288C1148C60CC88D5378B7A2BDC813F3F78E4EE84", "feeds-apis.min.js": "F0D840B5D85455B8E3159C6A0286CDE78E29B99A3B89DF73FCBD489B27398163", @@ -93,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": "BAC6F19321BC7F75A28553B4F758B633C3FFB40A55326719C77421D90C0CCD7C", + "fixed-sidebars.min.js": "968B33EA1625382F15BBE3B6E610BA3234C4DAF5C16D4E9C29F61E29D9CE4D2D", "fix-fullscreen.min.js": "C0628A7CABB4421FCBD7663700EF9965C96F6D79979B9F7523A9F9B0B009C8B6", "fold-comment.min.css": "74DF4566EB80AD7078E65E8B68633E05FC41D3B4E47A20D6E415E8A743F35378", "fold-comment.min.js": "B149A9A8EA03DCB39BC4FF59591BE9D8E7BA45B2049A545F9611251EBE85FEA9", diff --git a/min/bundle.zip b/min/bundle.zip index 72fce1a2f042f4634a91ab8c7ddd229eea2f3e14..6a0cb536de6b6e1e7d200f675639a7ff242a2f79 100644 GIT binary patch delta 2140 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 E7gI8#LjV8( diff --git a/min/extend-feeds-live.min.css b/min/extend-feeds-live.min.css index e6ffdb552..b865d1620 100644 --- a/min/extend-feeds-live.min.css +++ b/min/extend-feeds-live.min.css @@ -1 +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 +.live-up-list{max-height:calc(100vh - 320px);overflow:auto;scrollbar-width:none!important}.live-up-list::-webkit-scrollbar{height:0!important;width:0!important}.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/fixed-sidebars.min.js b/min/fixed-sidebars.min.js index 42730d67a..3d9c3b564 100644 --- a/min/fixed-sidebars.min.js +++ b/min/fixed-sidebars.min.js @@ -1 +1 @@ -(()=>{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 +(()=>{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 - 320px);\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/src/activity/extend-feeds-live/extend-feeds-live.scss b/src/activity/extend-feeds-live/extend-feeds-live.scss index a700c0fb4..98ee804a0 100644 --- a/src/activity/extend-feeds-live/extend-feeds-live.scss +++ b/src/activity/extend-feeds-live/extend-feeds-live.scss @@ -1,4 +1,8 @@ +@import "../../style/common"; .live-up-list { + max-height: calc(100vh - 320px); + overflow: auto; + @include no-scrollbar(); .up-name { font-size: 13px !important; } diff --git a/src/activity/fixed-sidebars.ts b/src/activity/fixed-sidebars.ts index 02a57caff..fd5ed3f9e 100644 --- a/src/activity/fixed-sidebars.ts +++ b/src/activity/fixed-sidebars.ts @@ -15,7 +15,7 @@ const style = ` margin-left: calc(244px + 16px + 632px) !important; } .live-panel .live-up-list { - max-height: calc(100vh - 200px); + max-height: calc(100vh - 320px); overflow: auto; scrollbar-width: none !important; }