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/clubhouse/.gitignore | 3 +++ recipes/clubhouse/README.md | 2 ++ recipes/clubhouse/icon.png | Bin 0 -> 82638 bytes recipes/clubhouse/icon.svg | 20 ++++++++++++++++++++ recipes/clubhouse/index.js | 1 + recipes/clubhouse/package.json | 14 ++++++++++++++ recipes/clubhouse/webview.js | 10 ++++++++++ 7 files changed, 50 insertions(+) create mode 100644 recipes/clubhouse/.gitignore create mode 100644 recipes/clubhouse/README.md create mode 100644 recipes/clubhouse/icon.png create mode 100644 recipes/clubhouse/icon.svg create mode 100644 recipes/clubhouse/index.js create mode 100644 recipes/clubhouse/package.json create mode 100644 recipes/clubhouse/webview.js (limited to 'recipes/clubhouse') diff --git a/recipes/clubhouse/.gitignore b/recipes/clubhouse/.gitignore new file mode 100644 index 0000000..e026003 --- /dev/null +++ b/recipes/clubhouse/.gitignore @@ -0,0 +1,3 @@ +.DS_Store +.idea +.vscode \ No newline at end of file diff --git a/recipes/clubhouse/README.md b/recipes/clubhouse/README.md new file mode 100644 index 0000000..3066666 --- /dev/null +++ b/recipes/clubhouse/README.md @@ -0,0 +1,2 @@ +# Clubhouse for Franz +This is a community Ferdi recipe for [Clubhouse](https://clubhouse.io) diff --git a/recipes/clubhouse/icon.png b/recipes/clubhouse/icon.png new file mode 100644 index 0000000..c91b19f Binary files /dev/null and b/recipes/clubhouse/icon.png differ diff --git a/recipes/clubhouse/icon.svg b/recipes/clubhouse/icon.svg new file mode 100644 index 0000000..eaf00fc --- /dev/null +++ b/recipes/clubhouse/icon.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + diff --git a/recipes/clubhouse/index.js b/recipes/clubhouse/index.js new file mode 100644 index 0000000..23607bd --- /dev/null +++ b/recipes/clubhouse/index.js @@ -0,0 +1 @@ +module.exports = Ferdi => Ferdi; diff --git a/recipes/clubhouse/package.json b/recipes/clubhouse/package.json new file mode 100644 index 0000000..ce49f10 --- /dev/null +++ b/recipes/clubhouse/package.json @@ -0,0 +1,14 @@ +{ + "id": "clubhouse", + "name": "Clubhouse", + "version": "1.0.1", + "description": "Project Management for Software Teams", + "main": "index.js", + "author": "Daniele Lenares ", + "license": "MIT", + "repository": "https://github.com/dnlnrs/ferdi-recipe-clubhouse", + "config": { + "serviceURL": "https://app.clubhouse.io/{teamId}/dashboard", + "hasTeamId": true + } +} diff --git a/recipes/clubhouse/webview.js b/recipes/clubhouse/webview.js new file mode 100644 index 0000000..51cd09d --- /dev/null +++ b/recipes/clubhouse/webview.js @@ -0,0 +1,10 @@ +module.exports = (Ferdi) => { + function getMessages() { + const hasNotifications = document.querySelector('#notifications-link .badge').classList.contains('visible'); + if (hasNotifications) { + Ferdi.setBadge(0, 1); + } + } + + Ferdi.loop(getMessages); +} -- cgit v1.2.3-70-g09d2