diff options
author | Bennett <hello@vantezzen.io> | 2021-11-01 23:23:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-02 03:53:32 +0530 |
commit | ef8e9edc0d843e5935d5e56998df002b13956f37 (patch) | |
tree | 40ecbb0ac1fecde1af77e19e4def10eea0539861 /recipes/confluence/webview.js | |
parent | chore: remove empty 'service.css' from recipes. Remove 'README.md' from the c... (diff) | |
download | ferdium-recipes-ef8e9edc0d843e5935d5e56998df002b13956f37.tar.gz ferdium-recipes-ef8e9edc0d843e5935d5e56998df002b13956f37.tar.zst ferdium-recipes-ef8e9edc0d843e5935d5e56998df002b13956f37.zip |
Add Confluence recipe (#758)
Diffstat (limited to 'recipes/confluence/webview.js')
-rw-r--r-- | recipes/confluence/webview.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/recipes/confluence/webview.js b/recipes/confluence/webview.js new file mode 100644 index 0000000..25126e7 --- /dev/null +++ b/recipes/confluence/webview.js | |||
@@ -0,0 +1,8 @@ | |||
1 | module.exports = Ferdi => { | ||
2 | const getMessages = () => { | ||
3 | const unreadMessageCountElement = document.querySelector('#notifications-anchor .badge'); | ||
4 | const unreadMessagesCount = Ferdi.safeParseInt(unreadMessageCountElement.textContent); | ||
5 | Ferdi.setBadge(unreadMessagesCount, 0); | ||
6 | }; | ||
7 | Ferdi.loop(getMessages); | ||
8 | }; | ||