From c54f68806204cc38e4a987a36191f43a2a2ea746 Mon Sep 17 00:00:00 2001 From: Vulich Fernando <46904390+fvulich@users.noreply.github.com> Date: Fri, 24 Jul 2020 11:24:26 -0300 Subject: [PATCH] Element.io (new Riot.im) - Unread badge count doesn't work. fixes https://github.com/ramboxapp/community-edition/issues/2766 --- api/services.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/services.json b/api/services.json index 341c90cd..c63104a7 100644 --- a/api/services.json +++ b/api/services.json @@ -248,7 +248,7 @@ "type": "messaging", "allow_popups": false, "manual_notifications": false, - "js_unread": "function checkUnread(){var a=document.getElementsByClassName(\"mx_RoomTile_nameContainer\"),b=0;for(i=0;i=1?document.title=\"(\"+a+\") \"+originalTitle:document.title=originalTitle}var originalTitle=document.title;setInterval(checkUnread,1e3);", + "js_unread": "function checkUnread(){e=0,document.querySelectorAll(\".mx_RoomSublist2_stickable\").forEach(t=>t.querySelector(\".mx_NotificationBadge_count\")&&parseInt(t.querySelector(\".mx_NotificationBadge_count\").innerText)&&(e+=parseInt(t.querySelector(\".mx_NotificationBadge_count\").innerText))),updateBadge(e)}function updateBadge(e){e&&e>=1?rambox.setUnreadCount(e):rambox.clearUnreadCount()}setInterval(checkUnread,3e3);", "userAgent": "", "note": "", "titleBlink": false,