From 964b8463872fc9c059a754ba295c579dec538ca5 Mon Sep 17 00:00:00 2001 From: Anne Douwe Bouma Date: Mon, 4 Jul 2022 03:43:43 +0200 Subject: Add Zammad recipe (#92) Zammad is a ticketing system that is self-hosted. Co-authored-by: Anne Douwe Bouma Co-authored-by: Vijay A --- recipes/zammad/icon.svg | 25 +++++++++++++++++++++++++ recipes/zammad/index.js | 1 + recipes/zammad/package.json | 12 ++++++++++++ recipes/zammad/webview.js | 8 ++++++++ 4 files changed, 46 insertions(+) create mode 100644 recipes/zammad/icon.svg create mode 100644 recipes/zammad/index.js create mode 100644 recipes/zammad/package.json create mode 100644 recipes/zammad/webview.js (limited to 'recipes/zammad') diff --git a/recipes/zammad/icon.svg b/recipes/zammad/icon.svg new file mode 100644 index 0000000..329b712 --- /dev/null +++ b/recipes/zammad/icon.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/recipes/zammad/index.js b/recipes/zammad/index.js new file mode 100644 index 0000000..dd41f72 --- /dev/null +++ b/recipes/zammad/index.js @@ -0,0 +1 @@ +module.exports = Ferdium => Ferdium; diff --git a/recipes/zammad/package.json b/recipes/zammad/package.json new file mode 100644 index 0000000..a77b804 --- /dev/null +++ b/recipes/zammad/package.json @@ -0,0 +1,12 @@ +{ + "id": "zammad", + "name": "Zammad", + "version": "1.0.0", + "license": "MIT", + "config": { + "hasNotificationSound": true, + "hasDirectMessages": false, + "hasIndirectMessages": true, + "hasCustomUrl": true + } +} 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 @@ +module.exports = Ferdium => { + const getMessages = function getMessages() { + const notificationsCounter = document.querySelector('.js-notificationsCounter'); + Ferdium.setBadge(Ferdium.safeParseInt(notificationsCounter.textContent)); + }; + + Ferdium.loop(getMessages); +}; -- cgit v1.2.3-54-g00ecf