aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/hubstaff/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/hubstaff/webview.js')
-rw-r--r--recipes/hubstaff/webview.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/recipes/hubstaff/webview.js b/recipes/hubstaff/webview.js
index 408f78c..c925f18 100644
--- a/recipes/hubstaff/webview.js
+++ b/recipes/hubstaff/webview.js
@@ -1,4 +1,4 @@
1module.exports = (Ferdi) => { 1module.exports = (Ferdium) => {
2 // TODO: If your hubstaff service has unread messages, uncomment these lines to implement the logic for updating the badges 2 // TODO: If your hubstaff service has unread messages, uncomment these lines to implement the logic for updating the badges
3 const getMessages = () => { 3 const getMessages = () => {
4 // TODO: Insert your notification-finding code here 4 // TODO: Insert your notification-finding code here
@@ -6,10 +6,10 @@ module.exports = (Ferdi) => {
6 let indirectMessages = 0; 6 let indirectMessages = 0;
7 const notificationContainers = document.querySelectorAll('.notifications-number'); 7 const notificationContainers = document.querySelectorAll('.notifications-number');
8 if (notificationContainers){ 8 if (notificationContainers){
9 directMessages = Ferdi.safeParseInt(notificationContainers[0].textContent); 9 directMessages = Ferdium.safeParseInt(notificationContainers[0].textContent);
10 indirectMessages = Ferdi.safeParseInt(notificationContainers[1].textContent); 10 indirectMessages = Ferdium.safeParseInt(notificationContainers[1].textContent);
11 } 11 }
12 Ferdi.setBadge(directMessages, indirectMessages); 12 Ferdium.setBadge(directMessages, indirectMessages);
13 }; 13 };
14 Ferdi.loop(getMessages); 14 Ferdium.loop(getMessages);
15}; 15};