mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
1 line
906 B
JavaScript
1 line
906 B
JavaScript
(()=>{return(t,e)=>{class n{constructor(e="",n="",s="0 0 auto",a=false,i=false,r=null,o=null,u=null,l=0,c=t.touchNavBar,h=false){this.html=e;this.popupHtml=n;this.flex=s;this.disabled=a;this.requestedPopup=i;this.initialPopup=r;this.onPopup=o;this.href=u;this.notifyCount=l;this.touch=c;this.active=h;this.noPadding=false}get name(){return"blank1"}get order(){return t.customNavbarOrder[this.name]}get hidden(){return t.customNavbarHidden.includes(this.name)}async setNotifyCount(t){const e=await SpinQuery.select(`.custom-navbar li[data-name='${this.name}'] .notify-count`);if(!e||!t){e.innerHTML="";return}e.innerHTML=t.toString()}async setNotifyStyle(t){const e=await SpinQuery.select(`.custom-navbar li[data-name='${this.name}'] .notify-count`);if(!e){return}const n={1:"number",2:"dot",3:"hidden"};e.classList.remove(...Object.values(n));e.classList.add(n[t])}}return{export:{NavbarComponent:n}}}})(); |