aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/thelounge
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/thelounge
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/thelounge')
-rw-r--r--recipes/thelounge/package.json2
-rw-r--r--recipes/thelounge/webview.js5
2 files changed, 4 insertions, 3 deletions
diff --git a/recipes/thelounge/package.json b/recipes/thelounge/package.json
index 816a4b1..a954b43 100644
--- a/recipes/thelounge/package.json
+++ b/recipes/thelounge/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "thelounge", 2 "id": "thelounge",
3 "name": "The Lounge", 3 "name": "The Lounge",
4 "version": "1.1.0", 4 "version": "1.1.1",
5 "license": "MIT", 5 "license": "MIT",
6 "config": { 6 "config": {
7 "hasCustomUrl": true, 7 "hasCustomUrl": true,
diff --git a/recipes/thelounge/webview.js b/recipes/thelounge/webview.js
index e993264..7174749 100644
--- a/recipes/thelounge/webview.js
+++ b/recipes/thelounge/webview.js
@@ -4,9 +4,10 @@ module.exports = Ferdi => {
4 const direct = document.querySelectorAll('.badge.highlight').length; 4 const direct = document.querySelectorAll('.badge.highlight').length;
5 let indirect = 0; 5 let indirect = 0;
6 for (let i = 0; i < indirectElements.length; i += 1) { 6 for (let i = 0; i < indirectElements.length; i += 1) {
7 if (indirectElements[i].innerHTML.length > 0) indirect++; 7 if (indirectElements[i].innerHTML.length > 0) {
8 indirect++;
9 }
8 } 10 }
9 console.log(direct, indirect);
10 Ferdi.setBadge(direct, indirect); 11 Ferdi.setBadge(direct, indirect);
11 }; 12 };
12 13