From 70bccad0189a3ad96a8fbc80401547e96895a681 Mon Sep 17 00:00:00 2001 From: Hakadao Date: Thu, 31 Aug 2023 17:40:49 +0800 Subject: [PATCH] chore: prevent change Bilibili Evolved background color for the non-homepage --- src/contentScripts/views/App.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/contentScripts/views/App.vue b/src/contentScripts/views/App.vue index 237f66d2..a3254815 100644 --- a/src/contentScripts/views/App.vue +++ b/src/contentScripts/views/App.vue @@ -128,9 +128,11 @@ onMounted(() => { }, 1200) }) - // Force overwrite Bilibili Evolved body tag & html tag background color - document.body.style.setProperty('background-color', 'unset', 'important'); - document.documentElement.style.setProperty('background-color', 'unset', 'important'); + if (isBilibiliHomePage.value) { + // Force overwrite Bilibili Evolved body tag & html tag background color + document.body.style.setProperty('background-color', 'unset', 'important'); + document.documentElement.style.setProperty('background-color', 'unset', 'important'); + } if (mainAppRef.value) { mainAppRef.value.addEventListener('scroll', () => {