Skip to content

Commit

Permalink
fix #5
Browse files Browse the repository at this point in the history
  • Loading branch information
KentoNishi committed May 28, 2024
1 parent a3688ca commit 8b2924c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/Hyperchat.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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%);
}
Expand Down

0 comments on commit 8b2924c

Please sign in to comment.