Last active
January 13, 2018 15:18
-
-
Save rndme/8c3b40309f8ff99f6d3b4c9407bbfc03 to your computer and use it in GitHub Desktop.
This file contains 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 copy(str){ | |
var inp = document.createElement("textarea"); | |
inp.style.position="fixed"; | |
document.body.appendChild(inp); | |
inp.value=str; | |
inp.select(); | |
document.execCommand("Copy"); | |
inp.remove(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment