MCPcopy Create free account
hub / github.com/ChinaGodMan/UserScripts / copyText

Function copyText

smart-translator-tool/smart-translator-tool.user.js:1427–1435  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

1425
1426// copy 文本
1427const copyText = (text) => {
1428 navigator.clipboard.writeText(text)
1429 .then(() => {
1430 })
1431 .catch(err => {
1432 // 某些浏览器可能不支持或需要用户交互
1433 // console.error('无法复制文本: ', err);
1434 })
1435}
1436
1437// -------------------------------------
1438

Callers 2

baiduTranslateFunction · 0.85
bindTextClickFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected