aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/chatwoot/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/chatwoot/webview.js')
-rw-r--r--recipes/chatwoot/webview.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/recipes/chatwoot/webview.js b/recipes/chatwoot/webview.js
index 05e33b3..d61b87f 100644
--- a/recipes/chatwoot/webview.js
+++ b/recipes/chatwoot/webview.js
@@ -1,14 +1,14 @@
1module.exports = (Ferdi) => { 1module.exports = (Ferdium) => {
2 const getMessages = function getMessages() { 2 const getMessages = function getMessages() {
3 const unreadBadges = document.querySelectorAll("span.unread"); 3 const unreadBadges = document.querySelectorAll("span.unread");
4 const unreadBadgesArray = [...unreadBadges]; 4 const unreadBadgesArray = [...unreadBadges];
5 const unreadMessagesCount = unreadBadgesArray.reduce( 5 const unreadMessagesCount = unreadBadgesArray.reduce(
6 (previousValue, currentBadge) => 6 (previousValue, currentBadge) =>
7 previousValue + Ferdi.safeParseInt(currentBadge.textContent), 7 previousValue + Ferdium.safeParseInt(currentBadge.textContent),
8 0, 8 0,
9 ); 9 );
10 Ferdi.setBadge(unreadMessagesCount); 10 Ferdium.setBadge(unreadMessagesCount);
11 }; 11 };
12 12
13 Ferdi.loop(getMessages); 13 Ferdium.loop(getMessages);
14}; 14};