fix: top bar displayed on the unexpected pages (#1256) (#1257)
Some checks are pending
CI / Test (lts/*, ubuntu-latest) (push) Waiting to run
CI / Test (lts/*, windows-latest) (push) Waiting to run
CI / Test (lts/-1, ubuntu-latest) (push) Waiting to run
CI / Test (lts/-1, windows-latest) (push) Waiting to run

Co-authored-by: Hakadao <a578457889743@gmail.com>
This commit is contained in:
胡雨晴
2025-01-07 21:01:10 -05:00
committed by GitHub
parent c3199f6f8c
commit 9e3afecf7a
2 changed files with 11 additions and 3 deletions

View File

@@ -48,7 +48,11 @@ function isSupportedPages(): boolean {
// search page
|| /https?:\/\/search\.bilibili\.com\.*/.test(currentUrl)
// moments
|| /https?:\/\/t\.bilibili\.com\.*/.test(currentUrl)
|| (
/https?:\/\/t\.bilibili\.com\.*/.test(currentUrl)
// https://github.com/BewlyBewly/BewlyBewly/issues/1256
&& !/https?:\/\/t\.bilibili\.com\/vote.*/.test(currentUrl)
)
// moment detail
|| /https?:\/\/(?:www\.)?bilibili\.com\/opus\/.*/.test(currentUrl)
// history page
@@ -100,6 +104,8 @@ export function isSupportedIframePages(): boolean {
/https?:\/\/t\.bilibili\.com.*/.test(currentUrl)
// https://github.com/BewlyBewly/BewlyBewly/issues/1246
&& !/https?:\/\/t\.bilibili\.com\/share\/card\/index.*/.test(currentUrl)
// https://github.com/BewlyBewly/BewlyBewly/issues/1256
&& !/https?:\/\/t\.bilibili\.com\/h5\/dynamic\/vote.*/.test(currentUrl)
)
// Since `Open in drawer` will open the video page within an iframe, so we need to support the following pages