diff options
Diffstat (limited to 'recipes/gmail')
-rw-r--r-- | recipes/gmail/package.json | 2 | ||||
-rw-r--r-- | recipes/gmail/webview.js | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/recipes/gmail/package.json b/recipes/gmail/package.json index 02aa3ab..2fd48d9 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.3.4", | 4 | "version": "1.3.5", |
5 | "description": "Gmail", | 5 | "description": "Gmail", |
6 | "main": "index.js", | 6 | "main": "index.js", |
7 | "author": "Stefan Malzner <stefan@adlk.io>", | 7 | "author": "Stefan Malzner <stefan@adlk.io>", |
diff --git a/recipes/gmail/webview.js b/recipes/gmail/webview.js index bc6e4a0..a2c712e 100644 --- a/recipes/gmail/webview.js +++ b/recipes/gmail/webview.js | |||
@@ -9,9 +9,12 @@ module.exports = (Franz) => { | |||
9 | const getMessages = function getMessages() { | 9 | const getMessages = function getMessages() { |
10 | let count = 0; | 10 | let count = 0; |
11 | 11 | ||
12 | if (document.getElementsByClassName('bsU').length > 0) { | 12 | const inboxLinks = document.getElementsByClassName('J-Ke n0'); |
13 | if (document.getElementsByClassName('bsU')[0].innerHTML != null) { | 13 | if (inboxLinks.length > 0) { |
14 | count = parseInt(document.getElementsByClassName('bsU')[0].innerHTML.trim(), 10); | 14 | const inboxLink = inboxLinks[0]; |
15 | const unreadCounts = inboxLink.parentNode.parentNode.getElementsByClassName('bsU'); | ||
16 | if (unreadCounts.length > 0) { | ||
17 | count = parseInt(unreadCounts[0].innerHTML.trim(), 10); | ||
15 | } | 18 | } |
16 | } | 19 | } |
17 | 20 | ||