Skip to content

Commit

Permalink
Add unread chats count to Zoho Mail's badge
Browse files Browse the repository at this point in the history
  • Loading branch information
eandersons committed Nov 24, 2023
1 parent f0ca02c commit ce35785
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion recipes/zoho/webview-unsafe.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// Wait for Ferdium to initialize
if (window.ferdium?.setBadge !== undefined) {
window.ferdium.setBadge(
window.ferdium.safeParseInt(window.zmfolAction?.getUnreadViewCount()),
window.ferdium.safeParseInt(window.zmfolAction?.getUnreadViewCount()) +
window.ferdium.safeParseInt(
document.querySelector('#wms_menu_unreadchats_cnt')?.textContent,
),
window.ferdium.safeParseInt(
window.zmTopBar?.topBandElements()?.notification?.children
?.notificationBadge?.textContent,
Expand Down

0 comments on commit ce35785

Please sign in to comment.