xpath
|
|
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. |
|
|
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. |
|
|
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? |
|
|
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. |