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
=== modified file 'GMail.user.js'
--- GMail.user.js 2013-06-18 04:58:58 +0000
+++ GMail.user.js 2013-09-24 07:47:29 +0000
@@ -29,7 +29,7 @@
29function getLabels() {29function getLabels() {
30 var i, res = [];30 var i, res = [];
3131
32 var snapshot = document.evaluate('//div[@role="navigation"]/div[2]/div/div/div[7]/div/*/div/div/div[2]/span/a',32 var snapshot = document.evaluate('//div[@role="navigation"]/div[2]//a[contains(@href, "#label")]',
33 document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);33 document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
3434
35 for (i = 0; i < snapshot.snapshotLength; i++) {35 for (i = 0; i < snapshot.snapshotLength; i++) {
@@ -44,15 +44,10 @@
44}44}
4545
46function checkMessagesCount() {46function checkMessagesCount() {
47 var tag = document.evaluate('//div/div[2]/div/div/div/div/div[@role="button"]/span', document, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue;
48
49 if (tag.textContent !== 'Gmail' && tag.textContent !== 'Mail') {
50 throw new Error();
51 }
5247
53 var indicators = [];48 var indicators = [];
5449
55 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;50 var inboxLink = document.evaluate('//div[@role="navigation"]/div[2]//a[contains(@href, "#inbox")]', document, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue;
5651
57 if (!inboxLink || !inboxLink.href || !inboxLink.text) {52 if (!inboxLink || !inboxLink.href || !inboxLink.text) {
58 return indicators;53 return indicators;

Subscribers

People subscribed via source and target branches

to all changes: