diff options
Diffstat (limited to 'recipes/zoho')
-rw-r--r-- | recipes/zoho/package.json | 2 | ||||
-rw-r--r-- | recipes/zoho/webview-unsafe.js | 23 |
2 files changed, 13 insertions, 12 deletions
diff --git a/recipes/zoho/package.json b/recipes/zoho/package.json index b1444d7..c393fe5 100644 --- a/recipes/zoho/package.json +++ b/recipes/zoho/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "zoho", | 2 | "id": "zoho", |
3 | "name": "Zoho Mail", | 3 | "name": "Zoho Mail", |
4 | "version": "1.4.0", | 4 | "version": "1.4.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://www.zoho.com/mail/login.html", | 7 | "serviceURL": "https://www.zoho.com/mail/login.html", |
diff --git a/recipes/zoho/webview-unsafe.js b/recipes/zoho/webview-unsafe.js index df5237b..077e8f8 100644 --- a/recipes/zoho/webview-unsafe.js +++ b/recipes/zoho/webview-unsafe.js | |||
@@ -1,12 +1,13 @@ | |||
1 | // wait for Ferdium and Zoho Mail to initialize | 1 | // Wait for Ferdium to initialize |
2 | if ( | 2 | if (window.ferdium?.setBadge !== undefined) { |
3 | Object.prototype.hasOwnProperty.call(window, 'ferdium') && | 3 | window.ferdium.setBadge( |
4 | Object.prototype.hasOwnProperty.call(window.ferdium, 'setBadge') && | 4 | window.ferdium.safeParseInt(window.zmfolAction?.getUnreadViewCount()) + |
5 | Object.prototype.hasOwnProperty.call(window, 'zmNCenter') && | 5 | window.ferdium.safeParseInt( |
6 | Object.prototype.hasOwnProperty.call(window, 'zmfolAction') | 6 | document.querySelector('#wms_menu_unreadchats_cnt')?.textContent, |
7 | ) { | 7 | ), |
8 | const unreadNotifications = window.zmNCenter.counter.count(); // General Notifications by Zoho (Bell Icon) | 8 | window.ferdium.safeParseInt( |
9 | const unreadMail = window.zmfolAction.getUnreadViewCount(); // Unread messages count | 9 | window.zmTopBar?.topBandElements()?.notification?.children |
10 | 10 | ?.notificationBadge?.textContent, | |
11 | window.ferdium.setBadge(unreadMail, unreadNotifications); | 11 | ), |
12 | ); | ||
12 | } | 13 | } |