diff options
Diffstat (limited to 'recipes/gitter')
-rw-r--r-- | recipes/gitter/webview.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/recipes/gitter/webview.js b/recipes/gitter/webview.js index 17cbca9..d10eb2f 100644 --- a/recipes/gitter/webview.js +++ b/recipes/gitter/webview.js | |||
@@ -11,7 +11,10 @@ function _interopRequireDefault(obj) { | |||
11 | module.exports = Franz => { | 11 | module.exports = Franz => { |
12 | const getMessages = function getMessages() { | 12 | const getMessages = function getMessages() { |
13 | // get unread messages | 13 | // get unread messages |
14 | const count = document.querySelectorAll('.guilds-wrapper .badge, .room-menu-options__item__unread-indicator-wrapper.has-unreads').length; | 14 | let count = 0; |
15 | document.querySelectorAll("div.unread-indicator").forEach((node) => { | ||
16 | count += Number(node.innerText); | ||
17 | }); | ||
15 | 18 | ||
16 | // set Franz badge | 19 | // set Franz badge |
17 | Franz.setBadge(count); | 20 | Franz.setBadge(count); |