From 8b2924c70e8d9658eeb39e1a9074d0b418221a81 Mon Sep 17 00:00:00 2001 From: Kento Nishi Date: Mon, 27 May 2024 22:19:34 -0400 Subject: [PATCH] fix #5 --- src/components/Hyperchat.svelte | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/Hyperchat.svelte b/src/components/Hyperchat.svelte index 9a1dddf..d1277aa 100644 --- a/src/components/Hyperchat.svelte +++ b/src/components/Hyperchat.svelte @@ -552,6 +552,7 @@ const exportScreenshot = async () => { const clonedNode = screenshotElement?.cloneNode(true) as HTMLDivElement; clonedNode.id = 'screenshot-element'; + clonedNode.dataset.theme = $dataTheme; hiddenElement?.appendChild(clonedNode); let style = document.querySelector('#shift-screenshot') as HTMLStyleElement; if (!style) { @@ -572,6 +573,12 @@ bottomNode.appendChild(spanNode); bottomNode.appendChild(hrefNode); style.innerHTML = ` + #screenshot-element { + color: black; + } + #screenshot-element[data-theme="dark"] { + color: white; + } #screenshot-element img { transform: translateY(35%); }