chrome bookmarklet copy text code example
Example: chrome bookmarklet copy text
(function (text) {
var node = document.createElement('textarea')
var selection = document.getSelection()
node.textContent = text
document.body.appendChild(node)
selection.removeAllRanges()
node.select()
document.execCommand('copy')
selection.removeAllRanges()
document.body.removeChild(node)
})('Text To Copy')
javascript:!function(a){var b=document.createElement("textarea"),c=document.getSelection();b.textContent=a,document.body.appendChild(b),c.removeAllRanges(),b.select(),document.execCommand("copy"),c.removeAllRanges(),document.body.removeChild(b)}("Text To Copy");