aboutsummaryrefslogtreecommitdiffstats
path: root/recipes
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2021-05-11 23:38:55 +0530
committerLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-05-12 05:27:29 +0530
commite18412994603605d0c3b63bcb83b906b4dd4134d (patch)
tree325d1a25049f7b0da142ad3cfeaf74142c96752a /recipes
parentUse new icons for gmail (#492) (diff)
downloadferdium-recipes-e18412994603605d0c3b63bcb83b906b4dd4134d.tar.gz
ferdium-recipes-e18412994603605d0c3b63bcb83b906b4dd4134d.tar.zst
ferdium-recipes-e18412994603605d0c3b63bcb83b906b4dd4134d.zip
Fixing counts for gitter badge.
Diffstat (limited to 'recipes')
-rw-r--r--recipes/gitter/webview.js5
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) {
11module.exports = Franz => { 11module.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);