MCPcopy Create free account
hub / github.com/LeFroid/Viper-Browser / GM_setClipboard

Function GM_setClipboard

src/app/assets/javascript/GreaseMonkeyAPI.js:72–84  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

70 }
71
72 function GM_setClipboard(text) {
73 function onCopy(event) {
74 document.removeEventListener('copy', onCopy, true);
75
76 event.stopImmediatePropagation();
77 event.preventDefault();
78
79 event.clipboardData.setData('text/plain', text);
80 }
81
82 document.addEventListener('copy', onCopy, true);
83 document.execCommand('copy');
84 }
85
86 function GM_xmlhttpRequest(details) {
87 details.method = details.method ? details.method.toUpperCase() : "GET";

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected