MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / copyToClipboard

Function copyToClipboard

assets/js/box-shadow.js:2–11  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

1
2function copyToClipboard(value) {
3 const tempInput = document.createElement("textarea");
4 tempInput.style = "position: absolute; left: -1000px; top: -1000px";
5 tempInput.value = value
6 document.body.appendChild(tempInput);
7 tempInput.select();
8 document.execCommand('copy');
9 document.body.removeChild(tempInput);
10 return true;
11}
12
13const ul = document.querySelector('ul')
14const shadows = [

Callers 1

addShadowFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected