From 3c374271bff116415bbc680739e597d0c05e529a Mon Sep 17 00:00:00 2001 From: Bennett Date: Wed, 11 Dec 2019 19:52:52 +0100 Subject: Add Zimbra recipe --- all.json | 11 +++++++++++ uncompressed/zimbra/README.md | 5 +++++ uncompressed/zimbra/icon.png | Bin 0 -> 169676 bytes uncompressed/zimbra/icon.svg | 9 +++++++++ uncompressed/zimbra/index.js | 7 +++++++ uncompressed/zimbra/package.json | 14 ++++++++++++++ uncompressed/zimbra/webview.js | 18 ++++++++++++++++++ zimbra.tar.gz | Bin 0 -> 339094 bytes 8 files changed, 64 insertions(+) create mode 100644 uncompressed/zimbra/README.md create mode 100644 uncompressed/zimbra/icon.png create mode 100644 uncompressed/zimbra/icon.svg create mode 100644 uncompressed/zimbra/index.js create mode 100644 uncompressed/zimbra/package.json create mode 100644 uncompressed/zimbra/webview.js create mode 100644 zimbra.tar.gz diff --git a/all.json b/all.json index a34c075..28947ec 100644 --- a/all.json +++ b/all.json @@ -856,5 +856,16 @@ "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/cliq/icon.png", "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/cliq/icon.svg" } + }, + { + "author": "Ferdi Team ", + "featured": false, + "id": "zimbra", + "name": "Zimbra", + "version": "1.0.0", + "icons": { + "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/zimbra/icon.png", + "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/zimbra/icon.svg" + } } ] diff --git a/uncompressed/zimbra/README.md b/uncompressed/zimbra/README.md new file mode 100644 index 0000000..fb6e2c3 --- /dev/null +++ b/uncompressed/zimbra/README.md @@ -0,0 +1,5 @@ +# Zimbra for Ferdi +This is the official Ferdi recipe for Zimbra + +### How to create your own Ferdi recipes: +* [Read the documentation](https://github.com/meetfranz/plugins) diff --git a/uncompressed/zimbra/icon.png b/uncompressed/zimbra/icon.png new file mode 100644 index 0000000..4e07ec0 Binary files /dev/null and b/uncompressed/zimbra/icon.png differ diff --git a/uncompressed/zimbra/icon.svg b/uncompressed/zimbra/icon.svg new file mode 100644 index 0000000..8882545 --- /dev/null +++ b/uncompressed/zimbra/icon.svg @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/uncompressed/zimbra/index.js b/uncompressed/zimbra/index.js new file mode 100644 index 0000000..729a4bb --- /dev/null +++ b/uncompressed/zimbra/index.js @@ -0,0 +1,7 @@ +"use strict"; + +module.exports = Franz => class Zimbra extends Franz { + async validateUrl(url) { + return true; + } +}; \ No newline at end of file diff --git a/uncompressed/zimbra/package.json b/uncompressed/zimbra/package.json new file mode 100644 index 0000000..c3633e8 --- /dev/null +++ b/uncompressed/zimbra/package.json @@ -0,0 +1,14 @@ +{ + "id": "zimbra", + "name": "Zimbra", + "version": "1.0.0", + "description": "Zimbra", + "main": "index.js", + "author": "Ferdi Team ", + "license": "MIT", + "config": { + "hasNotificationSound": true, + "hasIndirectMessages": true, + "hasCustomUrl": true + } +} diff --git a/uncompressed/zimbra/webview.js b/uncompressed/zimbra/webview.js new file mode 100644 index 0000000..aaaa952 --- /dev/null +++ b/uncompressed/zimbra/webview.js @@ -0,0 +1,18 @@ +"use strict"; + +module.exports = Franz => { + const getMessages = function getMessages() { + const { title } = document; + const regex = /\d+/; + + if (regex.test(title)) { + Franz.setBadge( + Number(regex.exec(title)[0]) + ); + } else { + Franz.setBadge(0); + } + }; + + Franz.loop(getMessages); +}; \ No newline at end of file diff --git a/zimbra.tar.gz b/zimbra.tar.gz new file mode 100644 index 0000000..50bb9e1 Binary files /dev/null and b/zimbra.tar.gz differ -- cgit v1.2.3-70-g09d2