Merge lp:~abreu-alexandre/unity-webapps-gmail/fix-login-when-inwebappcontainer-mode into lp:unity-webapps-gmail

Proposed by Alexandre Abreu
Status: Merged
Approved by: Robert Bruce Park
Approved revision: 77
Merged at revision: 79
Proposed branch: lp:~abreu-alexandre/unity-webapps-gmail/fix-login-when-inwebappcontainer-mode
Merge into: lp:unity-webapps-gmail
Diff against target: 18 lines (+8/-0)
1 file modified
GMail.user.js (+8/-0)
To merge this branch: bzr merge lp:~abreu-alexandre/unity-webapps-gmail/fix-login-when-inwebappcontainer-mode
Reviewer Review Type Date Requested Status
Robert Bruce Park (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+187532@code.launchpad.net

Commit message

Fix login when running in webapp container mode

Description of the change

Fix login when running in webapp container mode

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Robert Bruce Park (robru) wrote :

Looks like you need to appease the jslint gods before this can go in ;-)

77. By Alexandre Abreu

fix jslint errors

Revision history for this message
Alexandre Abreu (abreu-alexandre) wrote :

> Looks like you need to appease the jslint gods before this can go in ;-)

done!

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Robert Bruce Park (robru) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'GMail.user.js'
2--- GMail.user.js 2013-09-24 07:38:46 +0000
3+++ GMail.user.js 2013-10-24 16:50:22 +0000
4@@ -154,6 +154,14 @@
5 } catch (gapps_err) {
6 gappslogin = "";
7 }
8+
9+ // in the webapp container (qtwebkit based) we get served something specific
10+ try {
11+ if (!gappslogin && !gmaillogin) {
12+ gmaillogin = document.evaluate('//div[@role="navigation"]/div/div[1]/div[2]/ol/li[1]/div/div/div[1]/div/span[2]', document, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue.textContent;
13+ }
14+ } catch (err) {}
15+
16 var login = gmaillogin.indexOf("@") !== -1 ? gmaillogin : gappslogin.indexOf("@") !== -1 ? gappslogin : "";
17
18 Unity.init({ name: "GMail",

Subscribers

People subscribed via source and target branches

to all changes: