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/stackoverflow/webview.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'recipes/stackoverflow/webview.js') diff --git a/recipes/stackoverflow/webview.js b/recipes/stackoverflow/webview.js index 437fb49..83fd5dd 100644 --- a/recipes/stackoverflow/webview.js +++ b/recipes/stackoverflow/webview.js @@ -6,8 +6,8 @@ module.exports = (Ferdi) => { const getMessages = () => { const elements = document.querySelectorAll('.CxUIE, .unread'); let count = 0; - for (let i = 0; i < elements.length; i += 1) { - if (elements[i].querySelectorAll('*[data-icon="muted"]').length === 0) { + for (const element of elements) { + if (element.querySelectorAll('*[data-icon="muted"]').length === 0) { count += 1; } } -- cgit v1.2.3-70-g09d2