Skip to content

Instantly share code, notes, and snippets.

@nrn
Created December 25, 2012 21:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nrn/4375497 to your computer and use it in GitHub Desktop.
Save nrn/4375497 to your computer and use it in GitHub Desktop.
Bookmarklet to mail a link/selected text
javascript:(function () {
var selected = getSelection().toString();
if (selected !== "") selected = '"...\n'+selected+'\n..."\n';
location.href = 'mailto:?SUBJECT='+encodeURIComponent(document.title)+'&BODY='+encodeURIComponent('\n'+location.href+'\n'+selected);
})()
@nrn
Copy link
Author

nrn commented Dec 25, 2012

Bookmarklet from @nrn for @euler, merry christmas!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment