diff options
author | Bennett <hello@vantezzen.io> | 2020-04-15 19:20:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-15 19:20:41 +0200 |
commit | 125802069233d0100590bdf94afdad79eee4120e (patch) | |
tree | fb1fce956ac3ec1d036c1d8293cd16b53b0a8188 /uncompressed/zalo/webview.js | |
parent | #93 Update Zulip (diff) | |
parent | [ZALO] Resize icons (diff) | |
download | ferdium-recipes-125802069233d0100590bdf94afdad79eee4120e.tar.gz ferdium-recipes-125802069233d0100590bdf94afdad79eee4120e.tar.zst ferdium-recipes-125802069233d0100590bdf94afdad79eee4120e.zip |
Merge pull request #103 from RoiArthurB/master
Add new Zalo recipe
Diffstat (limited to 'uncompressed/zalo/webview.js')
-rw-r--r-- | uncompressed/zalo/webview.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/uncompressed/zalo/webview.js b/uncompressed/zalo/webview.js new file mode 100644 index 0000000..e20c6b5 --- /dev/null +++ b/uncompressed/zalo/webview.js | |||
@@ -0,0 +1,14 @@ | |||
1 | "use strict"; | ||
2 | |||
3 | module.exports = Franz => { | ||
4 | const getMessages = function getMessages() { | ||
5 | var unread = 0 | ||
6 | const notificationBadge = document.getElementsByClassName('notification-badge')[0] | ||
7 | if (notificationBadge != undefined) { | ||
8 | unread = notificationBadge.innerText; | ||
9 | } | ||
10 | Franz.setBadge(parseInt(unread, 10)); | ||
11 | }; | ||
12 | |||
13 | Franz.loop(getMessages); | ||
14 | }; \ No newline at end of file | ||