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