diff options
Diffstat (limited to 'recipes/gmail')
-rw-r--r-- | recipes/gmail/package.json | 2 | ||||
-rw-r--r-- | recipes/gmail/webview.js | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/recipes/gmail/package.json b/recipes/gmail/package.json index 49fc89f..97029b4 100644 --- a/recipes/gmail/package.json +++ b/recipes/gmail/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "gmail", | 2 | "id": "gmail", |
3 | "name": "Gmail", | 3 | "name": "Gmail", |
4 | "version": "1.4.0", | 4 | "version": "1.4.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://mail.google.com" | 7 | "serviceURL": "https://mail.google.com" |
diff --git a/recipes/gmail/webview.js b/recipes/gmail/webview.js index 9a09c87..8c78bb6 100644 --- a/recipes/gmail/webview.js +++ b/recipes/gmail/webview.js | |||
@@ -13,10 +13,9 @@ module.exports = (Ferdi) => { | |||
13 | 13 | ||
14 | const inboxLinks = document.getElementsByClassName('J-Ke n0'); | 14 | const inboxLinks = document.getElementsByClassName('J-Ke n0'); |
15 | if (inboxLinks.length > 0) { | 15 | if (inboxLinks.length > 0) { |
16 | const inboxLink = inboxLinks[0]; | 16 | const unreadCounts = inboxLinks[0].parentNode.parentNode.getElementsByClassName('bsU'); |
17 | const unreadCounts = inboxLink.parentNode.parentNode.getElementsByClassName('bsU'); | ||
18 | if (unreadCounts.length > 0) { | 17 | if (unreadCounts.length > 0) { |
19 | count = parseInt(unreadCounts[0].innerHTML.trim(), 10); | 18 | count = Ferdi.safeParseInt(unreadCounts[0].innerHTML); |
20 | } | 19 | } |
21 | } | 20 | } |
22 | 21 | ||