From 8a2d4be9c2aa156cb576365d5d3415e270c8f3ea Mon Sep 17 00:00:00 2001 From: Hakadao Date: Mon, 30 Oct 2023 00:19:32 +0800 Subject: [PATCH] feat: hide the search bar on search page (#57) --- src/contentScripts/views/App.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/contentScripts/views/App.vue b/src/contentScripts/views/App.vue index 4740c057..fac787fc 100644 --- a/src/contentScripts/views/App.vue +++ b/src/contentScripts/views/App.vue @@ -42,6 +42,12 @@ const isVideoPage = computed(() => { return false }) +const isSearchPage = computed(() => { + if (/https?:\/\/search.bilibili.com\/.*$/.test(location.href)) + return true + return false +}) + const isTopbarFixed = computed(() => { if ( // home page @@ -275,6 +281,7 @@ provide('activatedPage', activatedPage) v-if="settings.isShowTopbar && !isHomePage" pos="top-0 left-0" z-9999 w-full :style="{ position: isTopbarFixed ? 'fixed' : 'absolute' }" + :show-search-bar="!isSearchPage" />