From d3841b766f9d37d557646003899f67525c5f755f Mon Sep 17 00:00:00 2001 From: Markus Hatvan Date: Tue, 5 Oct 2021 17:04:09 +0200 Subject: chore: add eslint-plugin-unicorn (#733) --- recipes/thelounge/webview.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'recipes/thelounge/webview.js') 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 @@ module.exports = Ferdi => { const getMessages = () => { - const indirectElements = document.querySelectorAll('.badge:not(.highlight)'); + const indirectElements = document.querySelectorAll( + '.badge:not(.highlight)', + ); const direct = document.querySelectorAll('.badge.highlight').length; let indirect = 0; - for (let i = 0; i < indirectElements.length; i += 1) { - if (indirectElements[i].innerHTML.length > 0) { + for (const indirectElement of indirectElements) { + if (indirectElement.textContent.length > 0) { indirect++; } } -- cgit v1.2.3-70-g09d2