aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/bip
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2021-08-31 16:25:57 +0530
committerLibravatar Vijay A <avijayr@protonmail.com>2021-08-31 16:25:57 +0530
commitdfae2d231e39c81827d08fd8834d736c5b3005b1 (patch)
tree5037b401e7de837fdd6046a3c61ac76aed240e6e /recipes/bip
parentNew recipe: odoo (diff)
downloadferdium-recipes-dfae2d231e39c81827d08fd8834d736c5b3005b1.tar.gz
ferdium-recipes-dfae2d231e39c81827d08fd8834d736c5b3005b1.tar.zst
ferdium-recipes-dfae2d231e39c81827d08fd8834d736c5b3005b1.zip
refactor: Use Ferdi.safeParseInt to ensure that parsing is done consistently in all recipes.
Diffstat (limited to 'recipes/bip')
-rw-r--r--recipes/bip/package.json2
-rw-r--r--recipes/bip/webview.js3
2 files changed, 2 insertions, 3 deletions
diff --git a/recipes/bip/package.json b/recipes/bip/package.json
index 8898d1d..3bc6898 100644
--- a/recipes/bip/package.json
+++ b/recipes/bip/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "bip", 2 "id": "bip",
3 "name": "BiP", 3 "name": "BiP",
4 "version": "1.1.0", 4 "version": "1.1.1",
5 "license": "MIT", 5 "license": "MIT",
6 "config": { 6 "config": {
7 "serviceURL": "https://web.bip.com/", 7 "serviceURL": "https://web.bip.com/",
diff --git a/recipes/bip/webview.js b/recipes/bip/webview.js
index 87a7c0a..89668d7 100644
--- a/recipes/bip/webview.js
+++ b/recipes/bip/webview.js
@@ -7,8 +7,7 @@ module.exports = Ferdi => {
7 const elements = document.querySelectorAll('.contact-list__message__unread-badge-counter'); 7 const elements = document.querySelectorAll('.contact-list__message__unread-badge-counter');
8 let count = 0; 8 let count = 0;
9 for (let i = 0; i < elements.length; i++) { 9 for (let i = 0; i < elements.length; i++) {
10 const countValue = parseInt(elements[i].textContent || '0', 10); 10 count += Ferdi.safeParseInt(elements[i].textContent);
11 count += countValue;
12 } 11 }
13 Ferdi.setBadge(count, 0); 12 Ferdi.setBadge(count, 0);
14 }; 13 };