aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/thelounge/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/thelounge/webview.js')
-rw-r--r--recipes/thelounge/webview.js8
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 @@
1module.exports = Ferdi => { 1module.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 }