Last active
July 28, 2019 02:44
-
-
Save doxas/0d26346aed1043786c6cf97811de28a9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function copyToClipboard(stringData){ | |
let t = document.createElement('textarea'); | |
t.value = stringData; | |
document.body.appendChild(t); | |
t.select(); | |
document.execCommand('copy'); | |
document.body.removeChild(t); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment