diff options
author | vantezzen <hello@vantezzen.io> | 2020-05-10 10:41:58 +0200 |
---|---|---|
committer | vantezzen <hello@vantezzen.io> | 2020-05-10 10:41:58 +0200 |
commit | d927902163200b9ab30f27a9d7919abf0811c727 (patch) | |
tree | 237c8b657811d30f014aca8b414319d5eef17e74 /uncompressed/zalo/webview.js | |
parent | Add create script (diff) | |
parent | Merge pull request #153 from dnlnrs/master (diff) | |
download | ferdium-recipes-d927902163200b9ab30f27a9d7919abf0811c727.tar.gz ferdium-recipes-d927902163200b9ab30f27a9d7919abf0811c727.tar.zst ferdium-recipes-d927902163200b9ab30f27a9d7919abf0811c727.zip |
Merge branch 'master' of https://github.com/getferdi/recipes
Diffstat (limited to 'uncompressed/zalo/webview.js')
-rw-r--r-- | uncompressed/zalo/webview.js | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/uncompressed/zalo/webview.js b/uncompressed/zalo/webview.js index e20c6b5..0f360c3 100644 --- a/uncompressed/zalo/webview.js +++ b/uncompressed/zalo/webview.js | |||
@@ -3,12 +3,9 @@ | |||
3 | module.exports = Franz => { | 3 | module.exports = Franz => { |
4 | const getMessages = function getMessages() { | 4 | const getMessages = function getMessages() { |
5 | var unread = 0 | 5 | var unread = 0 |
6 | const notificationBadge = document.getElementsByClassName('notification-badge')[0] | 6 | const notificationBadge = document.getElementsByClassName('tab-red-dot').length; |
7 | if (notificationBadge != undefined) { | 7 | Franz.setBadge(notificationBadge); |
8 | unread = notificationBadge.innerText; | ||
9 | } | ||
10 | Franz.setBadge(parseInt(unread, 10)); | ||
11 | }; | 8 | }; |
12 | 9 | ||
13 | Franz.loop(getMessages); | 10 | Franz.loop(getMessages); |
14 | }; \ No newline at end of file | 11 | }; |