diff options
Diffstat (limited to 'recipes/zoho/webview-unsafe.js')
-rw-r--r-- | recipes/zoho/webview-unsafe.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/recipes/zoho/webview-unsafe.js b/recipes/zoho/webview-unsafe.js new file mode 100644 index 0000000..e4026c5 --- /dev/null +++ b/recipes/zoho/webview-unsafe.js | |||
@@ -0,0 +1,12 @@ | |||
1 | //wait for Ferdi and Zoho Mail to initialize | ||
2 | if ( | ||
3 | Object.prototype.hasOwnProperty.call(window, "ferdi") && | ||
4 | Object.prototype.hasOwnProperty.call(window.ferdi, "setBadge") && | ||
5 | Object.prototype.hasOwnProperty.call(window, "zmNCenter") && | ||
6 | Object.prototype.hasOwnProperty.call(window, "zmfolAction") | ||
7 | ) { | ||
8 | var unreadNotifications = window.zmNCenter.counter.count(); //General Notifications by Zoho (Bell Icon) | ||
9 | var unreadMail = window.zmfolAction.getUnreadViewCount(); //Unread messages count | ||
10 | |||
11 | window.ferdi.setBadge(unreadMail, unreadNotifications); | ||
12 | } \ No newline at end of file | ||