返回提交历史
Modified
g4f/gui/client/static/js/highlightjs-copy.min.js
+2
-4
XFEstudio/gpt4free
Clean up highlightjs-copy.min.js
504b0dbf
代码差异
1 个文件
+2
-4
@@ -26,13 +26,11 @@ class CopyButtonPlugin {
26
26
}
27
27
28
28
try {
29
console.warn("newText type: ", typeof newText);
30
console.warn("Current Text: " + newText);
31
29
await navigator.clipboard.writeText(newText);
32
30
} catch (e) {
33
console.error("Clipboard API writeText failed!!")
34
31
console.error(e);
35
fallback_copy(newText);
32
console.error("Clipboard API writeText() failed! Fallback to document.exec(\"copy\")...");
33
fallback_clipboard(newText);
36
34
}
37
35
button.innerHTML = "Copied!";
38
36
button.dataset.copied = true;