Skip to content

Instantly share code, notes, and snippets.

@timvisher
Created January 18, 2011 15:28
Show Gist options
  • Save timvisher/784582 to your computer and use it in GitHub Desktop.
Save timvisher/784582 to your computer and use it in GitHub Desktop.
Script for popping up a GMail compose window with info about the current page in it.
url='https://mail.google.com/mail?view=cm&tf=0&to=&su=';
if("" != document.getSelection()) {
url += encodeURIComponent('[TUMBI]: ' + document.getSelection()) + "&body=" + encodeURIComponent(document.URL);
}
window.open(url, 'gmailForm', 'scrollbars=yes,width=680,height=510,top=175,left=75,status=no,resizable=yes');
void(0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment