aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/clubhouse/webview.js
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/clubhouse/webview.js')
-rw-r--r--recipes/clubhouse/webview.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/recipes/clubhouse/webview.js b/recipes/clubhouse/webview.js
new file mode 100644
index 0000000..51cd09d
--- /dev/null
+++ b/recipes/clubhouse/webview.js
@@ -0,0 +1,10 @@
1module.exports = (Ferdi) => {
2 function getMessages() {
3 const hasNotifications = document.querySelector('#notifications-link .badge').classList.contains('visible');
4 if (hasNotifications) {
5 Ferdi.setBadge(0, 1);
6 }
7 }
8
9 Ferdi.loop(getMessages);
10}