diff --git a/src/contentScripts/index.ts b/src/contentScripts/index.ts index e6c18d97..844f6653 100644 --- a/src/contentScripts/index.ts +++ b/src/contentScripts/index.ts @@ -37,6 +37,9 @@ function isSupportedPages(): boolean { // homepage isHomePage() + // popular page https://www.bilibili.com/v/popular/all + || /https?:\/\/(?:www\.)?bilibili\.com\/v\/popular\/all.*/.test(currentUrl) + // video page || /https?:\/\/(?:www\.)?bilibili\.com\/(?:video|list)\/.*/.test(currentUrl) // anime playback & movie page diff --git a/src/contentScripts/views/App.vue b/src/contentScripts/views/App.vue index 37775be7..642ed7a5 100644 --- a/src/contentScripts/views/App.vue +++ b/src/contentScripts/views/App.vue @@ -12,6 +12,7 @@ import { useSettingsStore } from '~/stores/settingsStore' import { isHomePage, isInIframe, isVideoOrBangumiPage, openLinkToNewTab, queryDomUntilFound, scrollToTop } from '~/utils/main' import emitter from '~/utils/mitt' +import { isSupportedIframePages } from '..' import { setupNecessarySettingsWatchers } from './necessarySettingsWatchers' const mainStore = useMainStore() @@ -125,7 +126,7 @@ watch( // Remove the original Bilibili top bar when using original bilibili page to avoid two top bars showing const biliHeader = document.querySelector('.bili-header') as HTMLElement | null - if (biliHeader) { + if (biliHeader && isSupportedIframePages()) { if (settingsStore.getDockItemIsUseOriginalBiliPage(activatedPage.value) && !isInIframe()) { biliHeader.style.visibility = 'hidden' }