From a8c7253bf8e27fe8cd9eeac5bf4ba895205408e3 Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Sat, 21 Dec 2024 18:57:15 +0800 Subject: [PATCH] fix: online counter background opacity --- src/components/Header.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 94c6bb6..3d1e70e 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -37,6 +37,10 @@ function Header() { // @ts-expect-error CustomDesc is a global variable const customDesc = window.CustomDesc || t("nezha") + const customBackgroundImage = + // @ts-expect-error CustomBackgroundImage is a global variable + (window.CustomBackgroundImage as string) !== "" ? window.CustomBackgroundImage : undefined + useEffect(() => { const link = document.querySelector("link[rel*='icon']") || document.createElement("link") // @ts-expect-error set link.type @@ -79,7 +83,9 @@ function Header() {