Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function copy(obj) {
- try {
- if (obj) selectContent(obj)
- document.execCommand('copy')
- // clears the current selection
- window.getSelection().removeAllRanges()
- } catch (err) {
- console.log(err)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement