aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/zammad/webview.js
diff options
context:
space:
mode:
authorLibravatar Anne Douwe Bouma <annedouwe@bouma.tech>2022-07-04 03:43:43 +0200
committerLibravatar GitHub <noreply@github.com>2022-07-04 01:43:43 +0000
commit964b8463872fc9c059a754ba295c579dec538ca5 (patch)
tree1a3231dce3c6b2276b0fec1283d8435bd4ea370c /recipes/zammad/webview.js
parentdocs: add fschaupp as a contributor for code [skip ci] (#100) (diff)
downloadferdium-recipes-964b8463872fc9c059a754ba295c579dec538ca5.tar.gz
ferdium-recipes-964b8463872fc9c059a754ba295c579dec538ca5.tar.zst
ferdium-recipes-964b8463872fc9c059a754ba295c579dec538ca5.zip
Add Zammad recipe (#92)
Zammad is a ticketing system that is self-hosted. Co-authored-by: Anne Douwe Bouma <annedouwe@sibben.nl> Co-authored-by: Vijay A <vraravam@users.noreply.github.com>
Diffstat (limited to 'recipes/zammad/webview.js')
-rw-r--r--recipes/zammad/webview.js8
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 @@
1module.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};