diff options
Diffstat (limited to 'recipes/zammad/webview.js')
-rw-r--r-- | recipes/zammad/webview.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/recipes/zammad/webview.js b/recipes/zammad/webview.js new file mode 100644 index 0000000..38710d1 --- /dev/null +++ b/recipes/zammad/webview.js | |||
@@ -0,0 +1,8 @@ | |||
1 | module.exports = Ferdium => { | ||
2 | const getMessages = function getMessages() { | ||
3 | const notificationsCounter = document.querySelector('.js-notificationsCounter'); | ||
4 | Ferdium.setBadge(Ferdium.safeParseInt(notificationsCounter.textContent)); | ||
5 | }; | ||
6 | |||
7 | Ferdium.loop(getMessages); | ||
8 | }; | ||