mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
1 line
1002 B
JavaScript
1 line
1002 B
JavaScript
(()=>(e,r)=>{waitForQuery()(()=>$(".nav-search-keyword"),e=>e.length>0,e=>e.attr("placeholder","搜索")),waitForQuery()(()=>$(".custom-scrollbar"),e=>e.length>0,e=>e.removeClass("custom-scrollbar"));const t=document.getElementsByClassName("bili-wrapper")[0];let i=!1;t instanceof Element&&(i=50===parseInt(window.getComputedStyle(t).height));let l="";if(l=i?r.getStyle("style","bilibili-new-style"):r.getStyle("oldStyle","bilibili-new-style"),$("#bilibili-new-style").remove(),$("body").after(l),e.overrideNavBar){waitForQuery()(()=>$(".search"),e=>e.length>0&&$(".nav-con.fr").length>0,e=>{e.detach().insertAfter(".nav-con.fr")}),waitForQuery()(()=>$("input.search-keyword"),e=>e.length>0,e=>e.attr("placeholder","搜索"));const t=r.getStyle("navbarOverrideStyle","bilibili-nav-bar-override");if($("#bilibili-nav-bar-override").remove(),$("body").after(t),!e.showBanner){const e=r.getStyle("noBannerStyle","bilibili-banner-override");$("#bilibili-banner-override").remove(),$("body").after(e)}}})(); |