aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/nextdoor
diff options
context:
space:
mode:
authorLibravatar Markus Hatvan <markus_hatvan@aon.at>2021-10-05 17:04:09 +0200
committerLibravatar GitHub <noreply@github.com>2021-10-05 17:04:09 +0200
commitd3841b766f9d37d557646003899f67525c5f755f (patch)
tree1bcab990c94f2b05678b7a83ffebe08298500f0b /recipes/nextdoor
parentchore: repo maintenance (#732) (diff)
downloadferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.tar.gz
ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.tar.zst
ferdium-recipes-d3841b766f9d37d557646003899f67525c5f755f.zip
chore: add eslint-plugin-unicorn (#733)
Diffstat (limited to 'recipes/nextdoor')
-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 };