diff options
author | foxfire52 <foxfire52@virgilio.it> | 2024-10-26 12:39:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-26 12:39:40 +0200 |
commit | 504b0dbf5b702532e545b8f710b7cfbb657d3200 (patch) | |
tree | 3c79577f51d0fd964c21dd04c3cef4b054f2dc2e /g4f/gui/client/static/js | |
parent | Clean up chat.v1.js (diff) | |
download | gpt4free-504b0dbf5b702532e545b8f710b7cfbb657d3200.tar gpt4free-504b0dbf5b702532e545b8f710b7cfbb657d3200.tar.gz gpt4free-504b0dbf5b702532e545b8f710b7cfbb657d3200.tar.bz2 gpt4free-504b0dbf5b702532e545b8f710b7cfbb657d3200.tar.lz gpt4free-504b0dbf5b702532e545b8f710b7cfbb657d3200.tar.xz gpt4free-504b0dbf5b702532e545b8f710b7cfbb657d3200.tar.zst gpt4free-504b0dbf5b702532e545b8f710b7cfbb657d3200.zip |
Diffstat (limited to '')
-rw-r--r-- | g4f/gui/client/static/js/highlightjs-copy.min.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/g4f/gui/client/static/js/highlightjs-copy.min.js b/g4f/gui/client/static/js/highlightjs-copy.min.js index 20b7d52b..0c3c1cee 100644 --- a/g4f/gui/client/static/js/highlightjs-copy.min.js +++ b/g4f/gui/client/static/js/highlightjs-copy.min.js @@ -26,13 +26,11 @@ class CopyButtonPlugin { } try { - console.warn("newText type: ", typeof newText); - console.warn("Current Text: " + newText); await navigator.clipboard.writeText(newText); } catch (e) { - console.error("Clipboard API writeText failed!!") console.error(e); - fallback_copy(newText); + console.error("Clipboard API writeText() failed! Fallback to document.exec(\"copy\")..."); + fallback_clipboard(newText); } button.innerHTML = "Copied!"; button.dataset.copied = true; |