Yahoo! Mail Mailto Anywhere...

By makedjakila Last update Dec 21, 2006 — Installed 1,021 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 3 posts, 3 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
Avindra V.G. Scriptwright

even better... use teh unescape function. example:

unescape("%40")

returns

"@"

pretty cool.

furthermore... a better xpath expression would be:

"//a[starts-with(@href,'mailto:')]"

that eliminates the need for your whole "isMailTo" check. not sure why you would even need the "hasMail" part.....

 
bgruber User

some websites use %40 instead of '@' when they encode mailtos, so i would change the hasMail= line to:

hasMail = Math.max(thisLink.href.indexOf('%40'), thisLink.href.indexOf('@'));

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel