Bilibili-Evolved/min/custom-navbar-logo.min.js
2021-10-26 13:22:15 +08:00

1 line
646 B
JavaScript

(()=>(t,o)=>{const{NavbarComponent:s}=o.import("custom-navbar-component");class a extends s{constructor(){super();this.href=`https://www.bilibili.com/`;this.touch=false;addSettingsListener("customNavbarSeasonLogo",(()=>this.getLogo()),true)}async getLogo(){if(t.customNavbarSeasonLogo){const t=await Ajax.getJson("https://api.bilibili.com/x/web-show/res/locs?pf=0&ids=142");if(t.code===0){this.html=`<img height="38" class="custom-navbar-season-logo" src="${t.data[142][0].litpic.replace("http:","https:")}">`;return}}this.html=`<i class="custom-navbar-iconfont custom-navbar-icon-logo"></i>`}get name(){return"logo"}}return{export:{Logo:a}}})();