diff --git a/bilibili-evolved.offline.user.js b/bilibili-evolved.offline.user.js
index 81e575e5e..129f17ea6 100644
--- a/bilibili-evolved.offline.user.js
+++ b/bilibili-evolved.offline.user.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name Bilibili Evolved (Offline)
-// @version 809.09
+// @version 809.17
// @description Bilibili Evolved 的离线版, 所有功能都已内置于脚本中.
// @author Grant Howard, Coulomb-G
// @copyright 2020, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
@@ -1274,7 +1274,7 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/activity-apis.min.js"] = (()=>{return(t,e)=>{class s extends EventTarget{constructor(){super(...arguments);this.cards=[]}addCard(t){if(t instanceof Element&&t.classList.contains("card")){if(t.querySelector(".skeleton")!==null){const e=Observer.childList(t,()=>{if(t.querySelector(".skeleton")===null){e.forEach(t=>t.stop());this.addCard(t)}})}else{const e=this.parseCard(t);this.cards.push(e);const s=new CustomEvent("addCard",{detail:e});this.dispatchEvent(s)}}}removeCard(t){if(t instanceof Element&&t.classList.contains("card")){const e=this.parseCard(t).id;const s=this.cards.findIndex(t=>t.id===e);const r=this.cards[s];this.cards.splice(s,1);const n=new CustomEvent("removeCard",{detail:r});this.dispatchEvent(n)}}parseCard(t){const e=e=>{if(t.querySelector(e)===null){return""}return t.querySelector(e).innerText};const s=t=>{const s=parseInt(e(t));if(isNaN(s)){return 0}return s};const r={id:t.getAttribute("data-did"),username:e(".main-content .user-name"),text:e(".card-content .text.description"),reposts:s(".button-bar .single-button:nth-child(1) .text-offset"),comments:s(".button-bar .single-button:nth-child(2) .text-offset"),likes:s(".button-bar .single-button:nth-child(3) .text-offset")};return r}async startWatching(){const t=await SpinQuery.select(".card-list .content");if(!t){return false}const e=[...t.querySelectorAll(".content>.card")];e.forEach(t=>this.addCard(t));Observer.childList(t,t=>{t.forEach(t=>{t.addedNodes.forEach(t=>this.addCard(t));t.removedNodes.forEach(t=>this.removeCard(t))})});return true}}const r=new s;return{export:{activityCardsManager:r}}}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/activity-image-saver.min.js"] = (()=>{return(t,e)=>{(async()=>{if(!document.URL.startsWith("https://t.bilibili.com")&&!document.URL.startsWith("space.bilibili.com")){return}const t=t=>{const e=t.querySelector(".image-viewer");if(e===null){console.log(t)}else{e.addEventListener("contextmenu",()=>{setTimeout(()=>{const t=dq(".pop-message .toast-text");if(t&&t.innerHTML.includes("作者设置了禁止保存")){Toast.success(`
`,"解除动态存图限制")}},200)})}};[...document.body.children].filter(t=>t.classList.contains("photo-imager-container")).forEach(t);Observer.childList(document.body,e=>{e.forEach(e=>{const s=[...e.addedNodes].filter(t=>t instanceof Element&&t.classList.contains("photo-imager-container"));s.forEach(t)})})})()}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/airborne.min.css"] = `.bilibili-player-video-danmaku .b-danmaku.airborne{text-decoration:underline;cursor:pointer;pointer-events:initial}`;
-offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/airborne.min.js"] = (()=>{return(e,t)=>{(async()=>{if(!document.URL.match(/\/\/www\.bilibili\.com\/video\//)){return}const{forEachVideoDanmaku:e}=await t.importAsync("video-danmaku");t.applyStyle("airborneStyle");const n=e=>{if(!e){return NaN}const t=e.match(/(\d+)[::.](\d+)([::](\d+))?/);if(!t){return NaN}if(t[3]){const[,e,n,,a]=t.map(e=>parseInt(e));if([e,n,a].some(e=>Number.isNaN(e))){return NaN}return e*3600+n*60+a}const[,n,a]=t.map(e=>parseInt(e));if([n,a].some(e=>Number.isNaN(e))){return NaN}return n*60+a};const a=e=>{const t=e.target;if(!t.classList.contains("b-danmaku")){return}const a=n(t.textContent);if(!Number.isNaN(a)){const e=dq("video");e.currentTime=a;e.play()}};const r=e=>{const t=!Number.isNaN(n(e.text));e.element.classList.toggle("airborne",t)};e({added:r});Observer.videoChange(()=>{const e=dq(".bilibili-player-video-wrap");if(e.classList.contains("airborne-enabled")){return}e.classList.add("airborne-enabled");e.addEventListener("click",a)})})()}})();
+offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/airborne.min.js"] = (()=>{return(e,t)=>{(async()=>{if(!document.URL.match(/\/\/www\.bilibili\.com\/video\//)){return}const{forEachVideoDanmaku:e}=await t.importAsync("video-danmaku");t.applyStyle("airborneStyle");const n=e=>{if(!e){return NaN}const t=e.match(/(\d+)[ ]*[::.][ ]*(\d+)([ ]*[::][ ]*(\d+))?/);if(!t){return NaN}if(t[3]){const[,e,n,,a]=t.map(e=>parseInt(e));if([e,n,a].some(e=>Number.isNaN(e))){return NaN}return e*3600+n*60+a}const[,n,a]=t.map(e=>parseInt(e));if([n,a].some(e=>Number.isNaN(e))){return NaN}return n*60+a};const a=e=>{const t=e.target;if(!t.classList.contains("b-danmaku")){return}const a=n(t.textContent);if(!Number.isNaN(a)){const e=dq("video");e.currentTime=a;e.play()}};const r=e=>{const t=!Number.isNaN(n(e.text));e.element.classList.toggle("airborne",t)};e({added:r});Observer.videoChange(()=>{const e=dq(".bilibili-player-video-wrap");if(e.classList.contains("airborne-enabled")){return}e.classList.add("airborne-enabled");e.addEventListener("click",a)})})()}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/aria2-rpc-profile-item.vue.min.js"] = (()=>{return(e,i)=>{const t=`
{{profile.name}}
`;i.applyStyleFromText(`.profile-item{display:flex;align-items:center;padding:4px 8px;background-color:#8882;border-radius:4px;border:2px solid transparent;flex-shrink:0;cursor:pointer}.profile-item:not(:last-child){margin-right:8px}.profile-item.duplicate{border-color:red}.profile-item.selected:not(.duplicate){border-color:var(--theme-color)}.profile-item input[type=text]{width:5em;border:none!important;padding:0!important;margin:0!important;line-height:normal}`,"aria2-rpc-profile-item-style");return{export:Object.assign({template:t},{components:{Icon:()=>i.importAsync("icon.vue")},props:["profile","deletable","selected"],data(){return{name:this.profile.name,editing:false,duplicateName:false}},methods:{saveProfile(){if(this.name===this.profile.name){this.duplicateName=false;this.editing=false;return}if(this.name===""||e.aria2RpcOptionProfiles.some(e=>e.name===this.name)){this.duplicateName=true;return}else{this.duplicateName=false;if(e.aria2RpcOptionSelectedProfile===this.profile.name){e.aria2RpcOptionSelectedProfile=this.name}this.profile.name=this.name;this.editing=false;this.$emit("profile-update")}}}})}}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/aria2-rpc-profiles.vue.min.js"] = (()=>{return(e,i)=>{const r=``;i.applyStyleFromText(`.aria2-rpc-profiles .profiles-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.aria2-rpc-profiles .profiles-header .profile-operations{display:flex;align-items:center}.aria2-rpc-profiles .profiles-header .profile-operations .operation{padding:4px;background-color:#8882;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer}.aria2-rpc-profiles .profiles-header .profile-operations .operation:not(:last-child){margin-right:8px}.aria2-rpc-profiles .profiles-header .profile-operations .operation:hover{background-color:#8884}.aria2-rpc-profiles .profiles-header .profile-operations .operation .mdi{margin:0}.aria2-rpc-profiles .profiles-list{display:flex;overflow:auto;scrollbar-width:none!important}.aria2-rpc-profiles .profiles-list::-webkit-scrollbar{height:0!important}`,"aria2-rpc-profiles-style");const o={name:"未命名",...e.aria2RpcOption};return{export:Object.assign({template:r},{components:{ProfileItem:()=>i.importAsync("aria2-rpc-profile-item.vue"),Icon:()=>i.importAsync("icon.vue")},data(){this.migrateOldProfiles();const i=[...e.aria2RpcOptionProfiles];if(i.length===0){i.push(o);e.aria2RpcOptionProfiles=i}return{profiles:i,selectedProfile:e.aria2RpcOptionSelectedProfile||o.name}},watch:{selectedProfile(i){if(e.aria2RpcOptionSelectedProfile!==i){e.aria2RpcOptionSelectedProfile=i}}},methods:{migrateOldProfiles(){const i=Object.getOwnPropertyNames(e.aria2RpcOption).filter(e=>!e.startsWith("_"));i.push("name");let r=false;for(const o of e.aria2RpcOptionProfiles){i.filter(e=>!(e in o)).forEach(i=>{o[i]=e.aria2RpcOption[i];console.log(`migrated profile property '${i}'`);r=true})}if(r){e.aria2RpcOptionProfiles=e.aria2RpcOptionProfiles}},profileUpdate(){e.aria2RpcOptionProfiles=this.profiles;this.selectedProfile=e.aria2RpcOptionSelectedProfile},changeProfile(e){this.selectedProfile=e.name;this.$emit("profile-change",e)},addProfile(){const i={...this.profiles.find(e=>e.name===this.selectedProfile)};i.name=i.name.replace(/[\d]+$/,"");if(this.profiles.some(e=>e.name===i.name)){let e=1;while(this.profiles.some(r=>r.name===i.name+e.toString())){e++}i.name=i.name+e.toString()}this.profiles.push(i);e.aria2RpcOptionProfiles=this.profiles;this.changeProfile(i)},deleteProfile(){const i=this.profiles.findIndex(e=>e.name===this.selectedProfile);const r=i===0?0:i-1;const o=this.profiles[r];this.profiles.splice(i,1);e.aria2RpcOptionProfiles=this.profiles;this.changeProfile(o)}}})}}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/aria2-rpc.min.js"] = (()=>{return(t,e)=>{function o(){const e=t.aria2RpcOption;const o=e.host.match(/^http[s]?:\/\//)?e.host:"http://"+e.host;const r="aria2.addUri";return{option:e,host:o,methodName:r}}async function r(t,e=false){try{let o=await t();if(typeof o==="string"){o=JSON.parse(o)}if(o.error!==undefined){if(o.error.code===1){logError(`请求遭到拒绝, 请检查您的密钥相关设置.`)}else{logError(`请求发生错误, code = ${o.error.code}, message = ${o.error.message}`)}return false}if(!e){Toast.success(`成功发送了请求, GID = ${o.result}`,"aria2 RPC",5e3)}return true}catch(t){logError(`无法连接到RPC主机.`);return false}}async function s(t,e=false){const{option:s,host:n,methodName:a}=o();return await r(async()=>{const e=window.btoa(unescape(encodeURIComponent(JSON.stringify(t.params))));const o=`${n}:${s.port}/jsonrpc?method=${a}&id=${t.id}¶ms=${e}`;console.log(`RPC request:`,o);if(o.startsWith("http:")){return await new Promise((t,e)=>{GM.xmlHttpRequest({method:"GET",url:o,responseType:"json",onload:e=>t(e.response),onerror:t=>e(t)})})}else{return await Ajax.getJson(o)}},e)}async function n(t,e=false){const{option:s,host:n,methodName:a}=o();return await r(async()=>{const e=`${n}:${s.port}/jsonrpc`;const o={method:a,id:t.id,params:t.params};if(e.startsWith("http:")){return await new Promise((t,r)=>{GM.xmlHttpRequest({method:"POST",url:e,responseType:"json",data:JSON.stringify(o),onload:e=>t(e.response),onerror:t=>r(t)})})}else{return await Ajax.postJson(e,o)}},e)}async function a(e,o=false){const r=t.aria2RpcOption;for(const t of e){let e;if(r.method==="get"){e=await s(t,o)}else{e=await n(t,o)}if(o===true&&e===false){logError(`${decodeURIComponent(t.id)} 导出失败`)}}}return{export:{sendRpc:a}}}})();
@@ -1525,7 +1525,7 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/v-dropdown.vue.min.js"] = (()=>{return(o,r)=>{const e=`{{ value }}
`;r.applyStyleFromText(`.v-dropdown{--background-color:#eee;position:relative;background-color:var(--background-color);cursor:pointer;display:flex;align-items:center;justify-content:space-between;min-width:100px;border-radius:var(--corner-radius);line-height:normal}body.dark .v-dropdown{--background-color:#333}.v-dropdown.round{border-radius:14px;padding:0 4px}.v-dropdown .dropdown-menu{transform-origin:top;transform:translateY(-4px) translateX(-50%);pointer-events:none;opacity:0;position:absolute;top:calc(100% + 2px);left:50%;background-color:var(--background-color);z-index:1;transition:.2s ease-out;box-shadow:rgba(0,0,0,.2) 0 4px 8px 0;border-radius:var(--corner-radius)}.v-dropdown .dropdown-menu.opened{transform:translateY(0) translateX(-50%);pointer-events:initial;opacity:1}.v-dropdown .dropdown-menu li{padding:4px 16px;box-sizing:content-box;white-space:nowrap;min-width:64px;text-align:center;cursor:pointer;color:inherit;background-color:transparent;border-radius:var(--corner-radius)}.v-dropdown .dropdown-menu li:hover{background-color:rgba(0,0,0,.08)}body.dark .v-dropdown .dropdown-menu li:hover{background-color:rgba(0,0,0,.16)}.v-dropdown .mdi-chevron-down{font-size:16pt;line-height:1;transform:rotate(0)}.v-dropdown .dropdown-menu.opened~.mdi-chevron-down{transform:rotate(180deg)}.v-dropdown .selected{user-select:none;padding:4px 8px}`,"v-dropdown-style");return{export:Object.assign({template:e},{props:["items","value","round"],data(){return{dropdownOpen:false}},methods:{toggleDropdown(){this.dropdownOpen=!this.dropdownOpen;if(this.dropdownOpen){document.addEventListener("click",o=>{const r=o.target;if(r===this.$el||this.$el.contains(r)){return}this.dropdownOpen=false},{once:true,capture:true})}},select(o){if(o!==this.value){this.$emit("update:value",o);this.$emit("change",o)}}}})}}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-card-info.min.js"] = (()=>{return(r,e)=>{}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-card.vue.min.js"] = (()=>{return(e,i)=>{const t=`{{durationText}}
{{watchlater ? '已添加' : '稍后再看'}}
{{title}}
{{description}}
{{upName}}
{{like}}{{coins}}{{favorites}}{{playCount}}{{danmakuCount}}
`;i.applyStyleFromText(`.video-card{display:grid;grid-template-columns:200px 1fr;grid-template-rows:1fr 1fr 1fr;grid-template-areas:"cover title" "cover description" "cover up";height:var(--card-height);width:var(--card-width);color:#000;background-color:#fff;border-radius:16px;box-shadow:0 4px 8px 0 #0001;margin-right:var(--card-margin);margin-bottom:var(--card-margin);position:relative}body.dark .video-card,body.dark .video-card:hover{background-color:#282828;color:#eee}.video-card:hover{color:#000}.video-card.vertical{grid-template-columns:auto auto;grid-template-rows:2fr 1fr 1fr;grid-template-areas:"cover cover" "title title" "up up"}.video-card.vertical .description,.video-card.vertical .topics{display:none}.video-card.vertical .cover-container{border-radius:16px 16px 0 0}.video-card.vertical .title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;max-height:3em;word-break:break-all;white-space:normal;line-height:1.5;font-size:11pt}.video-card.vertical .up{align-self:start;white-space:nowrap}.video-card.vertical .up .name{text-overflow:ellipsis;overflow:hidden}.video-card.vertical .up:not(.no-face){margin-left:8px;max-width:calc(var(--card-width) - 16px)}.video-card.vertical .up.no-face{margin-top:8px;max-width:calc(var(--card-width) - 24px)}.video-card.vertical .stats{align-self:end;justify-self:start;margin-bottom:8px;margin-right:0}.video-card>*{justify-self:self-start;align-self:center}.video-card:hover .cover{transform:scale(1.05);transition:.1s cubic-bezier(.39,.58,.57,1)}.video-card:hover .duration,.video-card:hover .watchlater{opacity:1}.video-card .duration,.video-card .watchlater{opacity:0}.video-card .cover-container{grid-area:cover;border-radius:16px 0 0 16px;position:relative;width:100%;height:100%;overflow:hidden}.video-card .cover-container .cover{object-fit:cover;width:100%;height:100%}.video-card .cover-container>:not(.cover){position:absolute}.video-card .cover-container .duration,.video-card .cover-container .watchlater{bottom:6px;padding:4px 8px;background-color:#000a;color:#fff;border-radius:14px;height:24px;box-sizing:border-box}.video-card .cover-container .duration .mdi,.video-card .cover-container .watchlater .mdi{font-size:12pt;line-height:1;margin-right:4px}.video-card .cover-container .duration{left:6px}.video-card .cover-container .watchlater{right:6px;display:flex;align-items:center;padding-left:4px}.video-card .title{grid-area:title;font-size:12pt;font-weight:700;color:inherit;padding:0 12px;white-space:nowrap;overflow:hidden;justify-self:stretch;text-overflow:ellipsis}.video-card .topics{grid-area:description;display:flex;align-items:center;margin-left:12px}.video-card .topics .topic{color:inherit;padding:4px 8px;background-color:#8882;margin-right:8px;border-radius:14px;white-space:nowrap;max-width:120px;overflow:hidden;text-overflow:ellipsis}.video-card .topics .topic:hover{background-color:#8884;color:var(--theme-color)}.video-card .description{grid-area:description;color:inherit;overflow:hidden;align-self:stretch;justify-self:stretch;margin:0 12px;line-height:1.5;height:3em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;scrollbar-width:none!important}.video-card .description::-webkit-scrollbar{width:0!important}.video-card .description.single-line{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.video-card .stats,.video-card .up{grid-area:up}.video-card .up{margin-left:12px;display:flex;align-items:center;padding:2px;background-color:#8882;border-radius:14px;color:inherit}.video-card .up.no-face{background-color:transparent;padding:0}.video-card .up.no-face .be-icon{font-size:14pt;opacity:.75}.video-card .up .face{border-radius:50%;width:24px;height:24px}.video-card .up .name{margin:0 8px}.video-card .up:not(.no-face):hover{background-color:#8884}.video-card .up:hover .be-icon,.video-card .up:hover .name{color:var(--theme-color)}.video-card .stats{justify-self:self-end;margin-right:12px;display:flex;align-items:center;opacity:.5}.video-card .stats .be-icon{font-size:12pt;margin:0 4px 0 12px}.video-card .stats .be-icon.be-iconfont-favorites-outline{font-size:14pt}.video-card .stats .be-icon.be-iconfont-coin-outline{font-size:11pt}`,"video-card-style");return{export:Object.assign({template:t},{props:["data","orientation"],store:store,components:{"dpi-img":()=>i.importAsync("dpi-img.vue"),Icon:()=>i.importAsync("icon.vue")},data(){return{upFaceUrl:"",danmakuCount:"",like:"",coins:"",favorites:"",dynamic:"",topics:[],upID:0,epID:0,..._.omit(this.data,"watchlater"),watchlaterInit:this.data.watchlater}},computed:{vertical(){return this.orientation==="vertical"},...Vuex.mapState(["watchlaterList"]),watchlater(){if(getUID()&&this.watchlaterInit!==null){return this.watchlaterList.includes(this.aid)}else{return null}}},methods:{...Vuex.mapActions(["toggleWatchlater"])}})}}})();
-offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-danmaku.min.js"] = (()=>{return(e,t)=>{let n;const r=[];const a=e=>{return{element:e,reuse:false,text:e.textContent||""}};const o=(e,t)=>{if(n){n.stop()}n=Observer.observe(e,e=>{e.forEach(e=>{if(e.type==="childList"){e.addedNodes.forEach(e=>{if(!(e instanceof HTMLElement)){return}const n=a(e);r.push(n);t.added&&t.added(n)});e.removedNodes.forEach(e=>{if(!(e instanceof HTMLElement)){return}const n=r.findIndex(t=>t.element===e);if(n!==-1){const[e]=r.splice(n,1);t.removed&&t.removed(e)}})}else if(e.type==="characterData"){const n=e.target;const a=r.find(e=>e.element===n);if(!a){return}a.text=n.textContent||"";a.reuse=true;t.added&&t.added(a)}})},{childList:true,characterData:true,subtree:true})};const d=async e=>{const t=await videoCondition();if(!t){return}Observer.videoChange(async()=>{const t=await SpinQuery.select(".bilibili-player-video-danmaku");if(!t){return}o(t,e)})};return{export:{forEachVideoDanmaku:d}}}})();
+offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-danmaku.min.js"] = (()=>{return(e,t)=>{let n;const r=[];const o=e=>{return{element:e,reuse:false,text:e.textContent||""}};const d=(e,t)=>{if(n){n.stop()}n=Observer.observe(e,e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{if(e.nodeType===Node.TEXT_NODE){const n=e.parentElement;const o=r.find(e=>e.element===n);if(!o){return}o.text=e.textContent||"";o.reuse=true;t.added&&t.added(o);return}if(!(e instanceof HTMLElement)){return}const n=o(e);r.push(n);t.added&&t.added(n)});e.removedNodes.forEach(e=>{if(!(e instanceof HTMLElement)){return}const n=r.findIndex(t=>t.element===e);if(n!==-1){const[e]=r.splice(n,1);t.removed&&t.removed(e)}})})},{childList:true,subtree:true})};const s=async e=>{const t=await videoCondition();if(!t){return}Observer.videoChange(async()=>{const t=await SpinQuery.select(".bilibili-player-video-danmaku");if(!t){return}d(t,e)})};return{export:{forEachVideoDanmaku:s}}}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-dash.min.js"] = (()=>{return(t,e)=>{const a=t=>{return{url:t.downloadUrl,backupUrls:t.backupUrls,length:t.duration,size:Math.trunc(t.bandWidth*t.duration/8)}};const r=e=>{console.log(e.videoDashes);const r=(()=>{const a=e=>e.videoCodec===t.downloadVideoDashCodec;if(e.videoDashes.some(a)){return e.videoDashes.filter(a).sort(ascendingSort(t=>t.bandWidth))[0]}else{return e.videoDashes.sort(ascendingSort(t=>t.bandWidth))[0]}})();if(e.audioDashes.length>0){const t=e.audioDashes.sort(descendingSort(t=>t.bandWidth))[0];return[a(r),a(t)]}else{return[a(r)]}};const o=async(t,a,r=false)=>{const o=await Ajax.getJsonWithCredentials(t);const s=o.data||o.result||o;if(o.code!==0){throw new Error(`API请求失败: ${o.code} ${o.message}`)}if(!s.dash){throw new Error("此视频没有DASH格式, 请改用FLV格式")}const d=s.accept_quality;if(!d.includes(a)&&!r){throw new Error("没有找到请求的清晰度")}if(s.quality!==a&&!r){const{throwQualityError:t}=await e.importAsync("quality-errors");t(a)}const c=s.accept_description;const n=c[d.indexOf(a)];const i=s.dash.duration;const h=s.dash.video.filter(t=>t.id===(r?s.quality:a)).map(t=>{const e=(()=>{switch(t.codecid){case 12:return"HEVC/H.265";default:case 7:return"AVC/H.264"}})();const r={quality:a,qualityText:n,width:t.width,height:t.height,codecs:t.codecs,codecId:t.codecid,bandWidth:t.bandwidth,frameRate:t.frameRate,backupUrls:(t.backupUrl||t.backup_url||[]).forEach(t=>t.replace("http:","https:")),downloadUrl:(t.baseUrl||t.base_url||"").replace("http:","https:"),duration:i,videoCodec:e};return r});const u=(s.dash.audio||[]).map(t=>{return{bandWidth:t.bandwidth,codecs:t.codecs,codecId:t.codecid,backupUrls:(t.backupUrl||t.backup_url||[]).forEach(t=>t.replace("http:","https:")),downloadUrl:(t.baseUrl||t.base_url||"").replace("http:","https:"),duration:i}});return{videoDashes:h,audioDashes:u}};return{export:{getDashInfo:o,dashToFragments:r}}}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-downloader-fragment.min.js"] = (()=>{return(r,e)=>{}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-info.min.js"] = (()=>{return(t,i)=>{class e{constructor(t){this.aid=t}async fetchInfo(){let t;if(this.cid){t=`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}&cid=${this.cid}`}else{t=`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}`}const i=JSON.parse(await Ajax.getText(t));if(i.code!==0){throw new Error(i.message)}const e=i.data;this.cid=e.cid;this.pageCount=e.videos;this.coverUrl=e.pic.replace("http:","https:");this.tagId=e.tid;this.tagName=e.tname;this.title=e.title;this.description=e.desc;this.up={uid:e.owner.mid,name:e.owner.name,faceUrl:e.owner.face.replace("http:","https:")};this.pages=e.pages.map(t=>{return{cid:t.cid,title:t.part,pageNumber:t.page}});this.subtitles=e.subtitle.list.map(t=>{return{id:t.id,languageCode:t.lan,language:t.lan_doc,url:t.subtitle_url.replace("http:","https:")}});return this}async fetchDanmaku(){this.danmaku=new s(this.cid.toString());return this.danmaku.fetchInfo()}}class a{constructor(t,i){this.text=t;this.p=i}}class s{constructor(t){this.cid=t}async fetchInfo(){const t=await Ajax.getText(`https://api.bilibili.com/x/v1/dm/list.so?oid=${this.cid}`);this.rawXML=t}}class n{constructor(t){this.ep=t;this.videos=[]}async fetchInfo(){const t=await Ajax.getText(`https://www.bilibili.com/bangumi/play/ep${this.ep}/`);const i=JSON.parse(t.match(/window\.__INITIAL_STATE__=(.*);\(function\(\){/)[1]);this.title=i.mediaInfo.title;this.cover=i.mediaInfo.cover;this.squareCover=i.mediaInfo.square_cover;this.aid=i.epInfo.aid;this.cid=i.epInfo.cid;this.videos=i.epList.map(async t=>{return{title:t.index_title,aid:t.aid,cid:t.cid,info:await new e(t.aid).fetchInfo()}});return this}}return{export:{VideoInfo:e,BangumiInfo:n,Danmaku:a,DanmakuInfo:s}}}})();
diff --git a/bilibili-evolved.preview-offline.user.js b/bilibili-evolved.preview-offline.user.js
index 31bda68c9..bd6b447ae 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 809.09
+// @version 809.17
// @description Bilibili Evolved 的预览离线版, 可以抢先体验新功能, 并且所有功能都已内置于脚本中.
// @author Grant Howard, Coulomb-G
// @copyright 2020, Grant Howard (https://github.com/the1812) & Coulomb-G (https://github.com/Coulomb-G)
@@ -1274,7 +1274,7 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/activity-apis.min.js"] = (()=>{return(t,e)=>{class s extends EventTarget{constructor(){super(...arguments);this.cards=[]}addCard(t){if(t instanceof Element&&t.classList.contains("card")){if(t.querySelector(".skeleton")!==null){const e=Observer.childList(t,()=>{if(t.querySelector(".skeleton")===null){e.forEach(t=>t.stop());this.addCard(t)}})}else{const e=this.parseCard(t);this.cards.push(e);const s=new CustomEvent("addCard",{detail:e});this.dispatchEvent(s)}}}removeCard(t){if(t instanceof Element&&t.classList.contains("card")){const e=this.parseCard(t).id;const s=this.cards.findIndex(t=>t.id===e);const r=this.cards[s];this.cards.splice(s,1);const n=new CustomEvent("removeCard",{detail:r});this.dispatchEvent(n)}}parseCard(t){const e=e=>{if(t.querySelector(e)===null){return""}return t.querySelector(e).innerText};const s=t=>{const s=parseInt(e(t));if(isNaN(s)){return 0}return s};const r={id:t.getAttribute("data-did"),username:e(".main-content .user-name"),text:e(".card-content .text.description"),reposts:s(".button-bar .single-button:nth-child(1) .text-offset"),comments:s(".button-bar .single-button:nth-child(2) .text-offset"),likes:s(".button-bar .single-button:nth-child(3) .text-offset")};return r}async startWatching(){const t=await SpinQuery.select(".card-list .content");if(!t){return false}const e=[...t.querySelectorAll(".content>.card")];e.forEach(t=>this.addCard(t));Observer.childList(t,t=>{t.forEach(t=>{t.addedNodes.forEach(t=>this.addCard(t));t.removedNodes.forEach(t=>this.removeCard(t))})});return true}}const r=new s;return{export:{activityCardsManager:r}}}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/activity-image-saver.min.js"] = (()=>{return(t,e)=>{(async()=>{if(!document.URL.startsWith("https://t.bilibili.com")&&!document.URL.startsWith("space.bilibili.com")){return}const t=t=>{const e=t.querySelector(".image-viewer");if(e===null){console.log(t)}else{e.addEventListener("contextmenu",()=>{setTimeout(()=>{const t=dq(".pop-message .toast-text");if(t&&t.innerHTML.includes("作者设置了禁止保存")){Toast.success(`
`,"解除动态存图限制")}},200)})}};[...document.body.children].filter(t=>t.classList.contains("photo-imager-container")).forEach(t);Observer.childList(document.body,e=>{e.forEach(e=>{const s=[...e.addedNodes].filter(t=>t instanceof Element&&t.classList.contains("photo-imager-container"));s.forEach(t)})})})()}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/airborne.min.css"] = `.bilibili-player-video-danmaku .b-danmaku.airborne{text-decoration:underline;cursor:pointer;pointer-events:initial}`;
-offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/airborne.min.js"] = (()=>{return(e,t)=>{(async()=>{if(!document.URL.match(/\/\/www\.bilibili\.com\/video\//)){return}const{forEachVideoDanmaku:e}=await t.importAsync("video-danmaku");t.applyStyle("airborneStyle");const n=e=>{if(!e){return NaN}const t=e.match(/(\d+)[::.](\d+)([::](\d+))?/);if(!t){return NaN}if(t[3]){const[,e,n,,a]=t.map(e=>parseInt(e));if([e,n,a].some(e=>Number.isNaN(e))){return NaN}return e*3600+n*60+a}const[,n,a]=t.map(e=>parseInt(e));if([n,a].some(e=>Number.isNaN(e))){return NaN}return n*60+a};const a=e=>{const t=e.target;if(!t.classList.contains("b-danmaku")){return}const a=n(t.textContent);if(!Number.isNaN(a)){const e=dq("video");e.currentTime=a;e.play()}};const r=e=>{const t=!Number.isNaN(n(e.text));e.element.classList.toggle("airborne",t)};e({added:r});Observer.videoChange(()=>{const e=dq(".bilibili-player-video-wrap");if(e.classList.contains("airborne-enabled")){return}e.classList.add("airborne-enabled");e.addEventListener("click",a)})})()}})();
+offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/airborne.min.js"] = (()=>{return(e,t)=>{(async()=>{if(!document.URL.match(/\/\/www\.bilibili\.com\/video\//)){return}const{forEachVideoDanmaku:e}=await t.importAsync("video-danmaku");t.applyStyle("airborneStyle");const n=e=>{if(!e){return NaN}const t=e.match(/(\d+)[ ]*[::.][ ]*(\d+)([ ]*[::][ ]*(\d+))?/);if(!t){return NaN}if(t[3]){const[,e,n,,a]=t.map(e=>parseInt(e));if([e,n,a].some(e=>Number.isNaN(e))){return NaN}return e*3600+n*60+a}const[,n,a]=t.map(e=>parseInt(e));if([n,a].some(e=>Number.isNaN(e))){return NaN}return n*60+a};const a=e=>{const t=e.target;if(!t.classList.contains("b-danmaku")){return}const a=n(t.textContent);if(!Number.isNaN(a)){const e=dq("video");e.currentTime=a;e.play()}};const r=e=>{const t=!Number.isNaN(n(e.text));e.element.classList.toggle("airborne",t)};e({added:r});Observer.videoChange(()=>{const e=dq(".bilibili-player-video-wrap");if(e.classList.contains("airborne-enabled")){return}e.classList.add("airborne-enabled");e.addEventListener("click",a)})})()}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/aria2-rpc-profile-item.vue.min.js"] = (()=>{return(e,i)=>{const t=`{{profile.name}}
`;i.applyStyleFromText(`.profile-item{display:flex;align-items:center;padding:4px 8px;background-color:#8882;border-radius:4px;border:2px solid transparent;flex-shrink:0;cursor:pointer}.profile-item:not(:last-child){margin-right:8px}.profile-item.duplicate{border-color:red}.profile-item.selected:not(.duplicate){border-color:var(--theme-color)}.profile-item input[type=text]{width:5em;border:none!important;padding:0!important;margin:0!important;line-height:normal}`,"aria2-rpc-profile-item-style");return{export:Object.assign({template:t},{components:{Icon:()=>i.importAsync("icon.vue")},props:["profile","deletable","selected"],data(){return{name:this.profile.name,editing:false,duplicateName:false}},methods:{saveProfile(){if(this.name===this.profile.name){this.duplicateName=false;this.editing=false;return}if(this.name===""||e.aria2RpcOptionProfiles.some(e=>e.name===this.name)){this.duplicateName=true;return}else{this.duplicateName=false;if(e.aria2RpcOptionSelectedProfile===this.profile.name){e.aria2RpcOptionSelectedProfile=this.name}this.profile.name=this.name;this.editing=false;this.$emit("profile-update")}}}})}}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/aria2-rpc-profiles.vue.min.js"] = (()=>{return(e,i)=>{const r=``;i.applyStyleFromText(`.aria2-rpc-profiles .profiles-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.aria2-rpc-profiles .profiles-header .profile-operations{display:flex;align-items:center}.aria2-rpc-profiles .profiles-header .profile-operations .operation{padding:4px;background-color:#8882;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer}.aria2-rpc-profiles .profiles-header .profile-operations .operation:not(:last-child){margin-right:8px}.aria2-rpc-profiles .profiles-header .profile-operations .operation:hover{background-color:#8884}.aria2-rpc-profiles .profiles-header .profile-operations .operation .mdi{margin:0}.aria2-rpc-profiles .profiles-list{display:flex;overflow:auto;scrollbar-width:none!important}.aria2-rpc-profiles .profiles-list::-webkit-scrollbar{height:0!important}`,"aria2-rpc-profiles-style");const o={name:"未命名",...e.aria2RpcOption};return{export:Object.assign({template:r},{components:{ProfileItem:()=>i.importAsync("aria2-rpc-profile-item.vue"),Icon:()=>i.importAsync("icon.vue")},data(){this.migrateOldProfiles();const i=[...e.aria2RpcOptionProfiles];if(i.length===0){i.push(o);e.aria2RpcOptionProfiles=i}return{profiles:i,selectedProfile:e.aria2RpcOptionSelectedProfile||o.name}},watch:{selectedProfile(i){if(e.aria2RpcOptionSelectedProfile!==i){e.aria2RpcOptionSelectedProfile=i}}},methods:{migrateOldProfiles(){const i=Object.getOwnPropertyNames(e.aria2RpcOption).filter(e=>!e.startsWith("_"));i.push("name");let r=false;for(const o of e.aria2RpcOptionProfiles){i.filter(e=>!(e in o)).forEach(i=>{o[i]=e.aria2RpcOption[i];console.log(`migrated profile property '${i}'`);r=true})}if(r){e.aria2RpcOptionProfiles=e.aria2RpcOptionProfiles}},profileUpdate(){e.aria2RpcOptionProfiles=this.profiles;this.selectedProfile=e.aria2RpcOptionSelectedProfile},changeProfile(e){this.selectedProfile=e.name;this.$emit("profile-change",e)},addProfile(){const i={...this.profiles.find(e=>e.name===this.selectedProfile)};i.name=i.name.replace(/[\d]+$/,"");if(this.profiles.some(e=>e.name===i.name)){let e=1;while(this.profiles.some(r=>r.name===i.name+e.toString())){e++}i.name=i.name+e.toString()}this.profiles.push(i);e.aria2RpcOptionProfiles=this.profiles;this.changeProfile(i)},deleteProfile(){const i=this.profiles.findIndex(e=>e.name===this.selectedProfile);const r=i===0?0:i-1;const o=this.profiles[r];this.profiles.splice(i,1);e.aria2RpcOptionProfiles=this.profiles;this.changeProfile(o)}}})}}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/aria2-rpc.min.js"] = (()=>{return(t,e)=>{function o(){const e=t.aria2RpcOption;const o=e.host.match(/^http[s]?:\/\//)?e.host:"http://"+e.host;const r="aria2.addUri";return{option:e,host:o,methodName:r}}async function r(t,e=false){try{let o=await t();if(typeof o==="string"){o=JSON.parse(o)}if(o.error!==undefined){if(o.error.code===1){logError(`请求遭到拒绝, 请检查您的密钥相关设置.`)}else{logError(`请求发生错误, code = ${o.error.code}, message = ${o.error.message}`)}return false}if(!e){Toast.success(`成功发送了请求, GID = ${o.result}`,"aria2 RPC",5e3)}return true}catch(t){logError(`无法连接到RPC主机.`);return false}}async function s(t,e=false){const{option:s,host:n,methodName:a}=o();return await r(async()=>{const e=window.btoa(unescape(encodeURIComponent(JSON.stringify(t.params))));const o=`${n}:${s.port}/jsonrpc?method=${a}&id=${t.id}¶ms=${e}`;console.log(`RPC request:`,o);if(o.startsWith("http:")){return await new Promise((t,e)=>{GM.xmlHttpRequest({method:"GET",url:o,responseType:"json",onload:e=>t(e.response),onerror:t=>e(t)})})}else{return await Ajax.getJson(o)}},e)}async function n(t,e=false){const{option:s,host:n,methodName:a}=o();return await r(async()=>{const e=`${n}:${s.port}/jsonrpc`;const o={method:a,id:t.id,params:t.params};if(e.startsWith("http:")){return await new Promise((t,r)=>{GM.xmlHttpRequest({method:"POST",url:e,responseType:"json",data:JSON.stringify(o),onload:e=>t(e.response),onerror:t=>r(t)})})}else{return await Ajax.postJson(e,o)}},e)}async function a(e,o=false){const r=t.aria2RpcOption;for(const t of e){let e;if(r.method==="get"){e=await s(t,o)}else{e=await n(t,o)}if(o===true&&e===false){logError(`${decodeURIComponent(t.id)} 导出失败`)}}}return{export:{sendRpc:a}}}})();
@@ -1525,7 +1525,7 @@ offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/m
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/v-dropdown.vue.min.js"] = (()=>{return(o,r)=>{const e=`{{ value }}
`;r.applyStyleFromText(`.v-dropdown{--background-color:#eee;position:relative;background-color:var(--background-color);cursor:pointer;display:flex;align-items:center;justify-content:space-between;min-width:100px;border-radius:var(--corner-radius);line-height:normal}body.dark .v-dropdown{--background-color:#333}.v-dropdown.round{border-radius:14px;padding:0 4px}.v-dropdown .dropdown-menu{transform-origin:top;transform:translateY(-4px) translateX(-50%);pointer-events:none;opacity:0;position:absolute;top:calc(100% + 2px);left:50%;background-color:var(--background-color);z-index:1;transition:.2s ease-out;box-shadow:rgba(0,0,0,.2) 0 4px 8px 0;border-radius:var(--corner-radius)}.v-dropdown .dropdown-menu.opened{transform:translateY(0) translateX(-50%);pointer-events:initial;opacity:1}.v-dropdown .dropdown-menu li{padding:4px 16px;box-sizing:content-box;white-space:nowrap;min-width:64px;text-align:center;cursor:pointer;color:inherit;background-color:transparent;border-radius:var(--corner-radius)}.v-dropdown .dropdown-menu li:hover{background-color:rgba(0,0,0,.08)}body.dark .v-dropdown .dropdown-menu li:hover{background-color:rgba(0,0,0,.16)}.v-dropdown .mdi-chevron-down{font-size:16pt;line-height:1;transform:rotate(0)}.v-dropdown .dropdown-menu.opened~.mdi-chevron-down{transform:rotate(180deg)}.v-dropdown .selected{user-select:none;padding:4px 8px}`,"v-dropdown-style");return{export:Object.assign({template:e},{props:["items","value","round"],data(){return{dropdownOpen:false}},methods:{toggleDropdown(){this.dropdownOpen=!this.dropdownOpen;if(this.dropdownOpen){document.addEventListener("click",o=>{const r=o.target;if(r===this.$el||this.$el.contains(r)){return}this.dropdownOpen=false},{once:true,capture:true})}},select(o){if(o!==this.value){this.$emit("update:value",o);this.$emit("change",o)}}}})}}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-card-info.min.js"] = (()=>{return(r,e)=>{}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-card.vue.min.js"] = (()=>{return(e,i)=>{const t=`{{durationText}}
{{watchlater ? '已添加' : '稍后再看'}}
{{title}}
{{description}}
{{upName}}
{{like}}{{coins}}{{favorites}}{{playCount}}{{danmakuCount}}
`;i.applyStyleFromText(`.video-card{display:grid;grid-template-columns:200px 1fr;grid-template-rows:1fr 1fr 1fr;grid-template-areas:"cover title" "cover description" "cover up";height:var(--card-height);width:var(--card-width);color:#000;background-color:#fff;border-radius:16px;box-shadow:0 4px 8px 0 #0001;margin-right:var(--card-margin);margin-bottom:var(--card-margin);position:relative}body.dark .video-card,body.dark .video-card:hover{background-color:#282828;color:#eee}.video-card:hover{color:#000}.video-card.vertical{grid-template-columns:auto auto;grid-template-rows:2fr 1fr 1fr;grid-template-areas:"cover cover" "title title" "up up"}.video-card.vertical .description,.video-card.vertical .topics{display:none}.video-card.vertical .cover-container{border-radius:16px 16px 0 0}.video-card.vertical .title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;max-height:3em;word-break:break-all;white-space:normal;line-height:1.5;font-size:11pt}.video-card.vertical .up{align-self:start;white-space:nowrap}.video-card.vertical .up .name{text-overflow:ellipsis;overflow:hidden}.video-card.vertical .up:not(.no-face){margin-left:8px;max-width:calc(var(--card-width) - 16px)}.video-card.vertical .up.no-face{margin-top:8px;max-width:calc(var(--card-width) - 24px)}.video-card.vertical .stats{align-self:end;justify-self:start;margin-bottom:8px;margin-right:0}.video-card>*{justify-self:self-start;align-self:center}.video-card:hover .cover{transform:scale(1.05);transition:.1s cubic-bezier(.39,.58,.57,1)}.video-card:hover .duration,.video-card:hover .watchlater{opacity:1}.video-card .duration,.video-card .watchlater{opacity:0}.video-card .cover-container{grid-area:cover;border-radius:16px 0 0 16px;position:relative;width:100%;height:100%;overflow:hidden}.video-card .cover-container .cover{object-fit:cover;width:100%;height:100%}.video-card .cover-container>:not(.cover){position:absolute}.video-card .cover-container .duration,.video-card .cover-container .watchlater{bottom:6px;padding:4px 8px;background-color:#000a;color:#fff;border-radius:14px;height:24px;box-sizing:border-box}.video-card .cover-container .duration .mdi,.video-card .cover-container .watchlater .mdi{font-size:12pt;line-height:1;margin-right:4px}.video-card .cover-container .duration{left:6px}.video-card .cover-container .watchlater{right:6px;display:flex;align-items:center;padding-left:4px}.video-card .title{grid-area:title;font-size:12pt;font-weight:700;color:inherit;padding:0 12px;white-space:nowrap;overflow:hidden;justify-self:stretch;text-overflow:ellipsis}.video-card .topics{grid-area:description;display:flex;align-items:center;margin-left:12px}.video-card .topics .topic{color:inherit;padding:4px 8px;background-color:#8882;margin-right:8px;border-radius:14px;white-space:nowrap;max-width:120px;overflow:hidden;text-overflow:ellipsis}.video-card .topics .topic:hover{background-color:#8884;color:var(--theme-color)}.video-card .description{grid-area:description;color:inherit;overflow:hidden;align-self:stretch;justify-self:stretch;margin:0 12px;line-height:1.5;height:3em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;scrollbar-width:none!important}.video-card .description::-webkit-scrollbar{width:0!important}.video-card .description.single-line{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.video-card .stats,.video-card .up{grid-area:up}.video-card .up{margin-left:12px;display:flex;align-items:center;padding:2px;background-color:#8882;border-radius:14px;color:inherit}.video-card .up.no-face{background-color:transparent;padding:0}.video-card .up.no-face .be-icon{font-size:14pt;opacity:.75}.video-card .up .face{border-radius:50%;width:24px;height:24px}.video-card .up .name{margin:0 8px}.video-card .up:not(.no-face):hover{background-color:#8884}.video-card .up:hover .be-icon,.video-card .up:hover .name{color:var(--theme-color)}.video-card .stats{justify-self:self-end;margin-right:12px;display:flex;align-items:center;opacity:.5}.video-card .stats .be-icon{font-size:12pt;margin:0 4px 0 12px}.video-card .stats .be-icon.be-iconfont-favorites-outline{font-size:14pt}.video-card .stats .be-icon.be-iconfont-coin-outline{font-size:11pt}`,"video-card-style");return{export:Object.assign({template:t},{props:["data","orientation"],store:store,components:{"dpi-img":()=>i.importAsync("dpi-img.vue"),Icon:()=>i.importAsync("icon.vue")},data(){return{upFaceUrl:"",danmakuCount:"",like:"",coins:"",favorites:"",dynamic:"",topics:[],upID:0,epID:0,..._.omit(this.data,"watchlater"),watchlaterInit:this.data.watchlater}},computed:{vertical(){return this.orientation==="vertical"},...Vuex.mapState(["watchlaterList"]),watchlater(){if(getUID()&&this.watchlaterInit!==null){return this.watchlaterList.includes(this.aid)}else{return null}}},methods:{...Vuex.mapActions(["toggleWatchlater"])}})}}})();
-offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-danmaku.min.js"] = (()=>{return(e,t)=>{let n;const r=[];const a=e=>{return{element:e,reuse:false,text:e.textContent||""}};const o=(e,t)=>{if(n){n.stop()}n=Observer.observe(e,e=>{e.forEach(e=>{if(e.type==="childList"){e.addedNodes.forEach(e=>{if(!(e instanceof HTMLElement)){return}const n=a(e);r.push(n);t.added&&t.added(n)});e.removedNodes.forEach(e=>{if(!(e instanceof HTMLElement)){return}const n=r.findIndex(t=>t.element===e);if(n!==-1){const[e]=r.splice(n,1);t.removed&&t.removed(e)}})}else if(e.type==="characterData"){const n=e.target;const a=r.find(e=>e.element===n);if(!a){return}a.text=n.textContent||"";a.reuse=true;t.added&&t.added(a)}})},{childList:true,characterData:true,subtree:true})};const d=async e=>{const t=await videoCondition();if(!t){return}Observer.videoChange(async()=>{const t=await SpinQuery.select(".bilibili-player-video-danmaku");if(!t){return}o(t,e)})};return{export:{forEachVideoDanmaku:d}}}})();
+offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-danmaku.min.js"] = (()=>{return(e,t)=>{let n;const r=[];const o=e=>{return{element:e,reuse:false,text:e.textContent||""}};const d=(e,t)=>{if(n){n.stop()}n=Observer.observe(e,e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{if(e.nodeType===Node.TEXT_NODE){const n=e.parentElement;const o=r.find(e=>e.element===n);if(!o){return}o.text=e.textContent||"";o.reuse=true;t.added&&t.added(o);return}if(!(e instanceof HTMLElement)){return}const n=o(e);r.push(n);t.added&&t.added(n)});e.removedNodes.forEach(e=>{if(!(e instanceof HTMLElement)){return}const n=r.findIndex(t=>t.element===e);if(n!==-1){const[e]=r.splice(n,1);t.removed&&t.removed(e)}})})},{childList:true,subtree:true})};const s=async e=>{const t=await videoCondition();if(!t){return}Observer.videoChange(async()=>{const t=await SpinQuery.select(".bilibili-player-video-danmaku");if(!t){return}d(t,e)})};return{export:{forEachVideoDanmaku:s}}}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-dash.min.js"] = (()=>{return(t,e)=>{const a=t=>{return{url:t.downloadUrl,backupUrls:t.backupUrls,length:t.duration,size:Math.trunc(t.bandWidth*t.duration/8)}};const r=e=>{console.log(e.videoDashes);const r=(()=>{const a=e=>e.videoCodec===t.downloadVideoDashCodec;if(e.videoDashes.some(a)){return e.videoDashes.filter(a).sort(ascendingSort(t=>t.bandWidth))[0]}else{return e.videoDashes.sort(ascendingSort(t=>t.bandWidth))[0]}})();if(e.audioDashes.length>0){const t=e.audioDashes.sort(descendingSort(t=>t.bandWidth))[0];return[a(r),a(t)]}else{return[a(r)]}};const o=async(t,a,r=false)=>{const o=await Ajax.getJsonWithCredentials(t);const s=o.data||o.result||o;if(o.code!==0){throw new Error(`API请求失败: ${o.code} ${o.message}`)}if(!s.dash){throw new Error("此视频没有DASH格式, 请改用FLV格式")}const d=s.accept_quality;if(!d.includes(a)&&!r){throw new Error("没有找到请求的清晰度")}if(s.quality!==a&&!r){const{throwQualityError:t}=await e.importAsync("quality-errors");t(a)}const c=s.accept_description;const n=c[d.indexOf(a)];const i=s.dash.duration;const h=s.dash.video.filter(t=>t.id===(r?s.quality:a)).map(t=>{const e=(()=>{switch(t.codecid){case 12:return"HEVC/H.265";default:case 7:return"AVC/H.264"}})();const r={quality:a,qualityText:n,width:t.width,height:t.height,codecs:t.codecs,codecId:t.codecid,bandWidth:t.bandwidth,frameRate:t.frameRate,backupUrls:(t.backupUrl||t.backup_url||[]).forEach(t=>t.replace("http:","https:")),downloadUrl:(t.baseUrl||t.base_url||"").replace("http:","https:"),duration:i,videoCodec:e};return r});const u=(s.dash.audio||[]).map(t=>{return{bandWidth:t.bandwidth,codecs:t.codecs,codecId:t.codecid,backupUrls:(t.backupUrl||t.backup_url||[]).forEach(t=>t.replace("http:","https:")),downloadUrl:(t.baseUrl||t.base_url||"").replace("http:","https:"),duration:i}});return{videoDashes:h,audioDashes:u}};return{export:{getDashInfo:o,dashToFragments:r}}}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-downloader-fragment.min.js"] = (()=>{return(r,e)=>{}})();
offlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-info.min.js"] = (()=>{return(t,i)=>{class e{constructor(t){this.aid=t}async fetchInfo(){let t;if(this.cid){t=`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}&cid=${this.cid}`}else{t=`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}`}const i=JSON.parse(await Ajax.getText(t));if(i.code!==0){throw new Error(i.message)}const e=i.data;this.cid=e.cid;this.pageCount=e.videos;this.coverUrl=e.pic.replace("http:","https:");this.tagId=e.tid;this.tagName=e.tname;this.title=e.title;this.description=e.desc;this.up={uid:e.owner.mid,name:e.owner.name,faceUrl:e.owner.face.replace("http:","https:")};this.pages=e.pages.map(t=>{return{cid:t.cid,title:t.part,pageNumber:t.page}});this.subtitles=e.subtitle.list.map(t=>{return{id:t.id,languageCode:t.lan,language:t.lan_doc,url:t.subtitle_url.replace("http:","https:")}});return this}async fetchDanmaku(){this.danmaku=new s(this.cid.toString());return this.danmaku.fetchInfo()}}class a{constructor(t,i){this.text=t;this.p=i}}class s{constructor(t){this.cid=t}async fetchInfo(){const t=await Ajax.getText(`https://api.bilibili.com/x/v1/dm/list.so?oid=${this.cid}`);this.rawXML=t}}class n{constructor(t){this.ep=t;this.videos=[]}async fetchInfo(){const t=await Ajax.getText(`https://www.bilibili.com/bangumi/play/ep${this.ep}/`);const i=JSON.parse(t.match(/window\.__INITIAL_STATE__=(.*);\(function\(\){/)[1]);this.title=i.mediaInfo.title;this.cover=i.mediaInfo.cover;this.squareCover=i.mediaInfo.square_cover;this.aid=i.epInfo.aid;this.cid=i.epInfo.cid;this.videos=i.epList.map(async t=>{return{title:t.index_title,aid:t.aid,cid:t.cid,info:await new e(t.aid).fetchInfo()}});return this}}return{export:{VideoInfo:e,BangumiInfo:n,Danmaku:a,DanmakuInfo:s}}}})();
diff --git a/bilibili-evolved.preview.user.js b/bilibili-evolved.preview.user.js
index ddb1ba0d2..28ae15f06 100644
--- a/bilibili-evolved.preview.user.js
+++ b/bilibili-evolved.preview.user.js
@@ -1273,7 +1273,7 @@ onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/m
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/activity-apis.min.js"] = (()=>{return(t,e)=>{class s extends EventTarget{constructor(){super(...arguments);this.cards=[]}addCard(t){if(t instanceof Element&&t.classList.contains("card")){if(t.querySelector(".skeleton")!==null){const e=Observer.childList(t,()=>{if(t.querySelector(".skeleton")===null){e.forEach(t=>t.stop());this.addCard(t)}})}else{const e=this.parseCard(t);this.cards.push(e);const s=new CustomEvent("addCard",{detail:e});this.dispatchEvent(s)}}}removeCard(t){if(t instanceof Element&&t.classList.contains("card")){const e=this.parseCard(t).id;const s=this.cards.findIndex(t=>t.id===e);const r=this.cards[s];this.cards.splice(s,1);const n=new CustomEvent("removeCard",{detail:r});this.dispatchEvent(n)}}parseCard(t){const e=e=>{if(t.querySelector(e)===null){return""}return t.querySelector(e).innerText};const s=t=>{const s=parseInt(e(t));if(isNaN(s)){return 0}return s};const r={id:t.getAttribute("data-did"),username:e(".main-content .user-name"),text:e(".card-content .text.description"),reposts:s(".button-bar .single-button:nth-child(1) .text-offset"),comments:s(".button-bar .single-button:nth-child(2) .text-offset"),likes:s(".button-bar .single-button:nth-child(3) .text-offset")};return r}async startWatching(){const t=await SpinQuery.select(".card-list .content");if(!t){return false}const e=[...t.querySelectorAll(".content>.card")];e.forEach(t=>this.addCard(t));Observer.childList(t,t=>{t.forEach(t=>{t.addedNodes.forEach(t=>this.addCard(t));t.removedNodes.forEach(t=>this.removeCard(t))})});return true}}const r=new s;return{export:{activityCardsManager:r}}}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/activity-image-saver.min.js"] = (()=>{return(t,e)=>{(async()=>{if(!document.URL.startsWith("https://t.bilibili.com")&&!document.URL.startsWith("space.bilibili.com")){return}const t=t=>{const e=t.querySelector(".image-viewer");if(e===null){console.log(t)}else{e.addEventListener("contextmenu",()=>{setTimeout(()=>{const t=dq(".pop-message .toast-text");if(t&&t.innerHTML.includes("作者设置了禁止保存")){Toast.success(`
`,"解除动态存图限制")}},200)})}};[...document.body.children].filter(t=>t.classList.contains("photo-imager-container")).forEach(t);Observer.childList(document.body,e=>{e.forEach(e=>{const s=[...e.addedNodes].filter(t=>t instanceof Element&&t.classList.contains("photo-imager-container"));s.forEach(t)})})})()}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/airborne.min.css"] = `.bilibili-player-video-danmaku .b-danmaku.airborne{text-decoration:underline;cursor:pointer;pointer-events:initial}`;
-onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/airborne.min.js"] = (()=>{return(e,t)=>{(async()=>{if(!document.URL.match(/\/\/www\.bilibili\.com\/video\//)){return}const{forEachVideoDanmaku:e}=await t.importAsync("video-danmaku");t.applyStyle("airborneStyle");const n=e=>{if(!e){return NaN}const t=e.match(/(\d+)[::.](\d+)([::](\d+))?/);if(!t){return NaN}if(t[3]){const[,e,n,,a]=t.map(e=>parseInt(e));if([e,n,a].some(e=>Number.isNaN(e))){return NaN}return e*3600+n*60+a}const[,n,a]=t.map(e=>parseInt(e));if([n,a].some(e=>Number.isNaN(e))){return NaN}return n*60+a};const a=e=>{const t=e.target;if(!t.classList.contains("b-danmaku")){return}const a=n(t.textContent);if(!Number.isNaN(a)){const e=dq("video");e.currentTime=a;e.play()}};const r=e=>{const t=!Number.isNaN(n(e.text));e.element.classList.toggle("airborne",t)};e({added:r});Observer.videoChange(()=>{const e=dq(".bilibili-player-video-wrap");if(e.classList.contains("airborne-enabled")){return}e.classList.add("airborne-enabled");e.addEventListener("click",a)})})()}})();
+onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/airborne.min.js"] = (()=>{return(e,t)=>{(async()=>{if(!document.URL.match(/\/\/www\.bilibili\.com\/video\//)){return}const{forEachVideoDanmaku:e}=await t.importAsync("video-danmaku");t.applyStyle("airborneStyle");const n=e=>{if(!e){return NaN}const t=e.match(/(\d+)[ ]*[::.][ ]*(\d+)([ ]*[::][ ]*(\d+))?/);if(!t){return NaN}if(t[3]){const[,e,n,,a]=t.map(e=>parseInt(e));if([e,n,a].some(e=>Number.isNaN(e))){return NaN}return e*3600+n*60+a}const[,n,a]=t.map(e=>parseInt(e));if([n,a].some(e=>Number.isNaN(e))){return NaN}return n*60+a};const a=e=>{const t=e.target;if(!t.classList.contains("b-danmaku")){return}const a=n(t.textContent);if(!Number.isNaN(a)){const e=dq("video");e.currentTime=a;e.play()}};const r=e=>{const t=!Number.isNaN(n(e.text));e.element.classList.toggle("airborne",t)};e({added:r});Observer.videoChange(()=>{const e=dq(".bilibili-player-video-wrap");if(e.classList.contains("airborne-enabled")){return}e.classList.add("airborne-enabled");e.addEventListener("click",a)})})()}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/aria2-rpc-profile-item.vue.min.js"] = (()=>{return(e,i)=>{const t=`{{profile.name}}
`;i.applyStyleFromText(`.profile-item{display:flex;align-items:center;padding:4px 8px;background-color:#8882;border-radius:4px;border:2px solid transparent;flex-shrink:0;cursor:pointer}.profile-item:not(:last-child){margin-right:8px}.profile-item.duplicate{border-color:red}.profile-item.selected:not(.duplicate){border-color:var(--theme-color)}.profile-item input[type=text]{width:5em;border:none!important;padding:0!important;margin:0!important;line-height:normal}`,"aria2-rpc-profile-item-style");return{export:Object.assign({template:t},{components:{Icon:()=>i.importAsync("icon.vue")},props:["profile","deletable","selected"],data(){return{name:this.profile.name,editing:false,duplicateName:false}},methods:{saveProfile(){if(this.name===this.profile.name){this.duplicateName=false;this.editing=false;return}if(this.name===""||e.aria2RpcOptionProfiles.some(e=>e.name===this.name)){this.duplicateName=true;return}else{this.duplicateName=false;if(e.aria2RpcOptionSelectedProfile===this.profile.name){e.aria2RpcOptionSelectedProfile=this.name}this.profile.name=this.name;this.editing=false;this.$emit("profile-update")}}}})}}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/aria2-rpc-profiles.vue.min.js"] = (()=>{return(e,i)=>{const r=``;i.applyStyleFromText(`.aria2-rpc-profiles .profiles-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.aria2-rpc-profiles .profiles-header .profile-operations{display:flex;align-items:center}.aria2-rpc-profiles .profiles-header .profile-operations .operation{padding:4px;background-color:#8882;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer}.aria2-rpc-profiles .profiles-header .profile-operations .operation:not(:last-child){margin-right:8px}.aria2-rpc-profiles .profiles-header .profile-operations .operation:hover{background-color:#8884}.aria2-rpc-profiles .profiles-header .profile-operations .operation .mdi{margin:0}.aria2-rpc-profiles .profiles-list{display:flex;overflow:auto;scrollbar-width:none!important}.aria2-rpc-profiles .profiles-list::-webkit-scrollbar{height:0!important}`,"aria2-rpc-profiles-style");const o={name:"未命名",...e.aria2RpcOption};return{export:Object.assign({template:r},{components:{ProfileItem:()=>i.importAsync("aria2-rpc-profile-item.vue"),Icon:()=>i.importAsync("icon.vue")},data(){this.migrateOldProfiles();const i=[...e.aria2RpcOptionProfiles];if(i.length===0){i.push(o);e.aria2RpcOptionProfiles=i}return{profiles:i,selectedProfile:e.aria2RpcOptionSelectedProfile||o.name}},watch:{selectedProfile(i){if(e.aria2RpcOptionSelectedProfile!==i){e.aria2RpcOptionSelectedProfile=i}}},methods:{migrateOldProfiles(){const i=Object.getOwnPropertyNames(e.aria2RpcOption).filter(e=>!e.startsWith("_"));i.push("name");let r=false;for(const o of e.aria2RpcOptionProfiles){i.filter(e=>!(e in o)).forEach(i=>{o[i]=e.aria2RpcOption[i];console.log(`migrated profile property '${i}'`);r=true})}if(r){e.aria2RpcOptionProfiles=e.aria2RpcOptionProfiles}},profileUpdate(){e.aria2RpcOptionProfiles=this.profiles;this.selectedProfile=e.aria2RpcOptionSelectedProfile},changeProfile(e){this.selectedProfile=e.name;this.$emit("profile-change",e)},addProfile(){const i={...this.profiles.find(e=>e.name===this.selectedProfile)};i.name=i.name.replace(/[\d]+$/,"");if(this.profiles.some(e=>e.name===i.name)){let e=1;while(this.profiles.some(r=>r.name===i.name+e.toString())){e++}i.name=i.name+e.toString()}this.profiles.push(i);e.aria2RpcOptionProfiles=this.profiles;this.changeProfile(i)},deleteProfile(){const i=this.profiles.findIndex(e=>e.name===this.selectedProfile);const r=i===0?0:i-1;const o=this.profiles[r];this.profiles.splice(i,1);e.aria2RpcOptionProfiles=this.profiles;this.changeProfile(o)}}})}}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/aria2-rpc.min.js"] = (()=>{return(t,e)=>{function o(){const e=t.aria2RpcOption;const o=e.host.match(/^http[s]?:\/\//)?e.host:"http://"+e.host;const r="aria2.addUri";return{option:e,host:o,methodName:r}}async function r(t,e=false){try{let o=await t();if(typeof o==="string"){o=JSON.parse(o)}if(o.error!==undefined){if(o.error.code===1){logError(`请求遭到拒绝, 请检查您的密钥相关设置.`)}else{logError(`请求发生错误, code = ${o.error.code}, message = ${o.error.message}`)}return false}if(!e){Toast.success(`成功发送了请求, GID = ${o.result}`,"aria2 RPC",5e3)}return true}catch(t){logError(`无法连接到RPC主机.`);return false}}async function s(t,e=false){const{option:s,host:n,methodName:a}=o();return await r(async()=>{const e=window.btoa(unescape(encodeURIComponent(JSON.stringify(t.params))));const o=`${n}:${s.port}/jsonrpc?method=${a}&id=${t.id}¶ms=${e}`;console.log(`RPC request:`,o);if(o.startsWith("http:")){return await new Promise((t,e)=>{GM.xmlHttpRequest({method:"GET",url:o,responseType:"json",onload:e=>t(e.response),onerror:t=>e(t)})})}else{return await Ajax.getJson(o)}},e)}async function n(t,e=false){const{option:s,host:n,methodName:a}=o();return await r(async()=>{const e=`${n}:${s.port}/jsonrpc`;const o={method:a,id:t.id,params:t.params};if(e.startsWith("http:")){return await new Promise((t,r)=>{GM.xmlHttpRequest({method:"POST",url:e,responseType:"json",data:JSON.stringify(o),onload:e=>t(e.response),onerror:t=>r(t)})})}else{return await Ajax.postJson(e,o)}},e)}async function a(e,o=false){const r=t.aria2RpcOption;for(const t of e){let e;if(r.method==="get"){e=await s(t,o)}else{e=await n(t,o)}if(o===true&&e===false){logError(`${decodeURIComponent(t.id)} 导出失败`)}}}return{export:{sendRpc:a}}}})();
@@ -1524,7 +1524,7 @@ onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/m
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/v-dropdown.vue.min.js"] = (()=>{return(o,r)=>{const e=`{{ value }}
`;r.applyStyleFromText(`.v-dropdown{--background-color:#eee;position:relative;background-color:var(--background-color);cursor:pointer;display:flex;align-items:center;justify-content:space-between;min-width:100px;border-radius:var(--corner-radius);line-height:normal}body.dark .v-dropdown{--background-color:#333}.v-dropdown.round{border-radius:14px;padding:0 4px}.v-dropdown .dropdown-menu{transform-origin:top;transform:translateY(-4px) translateX(-50%);pointer-events:none;opacity:0;position:absolute;top:calc(100% + 2px);left:50%;background-color:var(--background-color);z-index:1;transition:.2s ease-out;box-shadow:rgba(0,0,0,.2) 0 4px 8px 0;border-radius:var(--corner-radius)}.v-dropdown .dropdown-menu.opened{transform:translateY(0) translateX(-50%);pointer-events:initial;opacity:1}.v-dropdown .dropdown-menu li{padding:4px 16px;box-sizing:content-box;white-space:nowrap;min-width:64px;text-align:center;cursor:pointer;color:inherit;background-color:transparent;border-radius:var(--corner-radius)}.v-dropdown .dropdown-menu li:hover{background-color:rgba(0,0,0,.08)}body.dark .v-dropdown .dropdown-menu li:hover{background-color:rgba(0,0,0,.16)}.v-dropdown .mdi-chevron-down{font-size:16pt;line-height:1;transform:rotate(0)}.v-dropdown .dropdown-menu.opened~.mdi-chevron-down{transform:rotate(180deg)}.v-dropdown .selected{user-select:none;padding:4px 8px}`,"v-dropdown-style");return{export:Object.assign({template:e},{props:["items","value","round"],data(){return{dropdownOpen:false}},methods:{toggleDropdown(){this.dropdownOpen=!this.dropdownOpen;if(this.dropdownOpen){document.addEventListener("click",o=>{const r=o.target;if(r===this.$el||this.$el.contains(r)){return}this.dropdownOpen=false},{once:true,capture:true})}},select(o){if(o!==this.value){this.$emit("update:value",o);this.$emit("change",o)}}}})}}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/video-card-info.min.js"] = (()=>{return(r,e)=>{}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/video-card.vue.min.js"] = (()=>{return(e,i)=>{const t=`{{durationText}}
{{watchlater ? '已添加' : '稍后再看'}}
{{title}}
{{description}}
{{upName}}
{{like}}{{coins}}{{favorites}}{{playCount}}{{danmakuCount}}
`;i.applyStyleFromText(`.video-card{display:grid;grid-template-columns:200px 1fr;grid-template-rows:1fr 1fr 1fr;grid-template-areas:"cover title" "cover description" "cover up";height:var(--card-height);width:var(--card-width);color:#000;background-color:#fff;border-radius:16px;box-shadow:0 4px 8px 0 #0001;margin-right:var(--card-margin);margin-bottom:var(--card-margin);position:relative}body.dark .video-card,body.dark .video-card:hover{background-color:#282828;color:#eee}.video-card:hover{color:#000}.video-card.vertical{grid-template-columns:auto auto;grid-template-rows:2fr 1fr 1fr;grid-template-areas:"cover cover" "title title" "up up"}.video-card.vertical .description,.video-card.vertical .topics{display:none}.video-card.vertical .cover-container{border-radius:16px 16px 0 0}.video-card.vertical .title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;max-height:3em;word-break:break-all;white-space:normal;line-height:1.5;font-size:11pt}.video-card.vertical .up{align-self:start;white-space:nowrap}.video-card.vertical .up .name{text-overflow:ellipsis;overflow:hidden}.video-card.vertical .up:not(.no-face){margin-left:8px;max-width:calc(var(--card-width) - 16px)}.video-card.vertical .up.no-face{margin-top:8px;max-width:calc(var(--card-width) - 24px)}.video-card.vertical .stats{align-self:end;justify-self:start;margin-bottom:8px;margin-right:0}.video-card>*{justify-self:self-start;align-self:center}.video-card:hover .cover{transform:scale(1.05);transition:.1s cubic-bezier(.39,.58,.57,1)}.video-card:hover .duration,.video-card:hover .watchlater{opacity:1}.video-card .duration,.video-card .watchlater{opacity:0}.video-card .cover-container{grid-area:cover;border-radius:16px 0 0 16px;position:relative;width:100%;height:100%;overflow:hidden}.video-card .cover-container .cover{object-fit:cover;width:100%;height:100%}.video-card .cover-container>:not(.cover){position:absolute}.video-card .cover-container .duration,.video-card .cover-container .watchlater{bottom:6px;padding:4px 8px;background-color:#000a;color:#fff;border-radius:14px;height:24px;box-sizing:border-box}.video-card .cover-container .duration .mdi,.video-card .cover-container .watchlater .mdi{font-size:12pt;line-height:1;margin-right:4px}.video-card .cover-container .duration{left:6px}.video-card .cover-container .watchlater{right:6px;display:flex;align-items:center;padding-left:4px}.video-card .title{grid-area:title;font-size:12pt;font-weight:700;color:inherit;padding:0 12px;white-space:nowrap;overflow:hidden;justify-self:stretch;text-overflow:ellipsis}.video-card .topics{grid-area:description;display:flex;align-items:center;margin-left:12px}.video-card .topics .topic{color:inherit;padding:4px 8px;background-color:#8882;margin-right:8px;border-radius:14px;white-space:nowrap;max-width:120px;overflow:hidden;text-overflow:ellipsis}.video-card .topics .topic:hover{background-color:#8884;color:var(--theme-color)}.video-card .description{grid-area:description;color:inherit;overflow:hidden;align-self:stretch;justify-self:stretch;margin:0 12px;line-height:1.5;height:3em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;scrollbar-width:none!important}.video-card .description::-webkit-scrollbar{width:0!important}.video-card .description.single-line{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.video-card .stats,.video-card .up{grid-area:up}.video-card .up{margin-left:12px;display:flex;align-items:center;padding:2px;background-color:#8882;border-radius:14px;color:inherit}.video-card .up.no-face{background-color:transparent;padding:0}.video-card .up.no-face .be-icon{font-size:14pt;opacity:.75}.video-card .up .face{border-radius:50%;width:24px;height:24px}.video-card .up .name{margin:0 8px}.video-card .up:not(.no-face):hover{background-color:#8884}.video-card .up:hover .be-icon,.video-card .up:hover .name{color:var(--theme-color)}.video-card .stats{justify-self:self-end;margin-right:12px;display:flex;align-items:center;opacity:.5}.video-card .stats .be-icon{font-size:12pt;margin:0 4px 0 12px}.video-card .stats .be-icon.be-iconfont-favorites-outline{font-size:14pt}.video-card .stats .be-icon.be-iconfont-coin-outline{font-size:11pt}`,"video-card-style");return{export:Object.assign({template:t},{props:["data","orientation"],store:store,components:{"dpi-img":()=>i.importAsync("dpi-img.vue"),Icon:()=>i.importAsync("icon.vue")},data(){return{upFaceUrl:"",danmakuCount:"",like:"",coins:"",favorites:"",dynamic:"",topics:[],upID:0,epID:0,..._.omit(this.data,"watchlater"),watchlaterInit:this.data.watchlater}},computed:{vertical(){return this.orientation==="vertical"},...Vuex.mapState(["watchlaterList"]),watchlater(){if(getUID()&&this.watchlaterInit!==null){return this.watchlaterList.includes(this.aid)}else{return null}}},methods:{...Vuex.mapActions(["toggleWatchlater"])}})}}})();
-onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/video-danmaku.min.js"] = (()=>{return(e,t)=>{let n;const r=[];const a=e=>{return{element:e,reuse:false,text:e.textContent||""}};const o=(e,t)=>{if(n){n.stop()}n=Observer.observe(e,e=>{e.forEach(e=>{if(e.type==="childList"){e.addedNodes.forEach(e=>{if(!(e instanceof HTMLElement)){return}const n=a(e);r.push(n);t.added&&t.added(n)});e.removedNodes.forEach(e=>{if(!(e instanceof HTMLElement)){return}const n=r.findIndex(t=>t.element===e);if(n!==-1){const[e]=r.splice(n,1);t.removed&&t.removed(e)}})}else if(e.type==="characterData"){const n=e.target;const a=r.find(e=>e.element===n);if(!a){return}a.text=n.textContent||"";a.reuse=true;t.added&&t.added(a)}})},{childList:true,characterData:true,subtree:true})};const d=async e=>{const t=await videoCondition();if(!t){return}Observer.videoChange(async()=>{const t=await SpinQuery.select(".bilibili-player-video-danmaku");if(!t){return}o(t,e)})};return{export:{forEachVideoDanmaku:d}}}})();
+onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/video-danmaku.min.js"] = (()=>{return(e,t)=>{let n;const r=[];const o=e=>{return{element:e,reuse:false,text:e.textContent||""}};const d=(e,t)=>{if(n){n.stop()}n=Observer.observe(e,e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{if(e.nodeType===Node.TEXT_NODE){const n=e.parentElement;const o=r.find(e=>e.element===n);if(!o){return}o.text=e.textContent||"";o.reuse=true;t.added&&t.added(o);return}if(!(e instanceof HTMLElement)){return}const n=o(e);r.push(n);t.added&&t.added(n)});e.removedNodes.forEach(e=>{if(!(e instanceof HTMLElement)){return}const n=r.findIndex(t=>t.element===e);if(n!==-1){const[e]=r.splice(n,1);t.removed&&t.removed(e)}})})},{childList:true,subtree:true})};const s=async e=>{const t=await videoCondition();if(!t){return}Observer.videoChange(async()=>{const t=await SpinQuery.select(".bilibili-player-video-danmaku");if(!t){return}d(t,e)})};return{export:{forEachVideoDanmaku:s}}}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/video-dash.min.js"] = (()=>{return(t,e)=>{const a=t=>{return{url:t.downloadUrl,backupUrls:t.backupUrls,length:t.duration,size:Math.trunc(t.bandWidth*t.duration/8)}};const r=e=>{console.log(e.videoDashes);const r=(()=>{const a=e=>e.videoCodec===t.downloadVideoDashCodec;if(e.videoDashes.some(a)){return e.videoDashes.filter(a).sort(ascendingSort(t=>t.bandWidth))[0]}else{return e.videoDashes.sort(ascendingSort(t=>t.bandWidth))[0]}})();if(e.audioDashes.length>0){const t=e.audioDashes.sort(descendingSort(t=>t.bandWidth))[0];return[a(r),a(t)]}else{return[a(r)]}};const o=async(t,a,r=false)=>{const o=await Ajax.getJsonWithCredentials(t);const s=o.data||o.result||o;if(o.code!==0){throw new Error(`API请求失败: ${o.code} ${o.message}`)}if(!s.dash){throw new Error("此视频没有DASH格式, 请改用FLV格式")}const d=s.accept_quality;if(!d.includes(a)&&!r){throw new Error("没有找到请求的清晰度")}if(s.quality!==a&&!r){const{throwQualityError:t}=await e.importAsync("quality-errors");t(a)}const c=s.accept_description;const n=c[d.indexOf(a)];const i=s.dash.duration;const h=s.dash.video.filter(t=>t.id===(r?s.quality:a)).map(t=>{const e=(()=>{switch(t.codecid){case 12:return"HEVC/H.265";default:case 7:return"AVC/H.264"}})();const r={quality:a,qualityText:n,width:t.width,height:t.height,codecs:t.codecs,codecId:t.codecid,bandWidth:t.bandwidth,frameRate:t.frameRate,backupUrls:(t.backupUrl||t.backup_url||[]).forEach(t=>t.replace("http:","https:")),downloadUrl:(t.baseUrl||t.base_url||"").replace("http:","https:"),duration:i,videoCodec:e};return r});const u=(s.dash.audio||[]).map(t=>{return{bandWidth:t.bandwidth,codecs:t.codecs,codecId:t.codecid,backupUrls:(t.backupUrl||t.backup_url||[]).forEach(t=>t.replace("http:","https:")),downloadUrl:(t.baseUrl||t.base_url||"").replace("http:","https:"),duration:i}});return{videoDashes:h,audioDashes:u}};return{export:{getDashInfo:o,dashToFragments:r}}}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/video-downloader-fragment.min.js"] = (()=>{return(r,e)=>{}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/min/video-info.min.js"] = (()=>{return(t,i)=>{class e{constructor(t){this.aid=t}async fetchInfo(){let t;if(this.cid){t=`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}&cid=${this.cid}`}else{t=`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}`}const i=JSON.parse(await Ajax.getText(t));if(i.code!==0){throw new Error(i.message)}const e=i.data;this.cid=e.cid;this.pageCount=e.videos;this.coverUrl=e.pic.replace("http:","https:");this.tagId=e.tid;this.tagName=e.tname;this.title=e.title;this.description=e.desc;this.up={uid:e.owner.mid,name:e.owner.name,faceUrl:e.owner.face.replace("http:","https:")};this.pages=e.pages.map(t=>{return{cid:t.cid,title:t.part,pageNumber:t.page}});this.subtitles=e.subtitle.list.map(t=>{return{id:t.id,languageCode:t.lan,language:t.lan_doc,url:t.subtitle_url.replace("http:","https:")}});return this}async fetchDanmaku(){this.danmaku=new s(this.cid.toString());return this.danmaku.fetchInfo()}}class a{constructor(t,i){this.text=t;this.p=i}}class s{constructor(t){this.cid=t}async fetchInfo(){const t=await Ajax.getText(`https://api.bilibili.com/x/v1/dm/list.so?oid=${this.cid}`);this.rawXML=t}}class n{constructor(t){this.ep=t;this.videos=[]}async fetchInfo(){const t=await Ajax.getText(`https://www.bilibili.com/bangumi/play/ep${this.ep}/`);const i=JSON.parse(t.match(/window\.__INITIAL_STATE__=(.*);\(function\(\){/)[1]);this.title=i.mediaInfo.title;this.cover=i.mediaInfo.cover;this.squareCover=i.mediaInfo.square_cover;this.aid=i.epInfo.aid;this.cid=i.epInfo.cid;this.videos=i.epList.map(async t=>{return{title:t.index_title,aid:t.aid,cid:t.cid,info:await new e(t.aid).fetchInfo()}});return this}}return{export:{VideoInfo:e,BangumiInfo:n,Danmaku:a,DanmakuInfo:s}}}})();
diff --git a/bilibili-evolved.user.js b/bilibili-evolved.user.js
index 800bbd1a0..115e244e1 100644
--- a/bilibili-evolved.user.js
+++ b/bilibili-evolved.user.js
@@ -1273,7 +1273,7 @@ onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/mi
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/activity-apis.min.js"] = (()=>{return(t,e)=>{class s extends EventTarget{constructor(){super(...arguments);this.cards=[]}addCard(t){if(t instanceof Element&&t.classList.contains("card")){if(t.querySelector(".skeleton")!==null){const e=Observer.childList(t,()=>{if(t.querySelector(".skeleton")===null){e.forEach(t=>t.stop());this.addCard(t)}})}else{const e=this.parseCard(t);this.cards.push(e);const s=new CustomEvent("addCard",{detail:e});this.dispatchEvent(s)}}}removeCard(t){if(t instanceof Element&&t.classList.contains("card")){const e=this.parseCard(t).id;const s=this.cards.findIndex(t=>t.id===e);const r=this.cards[s];this.cards.splice(s,1);const n=new CustomEvent("removeCard",{detail:r});this.dispatchEvent(n)}}parseCard(t){const e=e=>{if(t.querySelector(e)===null){return""}return t.querySelector(e).innerText};const s=t=>{const s=parseInt(e(t));if(isNaN(s)){return 0}return s};const r={id:t.getAttribute("data-did"),username:e(".main-content .user-name"),text:e(".card-content .text.description"),reposts:s(".button-bar .single-button:nth-child(1) .text-offset"),comments:s(".button-bar .single-button:nth-child(2) .text-offset"),likes:s(".button-bar .single-button:nth-child(3) .text-offset")};return r}async startWatching(){const t=await SpinQuery.select(".card-list .content");if(!t){return false}const e=[...t.querySelectorAll(".content>.card")];e.forEach(t=>this.addCard(t));Observer.childList(t,t=>{t.forEach(t=>{t.addedNodes.forEach(t=>this.addCard(t));t.removedNodes.forEach(t=>this.removeCard(t))})});return true}}const r=new s;return{export:{activityCardsManager:r}}}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/activity-image-saver.min.js"] = (()=>{return(t,e)=>{(async()=>{if(!document.URL.startsWith("https://t.bilibili.com")&&!document.URL.startsWith("space.bilibili.com")){return}const t=t=>{const e=t.querySelector(".image-viewer");if(e===null){console.log(t)}else{e.addEventListener("contextmenu",()=>{setTimeout(()=>{const t=dq(".pop-message .toast-text");if(t&&t.innerHTML.includes("作者设置了禁止保存")){Toast.success(`
`,"解除动态存图限制")}},200)})}};[...document.body.children].filter(t=>t.classList.contains("photo-imager-container")).forEach(t);Observer.childList(document.body,e=>{e.forEach(e=>{const s=[...e.addedNodes].filter(t=>t instanceof Element&&t.classList.contains("photo-imager-container"));s.forEach(t)})})})()}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/airborne.min.css"] = `.bilibili-player-video-danmaku .b-danmaku.airborne{text-decoration:underline;cursor:pointer;pointer-events:initial}`;
-onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/airborne.min.js"] = (()=>{return(e,t)=>{(async()=>{if(!document.URL.match(/\/\/www\.bilibili\.com\/video\//)){return}const{forEachVideoDanmaku:e}=await t.importAsync("video-danmaku");t.applyStyle("airborneStyle");const n=e=>{if(!e){return NaN}const t=e.match(/(\d+)[::.](\d+)([::](\d+))?/);if(!t){return NaN}if(t[3]){const[,e,n,,a]=t.map(e=>parseInt(e));if([e,n,a].some(e=>Number.isNaN(e))){return NaN}return e*3600+n*60+a}const[,n,a]=t.map(e=>parseInt(e));if([n,a].some(e=>Number.isNaN(e))){return NaN}return n*60+a};const a=e=>{const t=e.target;if(!t.classList.contains("b-danmaku")){return}const a=n(t.textContent);if(!Number.isNaN(a)){const e=dq("video");e.currentTime=a;e.play()}};const r=e=>{const t=!Number.isNaN(n(e.text));e.element.classList.toggle("airborne",t)};e({added:r});Observer.videoChange(()=>{const e=dq(".bilibili-player-video-wrap");if(e.classList.contains("airborne-enabled")){return}e.classList.add("airborne-enabled");e.addEventListener("click",a)})})()}})();
+onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/airborne.min.js"] = (()=>{return(e,t)=>{(async()=>{if(!document.URL.match(/\/\/www\.bilibili\.com\/video\//)){return}const{forEachVideoDanmaku:e}=await t.importAsync("video-danmaku");t.applyStyle("airborneStyle");const n=e=>{if(!e){return NaN}const t=e.match(/(\d+)[ ]*[::.][ ]*(\d+)([ ]*[::][ ]*(\d+))?/);if(!t){return NaN}if(t[3]){const[,e,n,,a]=t.map(e=>parseInt(e));if([e,n,a].some(e=>Number.isNaN(e))){return NaN}return e*3600+n*60+a}const[,n,a]=t.map(e=>parseInt(e));if([n,a].some(e=>Number.isNaN(e))){return NaN}return n*60+a};const a=e=>{const t=e.target;if(!t.classList.contains("b-danmaku")){return}const a=n(t.textContent);if(!Number.isNaN(a)){const e=dq("video");e.currentTime=a;e.play()}};const r=e=>{const t=!Number.isNaN(n(e.text));e.element.classList.toggle("airborne",t)};e({added:r});Observer.videoChange(()=>{const e=dq(".bilibili-player-video-wrap");if(e.classList.contains("airborne-enabled")){return}e.classList.add("airborne-enabled");e.addEventListener("click",a)})})()}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/aria2-rpc-profile-item.vue.min.js"] = (()=>{return(e,i)=>{const t=`{{profile.name}}
`;i.applyStyleFromText(`.profile-item{display:flex;align-items:center;padding:4px 8px;background-color:#8882;border-radius:4px;border:2px solid transparent;flex-shrink:0;cursor:pointer}.profile-item:not(:last-child){margin-right:8px}.profile-item.duplicate{border-color:red}.profile-item.selected:not(.duplicate){border-color:var(--theme-color)}.profile-item input[type=text]{width:5em;border:none!important;padding:0!important;margin:0!important;line-height:normal}`,"aria2-rpc-profile-item-style");return{export:Object.assign({template:t},{components:{Icon:()=>i.importAsync("icon.vue")},props:["profile","deletable","selected"],data(){return{name:this.profile.name,editing:false,duplicateName:false}},methods:{saveProfile(){if(this.name===this.profile.name){this.duplicateName=false;this.editing=false;return}if(this.name===""||e.aria2RpcOptionProfiles.some(e=>e.name===this.name)){this.duplicateName=true;return}else{this.duplicateName=false;if(e.aria2RpcOptionSelectedProfile===this.profile.name){e.aria2RpcOptionSelectedProfile=this.name}this.profile.name=this.name;this.editing=false;this.$emit("profile-update")}}}})}}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/aria2-rpc-profiles.vue.min.js"] = (()=>{return(e,i)=>{const r=``;i.applyStyleFromText(`.aria2-rpc-profiles .profiles-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.aria2-rpc-profiles .profiles-header .profile-operations{display:flex;align-items:center}.aria2-rpc-profiles .profiles-header .profile-operations .operation{padding:4px;background-color:#8882;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer}.aria2-rpc-profiles .profiles-header .profile-operations .operation:not(:last-child){margin-right:8px}.aria2-rpc-profiles .profiles-header .profile-operations .operation:hover{background-color:#8884}.aria2-rpc-profiles .profiles-header .profile-operations .operation .mdi{margin:0}.aria2-rpc-profiles .profiles-list{display:flex;overflow:auto;scrollbar-width:none!important}.aria2-rpc-profiles .profiles-list::-webkit-scrollbar{height:0!important}`,"aria2-rpc-profiles-style");const o={name:"未命名",...e.aria2RpcOption};return{export:Object.assign({template:r},{components:{ProfileItem:()=>i.importAsync("aria2-rpc-profile-item.vue"),Icon:()=>i.importAsync("icon.vue")},data(){this.migrateOldProfiles();const i=[...e.aria2RpcOptionProfiles];if(i.length===0){i.push(o);e.aria2RpcOptionProfiles=i}return{profiles:i,selectedProfile:e.aria2RpcOptionSelectedProfile||o.name}},watch:{selectedProfile(i){if(e.aria2RpcOptionSelectedProfile!==i){e.aria2RpcOptionSelectedProfile=i}}},methods:{migrateOldProfiles(){const i=Object.getOwnPropertyNames(e.aria2RpcOption).filter(e=>!e.startsWith("_"));i.push("name");let r=false;for(const o of e.aria2RpcOptionProfiles){i.filter(e=>!(e in o)).forEach(i=>{o[i]=e.aria2RpcOption[i];console.log(`migrated profile property '${i}'`);r=true})}if(r){e.aria2RpcOptionProfiles=e.aria2RpcOptionProfiles}},profileUpdate(){e.aria2RpcOptionProfiles=this.profiles;this.selectedProfile=e.aria2RpcOptionSelectedProfile},changeProfile(e){this.selectedProfile=e.name;this.$emit("profile-change",e)},addProfile(){const i={...this.profiles.find(e=>e.name===this.selectedProfile)};i.name=i.name.replace(/[\d]+$/,"");if(this.profiles.some(e=>e.name===i.name)){let e=1;while(this.profiles.some(r=>r.name===i.name+e.toString())){e++}i.name=i.name+e.toString()}this.profiles.push(i);e.aria2RpcOptionProfiles=this.profiles;this.changeProfile(i)},deleteProfile(){const i=this.profiles.findIndex(e=>e.name===this.selectedProfile);const r=i===0?0:i-1;const o=this.profiles[r];this.profiles.splice(i,1);e.aria2RpcOptionProfiles=this.profiles;this.changeProfile(o)}}})}}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/aria2-rpc.min.js"] = (()=>{return(t,e)=>{function o(){const e=t.aria2RpcOption;const o=e.host.match(/^http[s]?:\/\//)?e.host:"http://"+e.host;const r="aria2.addUri";return{option:e,host:o,methodName:r}}async function r(t,e=false){try{let o=await t();if(typeof o==="string"){o=JSON.parse(o)}if(o.error!==undefined){if(o.error.code===1){logError(`请求遭到拒绝, 请检查您的密钥相关设置.`)}else{logError(`请求发生错误, code = ${o.error.code}, message = ${o.error.message}`)}return false}if(!e){Toast.success(`成功发送了请求, GID = ${o.result}`,"aria2 RPC",5e3)}return true}catch(t){logError(`无法连接到RPC主机.`);return false}}async function s(t,e=false){const{option:s,host:n,methodName:a}=o();return await r(async()=>{const e=window.btoa(unescape(encodeURIComponent(JSON.stringify(t.params))));const o=`${n}:${s.port}/jsonrpc?method=${a}&id=${t.id}¶ms=${e}`;console.log(`RPC request:`,o);if(o.startsWith("http:")){return await new Promise((t,e)=>{GM.xmlHttpRequest({method:"GET",url:o,responseType:"json",onload:e=>t(e.response),onerror:t=>e(t)})})}else{return await Ajax.getJson(o)}},e)}async function n(t,e=false){const{option:s,host:n,methodName:a}=o();return await r(async()=>{const e=`${n}:${s.port}/jsonrpc`;const o={method:a,id:t.id,params:t.params};if(e.startsWith("http:")){return await new Promise((t,r)=>{GM.xmlHttpRequest({method:"POST",url:e,responseType:"json",data:JSON.stringify(o),onload:e=>t(e.response),onerror:t=>r(t)})})}else{return await Ajax.postJson(e,o)}},e)}async function a(e,o=false){const r=t.aria2RpcOption;for(const t of e){let e;if(r.method==="get"){e=await s(t,o)}else{e=await n(t,o)}if(o===true&&e===false){logError(`${decodeURIComponent(t.id)} 导出失败`)}}}return{export:{sendRpc:a}}}})();
@@ -1524,7 +1524,7 @@ onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/mi
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/v-dropdown.vue.min.js"] = (()=>{return(o,r)=>{const e=`{{ value }}
`;r.applyStyleFromText(`.v-dropdown{--background-color:#eee;position:relative;background-color:var(--background-color);cursor:pointer;display:flex;align-items:center;justify-content:space-between;min-width:100px;border-radius:var(--corner-radius);line-height:normal}body.dark .v-dropdown{--background-color:#333}.v-dropdown.round{border-radius:14px;padding:0 4px}.v-dropdown .dropdown-menu{transform-origin:top;transform:translateY(-4px) translateX(-50%);pointer-events:none;opacity:0;position:absolute;top:calc(100% + 2px);left:50%;background-color:var(--background-color);z-index:1;transition:.2s ease-out;box-shadow:rgba(0,0,0,.2) 0 4px 8px 0;border-radius:var(--corner-radius)}.v-dropdown .dropdown-menu.opened{transform:translateY(0) translateX(-50%);pointer-events:initial;opacity:1}.v-dropdown .dropdown-menu li{padding:4px 16px;box-sizing:content-box;white-space:nowrap;min-width:64px;text-align:center;cursor:pointer;color:inherit;background-color:transparent;border-radius:var(--corner-radius)}.v-dropdown .dropdown-menu li:hover{background-color:rgba(0,0,0,.08)}body.dark .v-dropdown .dropdown-menu li:hover{background-color:rgba(0,0,0,.16)}.v-dropdown .mdi-chevron-down{font-size:16pt;line-height:1;transform:rotate(0)}.v-dropdown .dropdown-menu.opened~.mdi-chevron-down{transform:rotate(180deg)}.v-dropdown .selected{user-select:none;padding:4px 8px}`,"v-dropdown-style");return{export:Object.assign({template:e},{props:["items","value","round"],data(){return{dropdownOpen:false}},methods:{toggleDropdown(){this.dropdownOpen=!this.dropdownOpen;if(this.dropdownOpen){document.addEventListener("click",o=>{const r=o.target;if(r===this.$el||this.$el.contains(r)){return}this.dropdownOpen=false},{once:true,capture:true})}},select(o){if(o!==this.value){this.$emit("update:value",o);this.$emit("change",o)}}}})}}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-card-info.min.js"] = (()=>{return(r,e)=>{}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-card.vue.min.js"] = (()=>{return(e,i)=>{const t=`{{durationText}}
{{watchlater ? '已添加' : '稍后再看'}}
{{title}}
{{description}}
{{upName}}
{{like}}{{coins}}{{favorites}}{{playCount}}{{danmakuCount}}
`;i.applyStyleFromText(`.video-card{display:grid;grid-template-columns:200px 1fr;grid-template-rows:1fr 1fr 1fr;grid-template-areas:"cover title" "cover description" "cover up";height:var(--card-height);width:var(--card-width);color:#000;background-color:#fff;border-radius:16px;box-shadow:0 4px 8px 0 #0001;margin-right:var(--card-margin);margin-bottom:var(--card-margin);position:relative}body.dark .video-card,body.dark .video-card:hover{background-color:#282828;color:#eee}.video-card:hover{color:#000}.video-card.vertical{grid-template-columns:auto auto;grid-template-rows:2fr 1fr 1fr;grid-template-areas:"cover cover" "title title" "up up"}.video-card.vertical .description,.video-card.vertical .topics{display:none}.video-card.vertical .cover-container{border-radius:16px 16px 0 0}.video-card.vertical .title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;max-height:3em;word-break:break-all;white-space:normal;line-height:1.5;font-size:11pt}.video-card.vertical .up{align-self:start;white-space:nowrap}.video-card.vertical .up .name{text-overflow:ellipsis;overflow:hidden}.video-card.vertical .up:not(.no-face){margin-left:8px;max-width:calc(var(--card-width) - 16px)}.video-card.vertical .up.no-face{margin-top:8px;max-width:calc(var(--card-width) - 24px)}.video-card.vertical .stats{align-self:end;justify-self:start;margin-bottom:8px;margin-right:0}.video-card>*{justify-self:self-start;align-self:center}.video-card:hover .cover{transform:scale(1.05);transition:.1s cubic-bezier(.39,.58,.57,1)}.video-card:hover .duration,.video-card:hover .watchlater{opacity:1}.video-card .duration,.video-card .watchlater{opacity:0}.video-card .cover-container{grid-area:cover;border-radius:16px 0 0 16px;position:relative;width:100%;height:100%;overflow:hidden}.video-card .cover-container .cover{object-fit:cover;width:100%;height:100%}.video-card .cover-container>:not(.cover){position:absolute}.video-card .cover-container .duration,.video-card .cover-container .watchlater{bottom:6px;padding:4px 8px;background-color:#000a;color:#fff;border-radius:14px;height:24px;box-sizing:border-box}.video-card .cover-container .duration .mdi,.video-card .cover-container .watchlater .mdi{font-size:12pt;line-height:1;margin-right:4px}.video-card .cover-container .duration{left:6px}.video-card .cover-container .watchlater{right:6px;display:flex;align-items:center;padding-left:4px}.video-card .title{grid-area:title;font-size:12pt;font-weight:700;color:inherit;padding:0 12px;white-space:nowrap;overflow:hidden;justify-self:stretch;text-overflow:ellipsis}.video-card .topics{grid-area:description;display:flex;align-items:center;margin-left:12px}.video-card .topics .topic{color:inherit;padding:4px 8px;background-color:#8882;margin-right:8px;border-radius:14px;white-space:nowrap;max-width:120px;overflow:hidden;text-overflow:ellipsis}.video-card .topics .topic:hover{background-color:#8884;color:var(--theme-color)}.video-card .description{grid-area:description;color:inherit;overflow:hidden;align-self:stretch;justify-self:stretch;margin:0 12px;line-height:1.5;height:3em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;scrollbar-width:none!important}.video-card .description::-webkit-scrollbar{width:0!important}.video-card .description.single-line{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.video-card .stats,.video-card .up{grid-area:up}.video-card .up{margin-left:12px;display:flex;align-items:center;padding:2px;background-color:#8882;border-radius:14px;color:inherit}.video-card .up.no-face{background-color:transparent;padding:0}.video-card .up.no-face .be-icon{font-size:14pt;opacity:.75}.video-card .up .face{border-radius:50%;width:24px;height:24px}.video-card .up .name{margin:0 8px}.video-card .up:not(.no-face):hover{background-color:#8884}.video-card .up:hover .be-icon,.video-card .up:hover .name{color:var(--theme-color)}.video-card .stats{justify-self:self-end;margin-right:12px;display:flex;align-items:center;opacity:.5}.video-card .stats .be-icon{font-size:12pt;margin:0 4px 0 12px}.video-card .stats .be-icon.be-iconfont-favorites-outline{font-size:14pt}.video-card .stats .be-icon.be-iconfont-coin-outline{font-size:11pt}`,"video-card-style");return{export:Object.assign({template:t},{props:["data","orientation"],store:store,components:{"dpi-img":()=>i.importAsync("dpi-img.vue"),Icon:()=>i.importAsync("icon.vue")},data(){return{upFaceUrl:"",danmakuCount:"",like:"",coins:"",favorites:"",dynamic:"",topics:[],upID:0,epID:0,..._.omit(this.data,"watchlater"),watchlaterInit:this.data.watchlater}},computed:{vertical(){return this.orientation==="vertical"},...Vuex.mapState(["watchlaterList"]),watchlater(){if(getUID()&&this.watchlaterInit!==null){return this.watchlaterList.includes(this.aid)}else{return null}}},methods:{...Vuex.mapActions(["toggleWatchlater"])}})}}})();
-onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-danmaku.min.js"] = (()=>{return(e,t)=>{let n;const r=[];const a=e=>{return{element:e,reuse:false,text:e.textContent||""}};const o=(e,t)=>{if(n){n.stop()}n=Observer.observe(e,e=>{e.forEach(e=>{if(e.type==="childList"){e.addedNodes.forEach(e=>{if(!(e instanceof HTMLElement)){return}const n=a(e);r.push(n);t.added&&t.added(n)});e.removedNodes.forEach(e=>{if(!(e instanceof HTMLElement)){return}const n=r.findIndex(t=>t.element===e);if(n!==-1){const[e]=r.splice(n,1);t.removed&&t.removed(e)}})}else if(e.type==="characterData"){const n=e.target;const a=r.find(e=>e.element===n);if(!a){return}a.text=n.textContent||"";a.reuse=true;t.added&&t.added(a)}})},{childList:true,characterData:true,subtree:true})};const d=async e=>{const t=await videoCondition();if(!t){return}Observer.videoChange(async()=>{const t=await SpinQuery.select(".bilibili-player-video-danmaku");if(!t){return}o(t,e)})};return{export:{forEachVideoDanmaku:d}}}})();
+onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-danmaku.min.js"] = (()=>{return(e,t)=>{let n;const r=[];const o=e=>{return{element:e,reuse:false,text:e.textContent||""}};const d=(e,t)=>{if(n){n.stop()}n=Observer.observe(e,e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{if(e.nodeType===Node.TEXT_NODE){const n=e.parentElement;const o=r.find(e=>e.element===n);if(!o){return}o.text=e.textContent||"";o.reuse=true;t.added&&t.added(o);return}if(!(e instanceof HTMLElement)){return}const n=o(e);r.push(n);t.added&&t.added(n)});e.removedNodes.forEach(e=>{if(!(e instanceof HTMLElement)){return}const n=r.findIndex(t=>t.element===e);if(n!==-1){const[e]=r.splice(n,1);t.removed&&t.removed(e)}})})},{childList:true,subtree:true})};const s=async e=>{const t=await videoCondition();if(!t){return}Observer.videoChange(async()=>{const t=await SpinQuery.select(".bilibili-player-video-danmaku");if(!t){return}d(t,e)})};return{export:{forEachVideoDanmaku:s}}}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-dash.min.js"] = (()=>{return(t,e)=>{const a=t=>{return{url:t.downloadUrl,backupUrls:t.backupUrls,length:t.duration,size:Math.trunc(t.bandWidth*t.duration/8)}};const r=e=>{console.log(e.videoDashes);const r=(()=>{const a=e=>e.videoCodec===t.downloadVideoDashCodec;if(e.videoDashes.some(a)){return e.videoDashes.filter(a).sort(ascendingSort(t=>t.bandWidth))[0]}else{return e.videoDashes.sort(ascendingSort(t=>t.bandWidth))[0]}})();if(e.audioDashes.length>0){const t=e.audioDashes.sort(descendingSort(t=>t.bandWidth))[0];return[a(r),a(t)]}else{return[a(r)]}};const o=async(t,a,r=false)=>{const o=await Ajax.getJsonWithCredentials(t);const s=o.data||o.result||o;if(o.code!==0){throw new Error(`API请求失败: ${o.code} ${o.message}`)}if(!s.dash){throw new Error("此视频没有DASH格式, 请改用FLV格式")}const d=s.accept_quality;if(!d.includes(a)&&!r){throw new Error("没有找到请求的清晰度")}if(s.quality!==a&&!r){const{throwQualityError:t}=await e.importAsync("quality-errors");t(a)}const c=s.accept_description;const n=c[d.indexOf(a)];const i=s.dash.duration;const h=s.dash.video.filter(t=>t.id===(r?s.quality:a)).map(t=>{const e=(()=>{switch(t.codecid){case 12:return"HEVC/H.265";default:case 7:return"AVC/H.264"}})();const r={quality:a,qualityText:n,width:t.width,height:t.height,codecs:t.codecs,codecId:t.codecid,bandWidth:t.bandwidth,frameRate:t.frameRate,backupUrls:(t.backupUrl||t.backup_url||[]).forEach(t=>t.replace("http:","https:")),downloadUrl:(t.baseUrl||t.base_url||"").replace("http:","https:"),duration:i,videoCodec:e};return r});const u=(s.dash.audio||[]).map(t=>{return{bandWidth:t.bandwidth,codecs:t.codecs,codecId:t.codecid,backupUrls:(t.backupUrl||t.backup_url||[]).forEach(t=>t.replace("http:","https:")),downloadUrl:(t.baseUrl||t.base_url||"").replace("http:","https:"),duration:i}});return{videoDashes:h,audioDashes:u}};return{export:{getDashInfo:o,dashToFragments:r}}}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-downloader-fragment.min.js"] = (()=>{return(r,e)=>{}})();
onlineData["https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/min/video-info.min.js"] = (()=>{return(t,i)=>{class e{constructor(t){this.aid=t}async fetchInfo(){let t;if(this.cid){t=`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}&cid=${this.cid}`}else{t=`https://api.bilibili.com/x/web-interface/view?aid=${this.aid}`}const i=JSON.parse(await Ajax.getText(t));if(i.code!==0){throw new Error(i.message)}const e=i.data;this.cid=e.cid;this.pageCount=e.videos;this.coverUrl=e.pic.replace("http:","https:");this.tagId=e.tid;this.tagName=e.tname;this.title=e.title;this.description=e.desc;this.up={uid:e.owner.mid,name:e.owner.name,faceUrl:e.owner.face.replace("http:","https:")};this.pages=e.pages.map(t=>{return{cid:t.cid,title:t.part,pageNumber:t.page}});this.subtitles=e.subtitle.list.map(t=>{return{id:t.id,languageCode:t.lan,language:t.lan_doc,url:t.subtitle_url.replace("http:","https:")}});return this}async fetchDanmaku(){this.danmaku=new s(this.cid.toString());return this.danmaku.fetchInfo()}}class a{constructor(t,i){this.text=t;this.p=i}}class s{constructor(t){this.cid=t}async fetchInfo(){const t=await Ajax.getText(`https://api.bilibili.com/x/v1/dm/list.so?oid=${this.cid}`);this.rawXML=t}}class n{constructor(t){this.ep=t;this.videos=[]}async fetchInfo(){const t=await Ajax.getText(`https://www.bilibili.com/bangumi/play/ep${this.ep}/`);const i=JSON.parse(t.match(/window\.__INITIAL_STATE__=(.*);\(function\(\){/)[1]);this.title=i.mediaInfo.title;this.cover=i.mediaInfo.cover;this.squareCover=i.mediaInfo.square_cover;this.aid=i.epInfo.aid;this.cid=i.epInfo.cid;this.videos=i.epList.map(async t=>{return{title:t.index_title,aid:t.aid,cid:t.cid,info:await new e(t.aid).fetchInfo()}});return this}}return{export:{VideoInfo:e,BangumiInfo:n,Danmaku:a,DanmakuInfo:s}}}})();
diff --git a/min/airborne.min.js b/min/airborne.min.js
index 9470609e1..1efa9d27e 100644
--- a/min/airborne.min.js
+++ b/min/airborne.min.js
@@ -1 +1 @@
-(()=>{return(e,t)=>{(async()=>{if(!document.URL.match(/\/\/www\.bilibili\.com\/video\//)){return}const{forEachVideoDanmaku:e}=await t.importAsync("video-danmaku");t.applyStyle("airborneStyle");const n=e=>{if(!e){return NaN}const t=e.match(/(\d+)[::.](\d+)([::](\d+))?/);if(!t){return NaN}if(t[3]){const[,e,n,,a]=t.map(e=>parseInt(e));if([e,n,a].some(e=>Number.isNaN(e))){return NaN}return e*3600+n*60+a}const[,n,a]=t.map(e=>parseInt(e));if([n,a].some(e=>Number.isNaN(e))){return NaN}return n*60+a};const a=e=>{const t=e.target;if(!t.classList.contains("b-danmaku")){return}const a=n(t.textContent);if(!Number.isNaN(a)){const e=dq("video");e.currentTime=a;e.play()}};const r=e=>{const t=!Number.isNaN(n(e.text));e.element.classList.toggle("airborne",t)};e({added:r});Observer.videoChange(()=>{const e=dq(".bilibili-player-video-wrap");if(e.classList.contains("airborne-enabled")){return}e.classList.add("airborne-enabled");e.addEventListener("click",a)})})()}})();
\ No newline at end of file
+(()=>{return(e,t)=>{(async()=>{if(!document.URL.match(/\/\/www\.bilibili\.com\/video\//)){return}const{forEachVideoDanmaku:e}=await t.importAsync("video-danmaku");t.applyStyle("airborneStyle");const n=e=>{if(!e){return NaN}const t=e.match(/(\d+)[ ]*[::.][ ]*(\d+)([ ]*[::][ ]*(\d+))?/);if(!t){return NaN}if(t[3]){const[,e,n,,a]=t.map(e=>parseInt(e));if([e,n,a].some(e=>Number.isNaN(e))){return NaN}return e*3600+n*60+a}const[,n,a]=t.map(e=>parseInt(e));if([n,a].some(e=>Number.isNaN(e))){return NaN}return n*60+a};const a=e=>{const t=e.target;if(!t.classList.contains("b-danmaku")){return}const a=n(t.textContent);if(!Number.isNaN(a)){const e=dq("video");e.currentTime=a;e.play()}};const r=e=>{const t=!Number.isNaN(n(e.text));e.element.classList.toggle("airborne",t)};e({added:r});Observer.videoChange(()=>{const e=dq(".bilibili-player-video-wrap");if(e.classList.contains("airborne-enabled")){return}e.classList.add("airborne-enabled");e.addEventListener("click",a)})})()}})();
\ No newline at end of file
diff --git a/min/bundle.json b/min/bundle.json
index e6a9f6167..7698489fd 100644
--- a/min/bundle.json
+++ b/min/bundle.json
@@ -5,7 +5,7 @@
"activity-apis.min.js": "459D26DB0BB447FEFE6F1842541A119E67C63573A800E56AD7FEC71D20087CEF",
"activity-image-saver.min.js": "4117EDC0D59C15461083B2EB56F5061DCABAA5EA9699C438DD0E221FEAAFA8B3",
"airborne.min.css": "2224FDD07845BD008E193B5E575B14243B27F3E151B46DF3D5D66270154E8278",
- "airborne.min.js": "A3BD8E5118C84685482320D81EBD707AE3A6DC4A66E676414E1C1F9DB7252604",
+ "airborne.min.js": "B5DB1737CB278F2556A99A25D47B4D85F6E48B1D600772658C68C436FCEB50FE",
"aria2-rpc-profile-item.vue.min.js": "61DCAD1D440E036B89C22E00C51C8357DBB529612CB428D55C3804410D2AD059",
"aria2-rpc-profiles.vue.min.js": "CBF3D159566A694BC543EAB5B9E743A13B571743EBDDB8C558AE036483E3AF5A",
"aria2-rpc.min.js": "133AE00F1BD5C68E52385D170FA2983A7A82F0326D8C42C4E3CDA14ED4F3626F",
@@ -244,7 +244,7 @@
"v-dropdown.vue.min.js": "BA1142E2D44CC9593DA803CAA76FA2B814CBD65D4D4210ABF00E811C361D8A37",
"video-card-info.min.js": "13B755C0EE0CA018AE65251E168BAF3395FEA2EB4FAD6949AADD752F61B8819B",
"video-card.vue.min.js": "E67A429519E70AB872B0EF8DB9B5A6992F0C474E98AAEC12468F41C982ABD9C5",
- "video-danmaku.min.js": "EDCFEBA816E1F6AE0BC5719FC716F47790107F0AC7C405740154F7EB4419F90D",
+ "video-danmaku.min.js": "0187BB3692752434D5C9C204D74744DD08884CA3A42C564A85084A60D899C3B7",
"video-dash.min.js": "DD85855581048237B51B2BD6BFEAFB993172DA7DF8E2B0CFEBCF449FDB82F6A6",
"video-downloader-fragment.min.js": "13B755C0EE0CA018AE65251E168BAF3395FEA2EB4FAD6949AADD752F61B8819B",
"video-info.min.js": "99E06DD08BE4B3BA649B8E5C4F81078F83F852E1F43A16199CE67F65BC769AEE",
diff --git a/min/bundle.zip b/min/bundle.zip
index 44f10df11..8959a2ec6 100644
Binary files a/min/bundle.zip and b/min/bundle.zip differ
diff --git a/min/video-danmaku.min.js b/min/video-danmaku.min.js
index 4e4114d89..1285b62e9 100644
--- a/min/video-danmaku.min.js
+++ b/min/video-danmaku.min.js
@@ -1 +1 @@
-(()=>{return(e,t)=>{let n;const r=[];const a=e=>{return{element:e,reuse:false,text:e.textContent||""}};const o=(e,t)=>{if(n){n.stop()}n=Observer.observe(e,e=>{e.forEach(e=>{if(e.type==="childList"){e.addedNodes.forEach(e=>{if(!(e instanceof HTMLElement)){return}const n=a(e);r.push(n);t.added&&t.added(n)});e.removedNodes.forEach(e=>{if(!(e instanceof HTMLElement)){return}const n=r.findIndex(t=>t.element===e);if(n!==-1){const[e]=r.splice(n,1);t.removed&&t.removed(e)}})}else if(e.type==="characterData"){const n=e.target;const a=r.find(e=>e.element===n);if(!a){return}a.text=n.textContent||"";a.reuse=true;t.added&&t.added(a)}})},{childList:true,characterData:true,subtree:true})};const d=async e=>{const t=await videoCondition();if(!t){return}Observer.videoChange(async()=>{const t=await SpinQuery.select(".bilibili-player-video-danmaku");if(!t){return}o(t,e)})};return{export:{forEachVideoDanmaku:d}}}})();
\ No newline at end of file
+(()=>{return(e,t)=>{let n;const r=[];const o=e=>{return{element:e,reuse:false,text:e.textContent||""}};const d=(e,t)=>{if(n){n.stop()}n=Observer.observe(e,e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{if(e.nodeType===Node.TEXT_NODE){const n=e.parentElement;const o=r.find(e=>e.element===n);if(!o){return}o.text=e.textContent||"";o.reuse=true;t.added&&t.added(o);return}if(!(e instanceof HTMLElement)){return}const n=o(e);r.push(n);t.added&&t.added(n)});e.removedNodes.forEach(e=>{if(!(e instanceof HTMLElement)){return}const n=r.findIndex(t=>t.element===e);if(n!==-1){const[e]=r.splice(n,1);t.removed&&t.removed(e)}})})},{childList:true,subtree:true})};const s=async e=>{const t=await videoCondition();if(!t){return}Observer.videoChange(async()=>{const t=await SpinQuery.select(".bilibili-player-video-danmaku");if(!t){return}d(t,e)})};return{export:{forEachVideoDanmaku:s}}}})();
\ No newline at end of file
diff --git a/src/video/airborne/airborne.ts b/src/video/airborne/airborne.ts
index f5c8b933e..6b5a910ef 100644
--- a/src/video/airborne/airborne.ts
+++ b/src/video/airborne/airborne.ts
@@ -10,7 +10,7 @@ import { DanmakuRecord } from '../video-danmaku'
if (!text) {
return NaN
}
- const airborneMatch = text.match(/(\d+)[::.](\d+)([::](\d+))?/)
+ const airborneMatch = text.match(/(\d+)[ ]*[::.][ ]*(\d+)([ ]*[::][ ]*(\d+))?/)
if (!airborneMatch) {
return NaN
}
diff --git a/src/video/video-danmaku.ts b/src/video/video-danmaku.ts
index 9e2ccab41..9344a00c7 100644
--- a/src/video/video-danmaku.ts
+++ b/src/video/video-danmaku.ts
@@ -22,37 +22,37 @@ const startRecording = (container: HTMLElement, callback: DanmakuRecordCallback)
}
danmakuContainerObserver = Observer.observe(container, records => {
records.forEach(record => {
- if (record.type === 'childList') {
- record.addedNodes.forEach(node => {
- if (!(node instanceof HTMLElement)) {
+ record.addedNodes.forEach(node => {
+ if (node.nodeType === Node.TEXT_NODE) {
+ const element = node.parentElement as HTMLElement
+ const danmaku = recordedDanmakus.find(d => d.element === element)
+ if (!danmaku) {
return
}
- const danmaku = parseDanmakuRecord(node)
- recordedDanmakus.push(danmaku)
+ danmaku.text = node.textContent || ''
+ danmaku.reuse = true
callback.added && callback.added(danmaku)
- })
- record.removedNodes.forEach(node => {
- if (!(node instanceof HTMLElement)) {
- return
- }
- const index = recordedDanmakus.findIndex(d => d.element === node)
- if (index !== -1) {
- const [danmaku] = recordedDanmakus.splice(index, 1)
- callback.removed && callback.removed(danmaku)
- }
- })
- } else if (record.type === 'characterData') {
- const element = record.target as HTMLElement
- const danmaku = recordedDanmakus.find(d => d.element === element)
- if (!danmaku) {
return
}
- danmaku.text = element.textContent || ''
- danmaku.reuse = true
+ if (!(node instanceof HTMLElement)) {
+ return
+ }
+ const danmaku = parseDanmakuRecord(node)
+ recordedDanmakus.push(danmaku)
callback.added && callback.added(danmaku)
- }
+ })
+ record.removedNodes.forEach(node => {
+ if (!(node instanceof HTMLElement)) {
+ return
+ }
+ const index = recordedDanmakus.findIndex(d => d.element === node)
+ if (index !== -1) {
+ const [danmaku] = recordedDanmakus.splice(index, 1)
+ callback.removed && callback.removed(danmaku)
+ }
+ })
})
- }, { childList: true, characterData: true, subtree: true })
+ }, { childList: true, subtree: true })
}
export const forEachVideoDanmaku = async (callback: DanmakuRecordCallback) => {
const hasVideo = await videoCondition()