diff options
author | Markus Hatvan <markus_hatvan@aon.at> | 2021-10-05 17:04:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-05 17:04:09 +0200 |
commit | d3841b766f9d37d557646003899f67525c5f755f (patch) | |
tree | 1bcab990c94f2b05678b7a83ffebe08298500f0b /recipes/thelounge/webview.js | |
parent | chore: repo maintenance (#732) (diff) | |
download | ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.tar.gz ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.tar.zst ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.zip |
chore: add eslint-plugin-unicorn (#733)
Diffstat (limited to 'recipes/thelounge/webview.js')
-rw-r--r-- | recipes/thelounge/webview.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/recipes/thelounge/webview.js b/recipes/thelounge/webview.js index 28f647c..b950e8a 100644 --- a/recipes/thelounge/webview.js +++ b/recipes/thelounge/webview.js | |||
@@ -1,10 +1,12 @@ | |||
1 | module.exports = Ferdi => { | 1 | module.exports = Ferdi => { |
2 | const getMessages = () => { | 2 | const getMessages = () => { |
3 | const indirectElements = document.querySelectorAll('.badge:not(.highlight)'); | 3 | const indirectElements = document.querySelectorAll( |
4 | '.badge:not(.highlight)', | ||
5 | ); | ||
4 | const direct = document.querySelectorAll('.badge.highlight').length; | 6 | const direct = document.querySelectorAll('.badge.highlight').length; |
5 | let indirect = 0; | 7 | let indirect = 0; |
6 | for (let i = 0; i < indirectElements.length; i += 1) { | 8 | for (const indirectElement of indirectElements) { |
7 | if (indirectElements[i].innerHTML.length > 0) { | 9 | if (indirectElement.textContent.length > 0) { |
8 | indirect++; | 10 | indirect++; |
9 | } | 11 | } |
10 | } | 12 | } |