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.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/recipes/nextdoor/webview.js b/recipes/nextdoor/webview.js
new file mode 100644
index 0000000..e20c6b5
--- /dev/null
+++ b/recipes/nextdoor/webview.js
@@ -0,0 +1,14 @@
1"use strict";
2
3module.exports = Franz => {
4 const getMessages = function getMessages() {
5 var unread = 0
6 const notificationBadge = document.getElementsByClassName('notification-badge')[0]
7 if (notificationBadge != undefined) {
8 unread = notificationBadge.innerText;
9 }
10 Franz.setBadge(parseInt(unread, 10));
11 };
12
13 Franz.loop(getMessages);
14}; \ No newline at end of file