Extra caution is recommended when installing recently uploaded/updated scripts (read more)
Be sure you trust any scripts you install
Mailto 2 Gmail
Makes "mailto" links open in the web interface to your gmail account, instead of a POP-3 client (like Outlook, Eudora, Thunderbird, etc.)
Modified from: http://userscripts.org/scripts/show/11324
The old "Mailto 2 Webmail" was taking 10+ seconds to work its magic on an average page on my computer. For large forums it'd take several minutes, which I'm not willing to tolerate when it only took 5 seconds with it disabled.
I stripped out all the excess functionality(Yahoo, etc.) and simplified the code. I don't know what that XPath stuff is, but it's obviously slower than regular javascript.
Maybe this more efficient version will be helpful to someone stuck on a not-so-new computer. ;)
|
|
Good..but can you include Gmail itself? also, since we're in the mood of speed, change your code to this for optimal speed:
// ==UserScript==
// @name Mailto 2 Gmail
// @description Makes "mailto" links open in the web interface to your gmail account, instead of a POP-3 client (like Outlook, Eudora, Thunderbird, etc.)
// @include *
// @exclude http://mail.google.com/*
// @exclude https://mail.google.com/*
// ==/UserScript==
var GmailURL='https://mail.google.com/mail/?ui=1&view=cm&fs=1&tf=1&to=';var ATags=document.getElementsByTagName('a');var TagHref=0;var TagHrefL=0;var EmailAddy=0;var EmailAddy_Offset=0;var Subject_Offset=0;var Subject=0;var CompleteURL=0;var LoopA=0;while(LoopA<atags>-1){EmailAddy_Offset+=7;Subject_Offset=TagHrefL.indexOf('?subject=',EmailAddy_Offset);if(Subject_Offset>-1){EmailAddy=TagHref.substring(EmailAddy_Offset,Subject_Offset);Subject_Offset+=9;Subject=TagHref.substring(Subject_Offset)}else EmailAddy=TagHref.substring(EmailAddy_Offset);CompleteURL=GmailURL+EmailAddy;if(Subject!=0)CompleteURL+='&su='+Subject;ATags[LoopA].setAttribute('href',CompleteURL);ATags[LoopA].setAttribute('title','Send from Gmail');ATags[LoopA].setAttribute('target','_blank')}}LoopA++}delete ATags;
|
|
|
Could you do the same thing but make it work for the new Yahoo interface? I altered the other one to work per the directions in a comment but it's slow on my computer too. thanks |
|
|
A good Script |
You could comment on this script if you were logged in.
