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