fix copy bug

This commit is contained in:
Vick Scarlet
2021-12-02 17:57:31 +08:00
parent eab1975791
commit a143feadaf

View File

@ -37,7 +37,7 @@ globalThis.$$off = (tag, fn) => {
globalThis.$$copy = async text => {
const result = await navigator.permissions.query({ name: "clipboard-write" })
if (result.state == "granted" || result.state == "prompt") {
navigator.clipboard.writeText(data)
navigator.clipboard.writeText(text)
return;
}
const input = document.createElement('input');