aboutsummaryrefslogtreecommitdiffstats
path: root/recipes
diff options
context:
space:
mode:
authorLibravatar Bennett <hello@vantezzen.io>2020-09-26 12:27:54 +0200
committerLibravatar GitHub <noreply@github.com>2020-09-26 12:27:54 +0200
commit7e76dc94a30f8ec12c93a957279c6a31d18b9e0d (patch)
treefc64d3d68fb97ece8606ae5284815a3e41288a3f /recipes
parentRemove getDisplayMedia patches from recipes (diff)
parentBumping recipe version (diff)
downloadferdium-recipes-7e76dc94a30f8ec12c93a957279c6a31d18b9e0d.tar.gz
ferdium-recipes-7e76dc94a30f8ec12c93a957279c6a31d18b9e0d.tar.zst
ferdium-recipes-7e76dc94a30f8ec12c93a957279c6a31d18b9e0d.zip
Merge pull request #301 from stephenpapierski/master
Gmail getMessages produces wrong value
Diffstat (limited to 'recipes')
-rw-r--r--recipes/gmail/package.json2
-rw-r--r--recipes/gmail/webview.js8
2 files changed, 5 insertions, 5 deletions
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 @@
1{ 1{
2 "id": "gmail", 2 "id": "gmail",
3 "name": "Gmail", 3 "name": "Gmail",
4 "version": "1.3.3", 4 "version": "1.3.4",
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 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