Bilibili-Evolved/min/custom-navbar-logo.min.js
2020-01-08 20:16:42 +08:00

1 line
618 B
JavaScript

(()=>{return(t,o)=>{const{NavbarComponent:s}=o.import("custom-navbar-component");class e 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" 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:e}}}})();