GMail Multiple From Address Extensions

By EricB Last update Dec 16, 2008 — Installed 2,206 times.

xpath

in
Subscribe to xpath 4 posts, 3 voices



Avindra V.G. Scriptwright

nice script, just one suggestion:

instead of:

            var ddl = doc.evaluate('//select[@name="from"]', doc, null, XPathResult.ANY_TYPE, null).iterateNext();

you can use:

var ddl = doc.evaluate('//select[@name="from"]', doc, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;

or
var ddl = doc.evaluate('//select[@name="from"]', doc, null, 9, null).singleNodeValue;

It reads better, and it's *supposed to be faster, as specified by W3C.

 
EricB Script's Author

Thanks for the heads up. I'll admit that by the time I solved the problems with the GMail Greasemonkey API I was just thrilled to have it working and haven't had a chance to spend much time on it since then. It is certainly popular enough to deserve another batch of updates. We'll see how tonight goes.

 
SacLiv User

I have a question. This script seems to not work when i'm replying to a mail in gmail. Is there a way to make that work as well?

 
EricB Script's Author

I wasn't aware that it didn't, but I would guess that most people just set GMail up so that when they reply it sends it from the address the email was to. That's in the GMail settings somewhere.

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