From 10a670fe33bd7fab841ddaf4674deb11477f2267 Mon Sep 17 00:00:00 2001 From: Stephen Papierski Date: Tue, 22 Sep 2020 16:34:03 -0600 Subject: Changed gmail getMessages to grab value next to Inbox (changes with inbox type) instead of total messages in the traditional inbox. --- recipes/gmail/webview.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'recipes') 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) => { if (location.hostname == 'www.google.com' && location.href.includes("gmail/about/")) { location.href = 'https://accounts.google.com/AccountChooser?service=mail&continue=https://mail.google.com/mail/'; } - + const getMessages = function getMessages() { let count = 0; - if (document.getElementsByClassName('J-Ke n0').length > 0) { - if (document.getElementsByClassName('J-Ke n0')[0].getAttribute('aria-label') != null) { - count = parseInt(document.getElementsByClassName('J-Ke n0')[0].getAttribute('aria-label').replace(/[^0-9.]/g, ''), 10); + if (document.getElementsByClassName('bsU').length > 0) { + if (document.getElementsByClassName('bsU')[0].innerHTML != null) { + count = parseInt(document.getElementsByClassName('bsU')[0].innerHTML.trim(), 10); } } -- cgit v1.2.3-70-g09d2 From 5d149a795b76c669ebe0bf2e70398f481d93791b Mon Sep 17 00:00:00 2001 From: Stephen Papierski Date: Thu, 24 Sep 2020 10:17:07 -0600 Subject: Bumping recipe version --- recipes/gmail/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'recipes') diff --git a/recipes/gmail/package.json b/recipes/gmail/package.json index 7e8c9ed..02aa3ab 100644 --- a/recipes/gmail/package.json +++ b/recipes/gmail/package.json @@ -1,7 +1,7 @@ { "id": "gmail", "name": "Gmail", - "version": "1.3.3", + "version": "1.3.4", "description": "Gmail", "main": "index.js", "author": "Stefan Malzner ", -- cgit v1.2.3-70-g09d2