Merge lp:~justinmcp/unity-webapps-gmail/bug-1069576 into lp:unity-webapps-gmail

Proposed by Justin McPherson
Status: Merged
Approved by: Robert Bruce Park
Approved revision: 72
Merged at revision: 76
Proposed branch: lp:~justinmcp/unity-webapps-gmail/bug-1069576
Merge into: lp:unity-webapps-gmail
Diff against target: 29 lines (+2/-7)
1 file modified
GMail.user.js (+2/-7)
To merge this branch: bzr merge lp:~justinmcp/unity-webapps-gmail/bug-1069576
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Alexandre Abreu (community) Approve
Review via email: mp+187156@code.launchpad.net

Description of the change

The test for a Gmail or mail title was removed.

- The text is not always exactly equal to this.
- When this function is called, its already determined that this page is Gmail.

To post a comment you must log in.
Revision history for this message
Alexandre Abreu (abreu-alexandre) wrote :

lgtm

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

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-06-18 04:58:58 +0000
3+++ GMail.user.js 2013-09-24 07:47:29 +0000
4@@ -29,7 +29,7 @@
5 function getLabels() {
6 var i, res = [];
7
8- var snapshot = document.evaluate('//div[@role="navigation"]/div[2]/div/div/div[7]/div/*/div/div/div[2]/span/a',
9+ var snapshot = document.evaluate('//div[@role="navigation"]/div[2]//a[contains(@href, "#label")]',
10 document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
11
12 for (i = 0; i < snapshot.snapshotLength; i++) {
13@@ -44,15 +44,10 @@
14 }
15
16 function checkMessagesCount() {
17- var tag = document.evaluate('//div/div[2]/div/div/div/div/div[@role="button"]/span', document, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue;
18-
19- if (tag.textContent !== 'Gmail' && tag.textContent !== 'Mail') {
20- throw new Error();
21- }
22
23 var indicators = [];
24
25- var inboxLink = document.evaluate('//div[@role="navigation"]/div/div/div/div/div/div/div/div/div/span/a', document, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue;
26+ var inboxLink = document.evaluate('//div[@role="navigation"]/div[2]//a[contains(@href, "#inbox")]', document, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue;
27
28 if (!inboxLink || !inboxLink.href || !inboxLink.text) {
29 return indicators;

Subscribers

People subscribed via source and target branches

to all changes: