MCPcopy Index your code
hub / github.com/zxlie/FeHelper / _copyToClipboard

Function _copyToClipboard

apps/code-beautify/content-script.js:357–367  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

355 };
356
357 let _copyToClipboard = function (text) {
358 let input = document.createElement('textarea');
359 input.style.position = 'fixed';
360 input.style.opacity = 0;
361 input.value = text;
362 document.body.appendChild(input);
363 input.select();
364 document.execCommand('Copy');
365 document.body.removeChild(input);
366 alert('代码复制成功,随处粘贴可用!');
367 };
368
369 return function () {
370 let ext = location.pathname.substring(location.pathname.lastIndexOf(".") + 1).toLowerCase();

Callers 1

content-script.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected