diff options
author | vantezzen <hello@vantezzen.io> | 2020-05-10 10:41:58 +0200 |
---|---|---|
committer | vantezzen <hello@vantezzen.io> | 2020-05-10 10:41:58 +0200 |
commit | d927902163200b9ab30f27a9d7919abf0811c727 (patch) | |
tree | 237c8b657811d30f014aca8b414319d5eef17e74 /uncompressed/clubhouse/webview.js | |
parent | Add create script (diff) | |
parent | Merge pull request #153 from dnlnrs/master (diff) | |
download | ferdium-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.js | 10 |
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 @@ | |||
1 | module.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 | } | ||