blob: e4026c5801f404ecb80f672d145ac9937f892eab (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
//wait for Ferdi and Zoho Mail to initialize
if (
Object.prototype.hasOwnProperty.call(window, "ferdi") &&
Object.prototype.hasOwnProperty.call(window.ferdi, "setBadge") &&
Object.prototype.hasOwnProperty.call(window, "zmNCenter") &&
Object.prototype.hasOwnProperty.call(window, "zmfolAction")
) {
var unreadNotifications = window.zmNCenter.counter.count(); //General Notifications by Zoho (Bell Icon)
var unreadMail = window.zmfolAction.getUnreadViewCount(); //Unread messages count
window.ferdi.setBadge(unreadMail, unreadNotifications);
}
|