Comment 23 for bug 1059051

Revision history for this message
Rodrigo Silva dos Santos (rodrigos-santos01) wrote :

webapp depends on the box with the user's email, it means that is strongly interface dependant. It should rely on the 'class' or 'id' attribute instead of a DOM tree. Everytime google change it's interface, everything stop to work.

My suggested fix is to change the line #146 to this:
gmaillogin = document.evaluate('//div[@class="gb_Q"]', document, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue.textContent;

and the line #153 to this:
gappslogin = document.evaluate('//span[@id="gbgs4dn"]', document, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue.textContent;

Tested here, it fix for both personal account and google apps. Don't know if this ID and Class will change, but is more reliable than the tree.