From b4e9b3ecfad176a9bae636bffa0abba2e857d48c Mon Sep 17 00:00:00 2001 From: Melorise <0d00@0721.hk> Date: Wed, 29 Jul 2026 15:24:53 +0800 Subject: [PATCH] fix: preserve favicon outline during tinting --- frontend/src/utils/xpack.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/utils/xpack.ts b/frontend/src/utils/xpack.ts index 136cd6a..6ad920b 100644 --- a/frontend/src/utils/xpack.ts +++ b/frontend/src/utils/xpack.ts @@ -35,7 +35,7 @@ export function resetXSetting() { async function getColoredFavicon(url: string, color: string) { const res = await fetch(url); let svgText = await res.text(); - svgText = svgText.replace(/fill=(["'])(.*?)\1/g, `fill="${color}"`); + svgText = svgText.replace(/fill=(["'])currentColor\1/g, `fill="${color}"`); svgText = svgText.replaceAll('currentColor', color); return `data:image/svg+xml,${encodeURIComponent(svgText)}`; }