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

Function copyCloneCmd

github-clone-button/github-clone-button.user.js:379–387  ·  view source on GitHub ↗
(cmd)

Source from the content-addressed store, hash-verified

377 }
378
379 function copyCloneCmd(cmd) {
380 if (!cmd) return
381 if (typeof GM_setClipboard === 'function') {
382 GM_setClipboard(cmd)
383 } else if (navigator.clipboard) {
384 navigator.clipboard.writeText(cmd)
385 }
386 showTip(`Copied: ${cmd}`)
387 }
388
389 function showTip(msg) {
390 const tip = document.createElement('div')

Callers 1

addCopyButtonFunction · 0.85

Calls 1

showTipFunction · 0.85

Tested by

no test coverage detected