diff --git a/min/new-styles.min.js b/min/new-styles.min.js index e20bbdaa3..3131fb283 100644 --- a/min/new-styles.min.js +++ b/min/new-styles.min.js @@ -1 +1 @@ -(()=>{return(e,l)=>{if(document.URL===`https://h.bilibili.com/`){return}if(document.querySelector(`.z_header`)!==null){l.removeStyle("tweetsStyle");return}SpinQuery.any(()=>$(".custom-scrollbar"),e=>e.removeClass("custom-scrollbar"));SpinQuery.any(()=>$("#banner_link"),()=>l.removeStyle("tweetsStyle"));if(["h.bilibili.com","live.bilibili.com","link.bilibili.com"].some(e=>document.URL.includes(e))){l.applyStyle("style","bilibili-style-optimization")}else{Promise.race([SpinQuery.select(()=>document.querySelector(".bili-header-m")).then(e=>e!==null&&e.classList.contains("stardust-video")),SpinQuery.select(()=>document.querySelector("body>#Header")).then(e=>e!==null)]).then(e=>l.applyStyle(e?"style":"oldStyle","bilibili-style-optimization"))}}})(); \ No newline at end of file +(()=>{return(e,l)=>{if(document.URL===`https://h.bilibili.com/`){return}if(document.querySelector(`.z_header`)!==null){l.removeStyle("tweetsStyle");return}SpinQuery.any(()=>$(".custom-scrollbar"),e=>e.removeClass("custom-scrollbar"));SpinQuery.any(()=>$("#banner_link"),()=>l.removeStyle("tweetsStyle"));if(["/h.bilibili.com","/live.bilibili.com","/link.bilibili.com"].some(e=>document.URL.includes(e))){l.applyStyle("style","bilibili-style-optimization")}else{Promise.race([SpinQuery.select(()=>document.querySelector(".bili-header-m")).then(e=>e!==null&&e.classList.contains("stardust-video")),SpinQuery.select(()=>document.querySelector("body>#Header")).then(e=>e!==null)]).then(e=>l.applyStyle(e?"style":"oldStyle","bilibili-style-optimization"))}}})(); \ No newline at end of file diff --git a/style/optimization/new-styles.js b/style/optimization/new-styles.js index 00a4afd2d..8dc92c015 100644 --- a/style/optimization/new-styles.js +++ b/style/optimization/new-styles.js @@ -66,9 +66,9 @@ SpinQuery.any( // } // }); if ([ - "h.bilibili.com", - "live.bilibili.com", - "link.bilibili.com" + "/h.bilibili.com", + "/live.bilibili.com", + "/link.bilibili.com" ].some(it => document.URL.includes(it))) { resources.applyStyle("style", "bilibili-style-optimization");