mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
1 line
718 B
JavaScript
1 line
718 B
JavaScript
(()=>{return(e,t)=>{const r=()=>{SpinQuery.select(".custom-scrollbar").then(e=>e&&e.classList.remove("custom-scrollbar"))};const l=()=>{document.body.classList.remove("dark");t.removeStyle("scrollbarStyle");t.removeStyle("darkStyleNavBar");t.removeStyle("darkStyle");t.removeStyle("darkStyleImportant")};const a=()=>{if(e.noDarkOnMember&&document.URL.startsWith("https://member.bilibili.com/v2")){l();return}document.body.classList.add("dark");r();if(!e.useDarkStyleAsUserStyle){t.applyStyle("scrollbarStyle");t.applyImportantStyle("darkStyleNavBar");t.applyStyle("darkStyle");t.applyImportantStyle("darkStyleImportant")}};a();addSettingsListener("useDarkStyleAsUserStyle",e=>{l();a()});return{reload:a,unload:l}}})(); |