aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/stride/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/stride/webview.js')
-rw-r--r--recipes/stride/webview.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/recipes/stride/webview.js b/recipes/stride/webview.js
index 6b62e08..002fca5 100644
--- a/recipes/stride/webview.js
+++ b/recipes/stride/webview.js
@@ -10,7 +10,7 @@ module.exports = Ferdi => {
10 let indirectCount = 0; 10 let indirectCount = 0;
11 11
12 // get unread direct messages by tring to read the badge values 12 // get unread direct messages by tring to read the badge values
13 allBadges.forEach(item => { 13 for (const item of allBadges) {
14 if (item.hasAttribute('data-count')) { 14 if (item.hasAttribute('data-count')) {
15 // Count for DMs should be in the data-count attribute 15 // Count for DMs should be in the data-count attribute
16 directCount += Math.max(1, +item.getAttribute('data-count')); 16 directCount += Math.max(1, +item.getAttribute('data-count'));
@@ -18,7 +18,7 @@ module.exports = Ferdi => {
18 // this will be the case for indirect messages 18 // this will be the case for indirect messages
19 indirectCount++; 19 indirectCount++;
20 } 20 }
21 }); 21 }
22 22
23 // set Ferdi badge 23 // set Ferdi badge
24 Ferdi.setBadge(directCount, indirectCount); 24 Ferdi.setBadge(directCount, indirectCount);