diff options
author | 2021-08-31 16:25:57 +0530 | |
---|---|---|
committer | 2021-08-31 16:25:57 +0530 | |
commit | dfae2d231e39c81827d08fd8834d736c5b3005b1 (patch) | |
tree | 5037b401e7de837fdd6046a3c61ac76aed240e6e /recipes/thelounge/webview.js | |
parent | New recipe: odoo (diff) | |
download | ferdium-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/webview.js')
-rw-r--r-- | recipes/thelounge/webview.js | 5 |
1 files changed, 3 insertions, 2 deletions
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 | ||