diff options
author | 2020-09-22 16:34:03 -0600 | |
---|---|---|
committer | 2020-09-22 16:34:03 -0600 | |
commit | 10a670fe33bd7fab841ddaf4674deb11477f2267 (patch) | |
tree | f0ab4db0085ecbba2f9939c0e861b9895fe43093 | |
parent | Unpack recipes and update recipes icons (#292) (diff) | |
download | ferdium-recipes-10a670fe33bd7fab841ddaf4674deb11477f2267.tar.gz ferdium-recipes-10a670fe33bd7fab841ddaf4674deb11477f2267.tar.zst ferdium-recipes-10a670fe33bd7fab841ddaf4674deb11477f2267.zip |
Changed gmail getMessages to grab value next to Inbox (changes with
inbox type) instead of total messages in the traditional inbox.
-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 | ||