Skip to content

Instantly share code, notes, and snippets.

@tricknotes
Created April 26, 2014 06:45
Show Gist options
  • Select an option

  • Save tricknotes/11313460 to your computer and use it in GitHub Desktop.

Select an option

Save tricknotes/11313460 to your computer and use it in GitHub Desktop.

Revisions

  1. tricknotes created this gist Apr 26, 2014.
    4 changes: 4 additions & 0 deletions selection.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    document.addEventListener('mouseup', function() {
    var text = window.getSelection().toString();
    console.log(text);
    });