diff options
Diffstat (limited to 'recipes/bip/webview.js')
-rw-r--r-- | recipes/bip/webview.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/recipes/bip/webview.js b/recipes/bip/webview.js index ea8fa5f..f3166ce 100644 --- a/recipes/bip/webview.js +++ b/recipes/bip/webview.js | |||
@@ -6,8 +6,8 @@ module.exports = Ferdi => { | |||
6 | const getMessages = () => { | 6 | const getMessages = () => { |
7 | const elements = document.querySelectorAll('.contact-list__message__unread-badge-counter'); | 7 | const elements = document.querySelectorAll('.contact-list__message__unread-badge-counter'); |
8 | let count = 0; | 8 | let count = 0; |
9 | for (let i = 0; i < elements.length; i++) { | 9 | for (const element of elements) { |
10 | count += Ferdi.safeParseInt(elements[i].textContent); | 10 | count += Ferdi.safeParseInt(element.textContent); |
11 | } | 11 | } |
12 | Ferdi.setBadge(count, 0); | 12 | Ferdi.setBadge(count, 0); |
13 | }; | 13 | }; |