From 6f5e4a00588aefdda7a5a1cfe70935870e7e234a Mon Sep 17 00:00:00 2001 From: Bennett Date: Tue, 22 Sep 2020 20:56:48 +0200 Subject: Unpack recipes and update recipes icons (#292) Co-authored-by: Amine Mouafik --- recipes/kaizala/README.md | 5 +++++ recipes/kaizala/icon.png | Bin 0 -> 80000 bytes recipes/kaizala/icon.svg | 9 +++++++++ recipes/kaizala/index.js | 11 +++++++++++ recipes/kaizala/package.json | 14 ++++++++++++++ recipes/kaizala/webview.js | 10 ++++++++++ 6 files changed, 49 insertions(+) create mode 100644 recipes/kaizala/README.md create mode 100644 recipes/kaizala/icon.png create mode 100644 recipes/kaizala/icon.svg create mode 100644 recipes/kaizala/index.js create mode 100644 recipes/kaizala/package.json create mode 100644 recipes/kaizala/webview.js (limited to 'recipes/kaizala') diff --git a/recipes/kaizala/README.md b/recipes/kaizala/README.md new file mode 100644 index 0000000..8aae93e --- /dev/null +++ b/recipes/kaizala/README.md @@ -0,0 +1,5 @@ +# Microsoft Kaizala +This is the official Franz recipe for Microsoft Kaizala + +### How to create your own Franz recipes: +* [Read the documentation](https://meetfranz.com/developer) diff --git a/recipes/kaizala/icon.png b/recipes/kaizala/icon.png new file mode 100644 index 0000000..895b808 Binary files /dev/null and b/recipes/kaizala/icon.png differ diff --git a/recipes/kaizala/icon.svg b/recipes/kaizala/icon.svg new file mode 100644 index 0000000..0b5ed3a --- /dev/null +++ b/recipes/kaizala/icon.svg @@ -0,0 +1,9 @@ + + + + microsoft-kaizala + Created with Sketch. + + + + \ No newline at end of file diff --git a/recipes/kaizala/index.js b/recipes/kaizala/index.js new file mode 100644 index 0000000..f9b8099 --- /dev/null +++ b/recipes/kaizala/index.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = (Franz) => + class Messenger extends Franz { + overrideUserAgent() { + return window.navigator.userAgent.replace( + /(Ferdi|Electron)\/\S+ \([^)]+\)/g, + "" + ); + } + }; diff --git a/recipes/kaizala/package.json b/recipes/kaizala/package.json new file mode 100644 index 0000000..2867216 --- /dev/null +++ b/recipes/kaizala/package.json @@ -0,0 +1,14 @@ +{ + "id": "kaizala", + "name": "Microsoft Kaizala", + "version": "1.1.0", + "description": "Microsoft Kaizala", + "main": "index.js", + "author": "Stefan Malzner ", + "license": "MIT", + "repository": "https://github.com/meetfranz/recipe-microsoft-kaizala", + "config": { + "serviceURL": "https://webapp.kaiza.la", + "hasNotificationSound": true + } +} diff --git a/recipes/kaizala/webview.js b/recipes/kaizala/webview.js new file mode 100644 index 0000000..f77b276 --- /dev/null +++ b/recipes/kaizala/webview.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = Franz => { + const getMessages = function getMessages() { + const count = document.querySelectorAll('.unseen-msg-count').length; + Franz.setBadge(count); + }; + + Franz.loop(getMessages); +}; \ No newline at end of file -- cgit v1.2.3-54-g00ecf