function copyResultImageToClipboard() { try { const root = document.documentElement; const backgroundColor = getComputedStyle(root).getPropertyValue('--bg-color'); htmlToImage.toBlob($("#result-page")[0], { skipFonts: true, preferredFontFormat: "woff2", backgroundColor: backgroundColor, // Set background color dynamically }).then((blob) => { navigator.clipboard.write([new ClipboardItem({ [blob.type]: blob })]); showCopiedNotice(); $title.parent().remove(); }).catch((error) => { console.error("Error converting result page to image:", error); $title.parent().remove(); }); } catch (error) { console.error("Error copying result image to clipboard:", error); } } function showCopiedNotice() { const notice = $("