diff options
author | 2020-04-28 16:13:32 +0700 | |
---|---|---|
committer | 2020-04-28 16:13:32 +0700 | |
commit | 6b7dd82f9393c942d7202e4b80d166ca375a7c08 (patch) | |
tree | ad60211e2c253aeb924b8d3d6f5ac8047322bd5e /uncompressed | |
parent | Repackage corrupted recipe archive (diff) | |
download | ferdium-recipes-6b7dd82f9393c942d7202e4b80d166ca375a7c08.tar.gz ferdium-recipes-6b7dd82f9393c942d7202e4b80d166ca375a7c08.tar.zst ferdium-recipes-6b7dd82f9393c942d7202e4b80d166ca375a7c08.zip |
[ZALO] Update getMessages
Diffstat (limited to 'uncompressed')
-rw-r--r-- | uncompressed/zalo/package.json | 2 | ||||
-rw-r--r-- | uncompressed/zalo/webview.js | 9 |
2 files changed, 4 insertions, 7 deletions
diff --git a/uncompressed/zalo/package.json b/uncompressed/zalo/package.json index 8e2417c..57c57ce 100644 --- a/uncompressed/zalo/package.json +++ b/uncompressed/zalo/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "zalo", | 2 | "id": "zalo", |
3 | "name": "Zalo", | 3 | "name": "Zalo", |
4 | "version": "1.0.0", | 4 | "version": "1.1.0", |
5 | "description": "Zalo", | 5 | "description": "Zalo", |
6 | "main": "index.js", | 6 | "main": "index.js", |
7 | "author": "RoiArthurB <arthurbrugiere01@gmail.com>", | 7 | "author": "RoiArthurB <arthurbrugiere01@gmail.com>", |
diff --git a/uncompressed/zalo/webview.js b/uncompressed/zalo/webview.js index e20c6b5..34ae4ac 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(unread); |
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 | }; |