diff --git a/api/services.json b/api/services.json index 54624e00..855a588f 100644 --- a/api/services.json +++ b/api/services.json @@ -1163,7 +1163,7 @@ "type": "messaging", "allow_popups": false, "manual_notifications": false, - "js_unread": "function checkUnread(){if(-1!==location.host.indexOf(\"slack.com\")){var e=document.querySelectorAll(\".p-channel_sidebar__channel--unread:not(.p-channel_sidebar__channel--muted)\").length,n=0;document.querySelectorAll(\".p-channel_sidebar__badge\").forEach(e=>{n+=isNaN(parseInt(e.innerHTML))?0:parseInt(e.innerHTML)}),updateBadge(e,n)}}function updateBadge(e,n){var a=0{n+=isNaN(parseInt(e.innerHTML))?0:parseInt(e.innerHTML)}),updateBadge(e,n)}}function updateBadge(e,n){var o=0=1?rambox.setUnreadCount(e):rambox.clearUnreadCount()}setInterval(checkUnread,3e3);", + "js_unread": "function checkUnread(){let e=0;document.querySelectorAll(\"#main-nav .badge\").forEach(n=>{parseInt(n.innerText)&&(e+=parseInt(n.innerText))}),updateBadge(e)}function updateBadge(e){e&&e>=1?rambox.setUnreadCount(e):rambox.clearUnreadCount()}setInterval(checkUnread,3e3);", "userAgent": "", "note": "", "titleBlink": false, @@ -1628,7 +1628,7 @@ "type": "messaging", "allow_popups": false, "manual_notifications": false, - "js_unread": "NotifyByTitle.show = function(){};NotifyByTitle.start = function(){};NotifyByTitle.stop = function(){};function checkUnread(){var t=0;$(\".msgnotify\").each(function() { t += isNaN(parseInt($(this).html())) ? 0 : parseInt(parseInt($(this).html())) });updateBadge(t)}function updateBadge(a){a>=1?rambox.setUnreadCount(a):rambox.clearUnreadCount()}setInterval(checkUnread,3e3);", + "js_unread": "function checkUnread(){const e=document.getElementsByClassName(\"LHS-count\");let n=0;for(let t of e)\"totalunreadcount\"===t.id&&parseInt(t.innerText)&&(n+=parseInt(t.innerText));updateBadge(n)}function updateBadge(e){e&&e>=1?rambox.setUnreadCount(e):rambox.clearUnreadCount()}setInterval(checkUnread,3e3);", "userAgent": "", "note": "", "titleBlink": false,