diff options
author | 2020-09-19 18:58:04 +0200 | |
---|---|---|
committer | 2020-09-19 17:58:04 +0100 | |
commit | 7c283c7608295c7c537a24b030dd54036fad61ac (patch) | |
tree | 23ee17a1391aeadf1446442e423e6c502f121f75 /uncompressed | |
parent | Add Nextcloud Calendar recipe (#264) (diff) | |
download | ferdium-recipes-7c283c7608295c7c537a24b030dd54036fad61ac.tar.gz ferdium-recipes-7c283c7608295c7c537a24b030dd54036fad61ac.tar.zst ferdium-recipes-7c283c7608295c7c537a24b030dd54036fad61ac.zip |
Fix notifications on muted messages for Telegram React (#197)
Diffstat (limited to 'uncompressed')
-rw-r--r-- | uncompressed/telegram-react/package.json | 2 | ||||
-rw-r--r-- | uncompressed/telegram-react/webview.js | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/uncompressed/telegram-react/package.json b/uncompressed/telegram-react/package.json index 8a00a5b..538b37a 100644 --- a/uncompressed/telegram-react/package.json +++ b/uncompressed/telegram-react/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "telegram-react", | 2 | "id": "telegram-react", |
3 | "name": "Telegram React", | 3 | "name": "Telegram React", |
4 | "version": "1.0.0", | 4 | "version": "1.0.1", |
5 | "description": "Telegram React", | 5 | "description": "Telegram React", |
6 | "main": "index.js", | 6 | "main": "index.js", |
7 | "author": "Amine Mouafik <amine@mouafik.fr>", | 7 | "author": "Amine Mouafik <amine@mouafik.fr>", |
diff --git a/uncompressed/telegram-react/webview.js b/uncompressed/telegram-react/webview.js index 1727953..223e914 100644 --- a/uncompressed/telegram-react/webview.js +++ b/uncompressed/telegram-react/webview.js | |||
@@ -5,11 +5,11 @@ const path = require("path"); | |||
5 | module.exports = Franz => { | 5 | module.exports = Franz => { |
6 | const getMessages = function getMessages() { | 6 | const getMessages = function getMessages() { |
7 | let count = 0; | 7 | let count = 0; |
8 | const elements = document.querySelectorAll(".dialog-badge-text"); | 8 | const elements = document.querySelectorAll(".dialog-badge:not(.dialog-badge-muted)"); |
9 | if (elements) { | 9 | if (elements) { |
10 | for (let i = 0; i < elements.length; i += 1) { | 10 | for (let i = 0; i < elements.length; i += 1) { |
11 | if (elements[i].innerHTML !== 0) { | 11 | if (elements[i].querySelector("span").innerHTML !== 0) { |
12 | count += parseInt(elements[i].innerHTML); | 12 | count += parseInt(elements[i].querySelector("span").innerHTML); |
13 | } | 13 | } |
14 | } | 14 | } |
15 | } | 15 | } |