From 37485190b18ccd01d01e2bfe68960b32d8ed357a Mon Sep 17 00:00:00 2001 From: deadmeu Date: Mon, 29 Nov 2021 01:58:16 +1100 Subject: Add RingCentral recipe (#776) --- recipes/proton-mail/webview.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'recipes/proton-mail/webview.js') diff --git a/recipes/proton-mail/webview.js b/recipes/proton-mail/webview.js index 89e5dab..455a0c4 100644 --- a/recipes/proton-mail/webview.js +++ b/recipes/proton-mail/webview.js @@ -2,10 +2,10 @@ module.exports = Ferdi => { const getMessages = () => { let unreadCount = 0; // Loop over all displayed counters and take the highest one (from the "All Mail" folder) - document.querySelectorAll('.navigation-counter-item').forEach(counterElement => { + for (const counterElement of document.querySelectorAll('.navigation-counter-item')) { const unreadCounter = Ferdi.safeParseInt(counterElement.textContent); unreadCount = Math.max(unreadCount, unreadCounter); - }); + } Ferdi.setBadge(unreadCount); }; -- cgit v1.2.3-70-g09d2