diff options
author | 2021-08-17 10:47:32 +0530 | |
---|---|---|
committer | 2021-08-17 10:47:32 +0530 | |
commit | 212d5846427ceeacfadf5aac3f381b532f4664a1 (patch) | |
tree | 7badcbb01930e77a2b2745e189e89323111ef470 /recipes/whatsapp | |
parent | Moved all npm packages to the 'devDependencies' since there is no node-runtim... (diff) | |
download | ferdium-recipes-212d5846427ceeacfadf5aac3f381b532f4664a1.tar.gz ferdium-recipes-212d5846427ceeacfadf5aac3f381b532f4664a1.tar.zst ferdium-recipes-212d5846427ceeacfadf5aac3f381b532f4664a1.zip |
Cleanup of recipes to remove 'NaN' of badge variables since this is handled in the main program.
Diffstat (limited to 'recipes/whatsapp')
-rw-r--r-- | recipes/whatsapp/package.json | 2 | ||||
-rw-r--r-- | recipes/whatsapp/webview.js | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/recipes/whatsapp/package.json b/recipes/whatsapp/package.json index e05d9f6..a2f0bce 100644 --- a/recipes/whatsapp/package.json +++ b/recipes/whatsapp/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "whatsapp", | 2 | "id": "whatsapp", |
3 | "name": "WhatsApp", | 3 | "name": "WhatsApp", |
4 | "version": "3.1.0", | 4 | "version": "3.1.1", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "config": { | 6 | "config": { |
7 | "serviceURL": "https://web.whatsapp.com", | 7 | "serviceURL": "https://web.whatsapp.com", |
diff --git a/recipes/whatsapp/webview.js b/recipes/whatsapp/webview.js index c01b7d1..9050832 100644 --- a/recipes/whatsapp/webview.js +++ b/recipes/whatsapp/webview.js | |||
@@ -27,7 +27,7 @@ window.addEventListener('beforeunload', async () => { | |||
27 | module.exports = Franz => { | 27 | module.exports = Franz => { |
28 | const getMessages = function getMessages() { | 28 | const getMessages = function getMessages() { |
29 | let count = 0; | 29 | let count = 0; |
30 | let indirectCount = 0; | 30 | let indirectCount = 0; |
31 | 31 | ||
32 | const parentChatElem = document.querySelector('#pane-side').children[0].children[0].children[0]; | 32 | const parentChatElem = document.querySelector('#pane-side').children[0].children[0].children[0]; |
33 | const chatElems = parentChatElem.children; | 33 | const chatElems = parentChatElem.children; |
@@ -41,7 +41,7 @@ module.exports = Franz => { | |||
41 | count += countValue; | 41 | count += countValue; |
42 | } else { | 42 | } else { |
43 | indirectCount += countValue; | 43 | indirectCount += countValue; |
44 | } | 44 | } |
45 | } | 45 | } |
46 | 46 | ||
47 | Franz.setBadge(count, indirectCount); | 47 | Franz.setBadge(count, indirectCount); |