Skip to content

Instantly share code, notes, and snippets.

@tricknotes
Created April 26, 2014 06:45
Show Gist options
  • Save tricknotes/11313460 to your computer and use it in GitHub Desktop.
Save tricknotes/11313460 to your computer and use it in GitHub Desktop.
document.addEventListener('mouseup', function() {
var text = window.getSelection().toString();
console.log(text);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment