aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/nextdoor/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/nextdoor/webview.js')
-rw-r--r--recipes/nextdoor/webview.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/recipes/nextdoor/webview.js b/recipes/nextdoor/webview.js
index 503d9a4..809e368 100644
--- a/recipes/nextdoor/webview.js
+++ b/recipes/nextdoor/webview.js
@@ -1,9 +1,11 @@
1module.exports = Ferdi => { 1module.exports = Ferdi => {
2 const getMessages = () => { 2 const getMessages = () => {
3 let unread = 0; 3 let unread = 0;
4 const notificationBadge = document.getElementsByClassName('notification-badge')[0]; 4 const notificationBadge = document.querySelectorAll(
5 '.notification-badge',
6 )[0];
5 if (notificationBadge != undefined) { 7 if (notificationBadge != undefined) {
6 unread = Ferdi.safeParseInt(notificationBadge.innerText); 8 unread = Ferdi.safeParseInt(notificationBadge.textContent);
7 } 9 }
8 Ferdi.setBadge(unread); 10 Ferdi.setBadge(unread);
9 }; 11 };