aboutsummaryrefslogtreecommitdiffstats
path: root/uncompressed/clubhouse/webview.js
diff options
context:
space:
mode:
authorLibravatar vantezzen <hello@vantezzen.io>2020-05-10 10:41:58 +0200
committerLibravatar vantezzen <hello@vantezzen.io>2020-05-10 10:41:58 +0200
commitd927902163200b9ab30f27a9d7919abf0811c727 (patch)
tree237c8b657811d30f014aca8b414319d5eef17e74 /uncompressed/clubhouse/webview.js
parentAdd create script (diff)
parentMerge pull request #153 from dnlnrs/master (diff)
downloadferdium-recipes-d927902163200b9ab30f27a9d7919abf0811c727.tar.gz
ferdium-recipes-d927902163200b9ab30f27a9d7919abf0811c727.tar.zst
ferdium-recipes-d927902163200b9ab30f27a9d7919abf0811c727.zip
Merge branch 'master' of https://github.com/getferdi/recipes
Diffstat (limited to 'uncompressed/clubhouse/webview.js')
-rw-r--r--uncompressed/clubhouse/webview.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/uncompressed/clubhouse/webview.js b/uncompressed/clubhouse/webview.js
new file mode 100644
index 0000000..51cd09d
--- /dev/null
+++ b/uncompressed/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}