0

I am using the "Gmail This!" bookmarklet to send the URL and selected text using a mini compose window through Gmail. Currently I still need to type in the recipient and then click on send.

I was wondering if it was possible to pass a recipient in the code that Gmail can use so I only need to click the send button

Here is the code I'm using:

javascript:(function(){var%20w=window,d=document,gS='getSelection';var%20s=(''+(w[gS]?w[gS]():d[gS]?d[gS]():d.selection.createRange().text)).replace(/(^\s+|\s+$)/g,'');m='http://mail.google.com/mail/?view=cm&fs=1&tf=1&to=&su='+encodeURIComponent(document.title)+'&body='+encodeURIComponent(document.location+'\n\n'+s);w=window.open(m,'addwindow','status=no,toolbar=no,width=575,height=545,resizable=yes');setTimeout(function(){w.focus();},%20250);})();

The code comes from this page An Improved "Gmail This" Bookmarket

I just need to send the link to myself

cadfile
  • 1
  • 2

1 Answers1

0

Simply add your email address after the "&to=" in the bookmarklet:

javascript:(function(){var%20w=window,d=document,gS='getSelection';var%20s=(''+(w[gS]?w[gS]():d[gS]?d[gS]():d.selection.createRange().text)).replace(/(^\s+|\s+$)/g,'');m='http://mail.google.com/mail/?view=cm&fs=1&tf=1&to=you@email.com&su='+encodeURIComponent(document.title)+'&body='+encodeURIComponent(document.location+'\n\n'+s);w=window.open(m,'addwindow','status=no,toolbar=no,width=575,height=545,resizable=yes');setTimeout(function(){w.focus();},%20250);})();
Chris Crewdson
  • 1,270
  • 1
  • 10
  • 7