diff options
-rw-r--r-- | recipes/gmail/webview.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/recipes/gmail/webview.js b/recipes/gmail/webview.js index 95d28e7..bc6e4a0 100644 --- a/recipes/gmail/webview.js +++ b/recipes/gmail/webview.js | |||
@@ -5,13 +5,13 @@ module.exports = (Franz) => { | |||
5 | if (location.hostname == 'www.google.com' && location.href.includes("gmail/about/")) { | 5 | if (location.hostname == 'www.google.com' && location.href.includes("gmail/about/")) { |
6 | location.href = 'https://accounts.google.com/AccountChooser?service=mail&continue=https://mail.google.com/mail/'; | 6 | location.href = 'https://accounts.google.com/AccountChooser?service=mail&continue=https://mail.google.com/mail/'; |
7 | } | 7 | } |
8 | 8 | ||
9 | const getMessages = function getMessages() { | 9 | const getMessages = function getMessages() { |
10 | let count = 0; | 10 | let count = 0; |
11 | 11 | ||
12 | if (document.getElementsByClassName('J-Ke n0').length > 0) { | 12 | if (document.getElementsByClassName('bsU').length > 0) { |
13 | if (document.getElementsByClassName('J-Ke n0')[0].getAttribute('aria-label') != null) { | 13 | if (document.getElementsByClassName('bsU')[0].innerHTML != null) { |
14 | count = parseInt(document.getElementsByClassName('J-Ke n0')[0].getAttribute('aria-label').replace(/[^0-9.]/g, ''), 10); | 14 | count = parseInt(document.getElementsByClassName('bsU')[0].innerHTML.trim(), 10); |
15 | } | 15 | } |
16 | } | 16 | } |
17 | 17 | ||