mirror of
https://github.com/VickScarlet/lifeRestart.git
synced 2025-07-17 09:33:55 +08:00
fix copy bug
This commit is contained in:
@@ -37,7 +37,7 @@ globalThis.$$off = (tag, fn) => {
|
|||||||
globalThis.$$copy = async text => {
|
globalThis.$$copy = async text => {
|
||||||
const result = await navigator.permissions.query({ name: "clipboard-write" })
|
const result = await navigator.permissions.query({ name: "clipboard-write" })
|
||||||
if (result.state == "granted" || result.state == "prompt") {
|
if (result.state == "granted" || result.state == "prompt") {
|
||||||
navigator.clipboard.writeText(data)
|
navigator.clipboard.writeText(text)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const input = document.createElement('input');
|
const input = document.createElement('input');
|
||||||
|
Reference in New Issue
Block a user