Advertisement
Guest User

Untitled

a guest
May 24th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. function copy(obj) {
  2. try {
  3. if (obj) selectContent(obj)
  4. document.execCommand('copy')
  5. // clears the current selection
  6. window.getSelection().removeAllRanges()
  7. } catch (err) {
  8. console.log(err)
  9. }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement