MCPcopy Create free account
hub / github.com/dajie111/nodeseek-userscript / fallbackCopyText

Function fallbackCopyText

notes.js:2392–2401  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

2390
2391 // 代码复制的回退方案
2392 function fallbackCopyText(text) {
2393 const ta = document.createElement('textarea');
2394 ta.value = text;
2395 ta.style.position = 'fixed';
2396 ta.style.zIndex = '-1';
2397 document.body.appendChild(ta);
2398 ta.select();
2399 try { document.execCommand('copy'); } catch (e) {}
2400 document.body.removeChild(ta);
2401 }
2402
2403 // 代码复制成功提示
2404 function showCodeCopyNotification() {

Callers 1

buildDialogFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected