From b7e866909a1c96be5965c57289af551869dce2aa Mon Sep 17 00:00:00 2001 From: Sampath Kumar Krishnan Date: Fri, 24 Apr 2020 23:26:06 +0530 Subject: Implement modifyRequestHeaders for Hangouts and document (#137) Co-Authored-By: Mahadevan Sreenivasan --- all.json | 2 +- archives/hangoutschat.tar.gz | Bin 113884 -> 114002 bytes docs/backend_api.md | 28 ++++++++++++++++++++++++++++ uncompressed/hangoutschat/index.js | 10 ++++++++++ uncompressed/hangoutschat/package.json | 2 +- 5 files changed, 40 insertions(+), 2 deletions(-) diff --git a/all.json b/all.json index e8a79a2..9b4acca 100644 --- a/all.json +++ b/all.json @@ -345,7 +345,7 @@ "featured": false, "id": "hangoutschat", "name": "Hangouts Chat", - "version": "1.2.3", + "version": "1.3.0", "icons": { "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/hangoutschat/icon.png", "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/hangoutschat/icon.svg" diff --git a/archives/hangoutschat.tar.gz b/archives/hangoutschat.tar.gz index b1fdc9c..39d9ae0 100644 Binary files a/archives/hangoutschat.tar.gz and b/archives/hangoutschat.tar.gz differ diff --git a/docs/backend_api.md b/docs/backend_api.md index 512912b..dc3bfaa 100644 --- a/docs/backend_api.md +++ b/docs/backend_api.md @@ -5,6 +5,7 @@ Provides a set of helper functions to integrate the recipe into [Ferdi](https:// ## Ferdi Backend Class Methods * [validateUrl](#user-content-validateurl) * [overrideUserAgent](#user-content-overrideuseragent) +* [modifyRequestHeaders](#user-content-modifyrequestheaders) ## Events * [webview events](#user-content-events) @@ -72,6 +73,32 @@ module.exports = Ferdi => class Example extends Ferdi { }; ``` +### modifyRequestHeaders() +Modify headers of HTTP requests sent from a recipe's webview +Any standard HTTP header can be added to the requests. + +#### Returns +`Array` containing objects, each of which should have two properties. +- `headers` - Object containing the header params and their values in key-value format +- `requestFilters` - Array of URL patterns used to filter requests for which the headers need to be added. +Valid URL patterns can be referred from [here](https://www.electronjs.org/docs/api/web-request#webrequestonbeforerequestfilter-listener) + +#### Usage + +```js +// Hangouts Chat integration +module.exports = Ferdi => class HangoutsChat extends Ferdi { + modifyRequestHeaders() { + return [{ + // Adding an origin header for all http requests from this recipe + headers: { 'origin': 'https://chat.google.com' }, + requestFilters: { + urls: ['*://*/*'] + } + }] + } +}; +``` ### Events Ferdi recipes can hook into the [electron webview events](https://electron.atom.io/docs/api/webview-tag/#dom-events) to trigger custom functions. @@ -95,3 +122,4 @@ module.exports = Ferdi => class Tweetdeck extends Ferdi { } }; ``` + diff --git a/uncompressed/hangoutschat/index.js b/uncompressed/hangoutschat/index.js index 95e7fa5..819e06b 100644 --- a/uncompressed/hangoutschat/index.js +++ b/uncompressed/hangoutschat/index.js @@ -3,6 +3,16 @@ var os = require('os') // just pass through Franz module.exports = Franz => class HangoutsChat extends Franz { + // Method to add headers to requests from Hangouts Chat's webview + modifyRequestHeaders() { + return [{ + headers: { 'origin': 'https://chat.google.com' }, + requestFilters: { + urls: ['*://*/*'] + } + }] + } + overrideUserAgent() { if (os.platform() == 'linux') return "Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0" diff --git a/uncompressed/hangoutschat/package.json b/uncompressed/hangoutschat/package.json index 40b0357..bcc58f9 100644 --- a/uncompressed/hangoutschat/package.json +++ b/uncompressed/hangoutschat/package.json @@ -1,7 +1,7 @@ { "id": "hangoutschat", "name": "Hangouts Chat", - "version": "1.2.3", + "version": "1.3.0", "description": "Hangouts Chat", "main": "index.js", "author": "Stefan Malzner and Iván López (ilopmar)", -- cgit v1.2.3-54-g00ecf From 8b2dd4dfd4b12af67f666b2635d26e09469e9e86 Mon Sep 17 00:00:00 2001 From: Mahadevan Sreenivasan Date: Sun, 26 Apr 2020 09:30:03 +0000 Subject: WhatsApp - Chrome error every time the service is loaded (#140) --- all.json | 2 +- archives/whatsapp.tar.gz | Bin 183473 -> 183477 bytes uncompressed/whatsapp/index.js | 16 +++++++++++----- uncompressed/whatsapp/package.json | 2 +- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/all.json b/all.json index 9b4acca..5f309b5 100644 --- a/all.json +++ b/all.json @@ -983,7 +983,7 @@ "featured": false, "id": "whatsapp", "name": "WhatsApp", - "version": "2.0.2", + "version": "2.0.3", "icons": { "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/whatsapp/icon.png", "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/whatsapp/icon.svg" diff --git a/archives/whatsapp.tar.gz b/archives/whatsapp.tar.gz index a15e4f2..d46f731 100644 Binary files a/archives/whatsapp.tar.gz and b/archives/whatsapp.tar.gz differ diff --git a/uncompressed/whatsapp/index.js b/uncompressed/whatsapp/index.js index f9b8099..504a70e 100644 --- a/uncompressed/whatsapp/index.js +++ b/uncompressed/whatsapp/index.js @@ -2,10 +2,16 @@ module.exports = (Franz) => class Messenger extends Franz { - overrideUserAgent() { - return window.navigator.userAgent.replace( - /(Ferdi|Electron)\/\S+ \([^)]+\)/g, - "" - ); + modifyRequestHeaders() { + return [ + { + headers: { + 'user-agent': window.navigator.userAgent.replace(/(Ferdi|Electron)\/\S+ \([^)]+\)/g,"").trim(), + }, + requestFilters: { + urls: ['*://*/*'], + } + } + ] } }; diff --git a/uncompressed/whatsapp/package.json b/uncompressed/whatsapp/package.json index 5331ac9..19daf29 100644 --- a/uncompressed/whatsapp/package.json +++ b/uncompressed/whatsapp/package.json @@ -1,7 +1,7 @@ { "id": "whatsapp", "name": "WhatsApp", - "version": "2.0.2", + "version": "2.0.3", "description": "WhatsApp", "main": "index.js", "author": "Stefan Malzner ", -- cgit v1.2.3-54-g00ecf From 3054fd4c362b5be81b5cdd48535a0e7078fcd0a6 Mon Sep 17 00:00:00 2001 From: Amine Mouafik Date: Mon, 27 Apr 2020 01:20:34 +0000 Subject: Repackage corrupted recipes --- archives/hangouts.tar.gz | Bin 60786 -> 60787 bytes archives/hangoutschat.tar.gz | Bin 114002 -> 113987 bytes archives/whatsapp.tar.gz | Bin 183477 -> 183529 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/archives/hangouts.tar.gz b/archives/hangouts.tar.gz index 8ae4470..23b1595 100644 Binary files a/archives/hangouts.tar.gz and b/archives/hangouts.tar.gz differ diff --git a/archives/hangoutschat.tar.gz b/archives/hangoutschat.tar.gz index 39d9ae0..4163cb5 100644 Binary files a/archives/hangoutschat.tar.gz and b/archives/hangoutschat.tar.gz differ diff --git a/archives/whatsapp.tar.gz b/archives/whatsapp.tar.gz index d46f731..1d48d3a 100644 Binary files a/archives/whatsapp.tar.gz and b/archives/whatsapp.tar.gz differ -- cgit v1.2.3-54-g00ecf From 33e211fa2494de716a3514cde492333b2aa444d5 Mon Sep 17 00:00:00 2001 From: Mahadevan Sreenivasan Date: Mon, 27 Apr 2020 20:02:54 +0000 Subject: Pasting text from clipboard into hangouts prepends it (#142) --- all.json | 2 +- archives/hangouts.tar.gz | Bin 60787 -> 60751 bytes uncompressed/hangouts/index.js | 20 ++++++++++++-------- uncompressed/hangouts/package.json | 2 +- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/all.json b/all.json index 5f309b5..1db16db 100644 --- a/all.json +++ b/all.json @@ -334,7 +334,7 @@ "featured": false, "id": "hangouts", "name": "Hangouts", - "version": "1.0.2", + "version": "1.0.4", "icons": { "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/hangouts/icon.png", "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/hangouts/icon.svg" diff --git a/archives/hangouts.tar.gz b/archives/hangouts.tar.gz index 23b1595..5daa1ae 100644 Binary files a/archives/hangouts.tar.gz and b/archives/hangouts.tar.gz differ diff --git a/uncompressed/hangouts/index.js b/uncompressed/hangouts/index.js index a671025..8be0a8e 100644 --- a/uncompressed/hangouts/index.js +++ b/uncompressed/hangouts/index.js @@ -1,11 +1,15 @@ -var os = require('os') - -module.exports = Franz => +module.exports = (Franz) => class hangouts extends Franz { - overrideUserAgent() { - if (os.platform() == 'linux') - return "Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0" - else - return "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:72.0) Gecko/20100101 Firefox/72.0"; + modifyRequestHeaders() { + return [ + { + headers: { + 'user-agent': window.navigator.userAgent.replace(/(Ferdi|Electron)\/\S+ \([^)]+\)/g, '').trim(), + }, + requestFilters: { + urls: ['*://*/*'], + }, + }, + ]; } }; diff --git a/uncompressed/hangouts/package.json b/uncompressed/hangouts/package.json index f0e0184..c6edbbd 100644 --- a/uncompressed/hangouts/package.json +++ b/uncompressed/hangouts/package.json @@ -1,7 +1,7 @@ { "id": "hangouts", "name": "Hangouts", - "version": "1.0.2", + "version": "1.0.4", "description": "Hangouts", "main": "index.js", "author": "Stefan Malzner ", -- cgit v1.2.3-54-g00ecf From ff5d94aa5e31cdcc8859a7856a837c849b2d25ce Mon Sep 17 00:00:00 2001 From: Amine Mouafik Date: Mon, 27 Apr 2020 22:42:35 +0000 Subject: Repackage corrupted recipe archive --- archives/hangouts.tar.gz | Bin 60751 -> 60800 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/archives/hangouts.tar.gz b/archives/hangouts.tar.gz index 5daa1ae..d53b779 100644 Binary files a/archives/hangouts.tar.gz and b/archives/hangouts.tar.gz differ -- cgit v1.2.3-54-g00ecf From 6b7dd82f9393c942d7202e4b80d166ca375a7c08 Mon Sep 17 00:00:00 2001 From: RoiArthurB Date: Tue, 28 Apr 2020 16:13:32 +0700 Subject: [ZALO] Update getMessages --- all.json | 2 +- archives/zalo.tar.gz | Bin 51990 -> 51954 bytes uncompressed/zalo/package.json | 2 +- uncompressed/zalo/webview.js | 9 +++------ 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/all.json b/all.json index 1db16db..1152af6 100644 --- a/all.json +++ b/all.json @@ -1049,7 +1049,7 @@ "featured": false, "id": "zalo", "name": "Zalo", - "version": "1.0.0", + "version": "1.1.0", "icons": { "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/zalo/icon.png", "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/zalo/icon.svg" diff --git a/archives/zalo.tar.gz b/archives/zalo.tar.gz index d3a5f6c..8e33a97 100644 Binary files a/archives/zalo.tar.gz and b/archives/zalo.tar.gz differ diff --git a/uncompressed/zalo/package.json b/uncompressed/zalo/package.json index 8e2417c..57c57ce 100644 --- a/uncompressed/zalo/package.json +++ b/uncompressed/zalo/package.json @@ -1,7 +1,7 @@ { "id": "zalo", "name": "Zalo", - "version": "1.0.0", + "version": "1.1.0", "description": "Zalo", "main": "index.js", "author": "RoiArthurB ", diff --git a/uncompressed/zalo/webview.js b/uncompressed/zalo/webview.js index e20c6b5..34ae4ac 100644 --- a/uncompressed/zalo/webview.js +++ b/uncompressed/zalo/webview.js @@ -3,12 +3,9 @@ module.exports = Franz => { const getMessages = function getMessages() { var unread = 0 - const notificationBadge = document.getElementsByClassName('notification-badge')[0] - if (notificationBadge != undefined) { - unread = notificationBadge.innerText; - } - Franz.setBadge(parseInt(unread, 10)); + const notificationBadge = document.getElementsByClassName('tab-red-dot').length; + Franz.setBadge(unread); }; Franz.loop(getMessages); -}; \ No newline at end of file +}; -- cgit v1.2.3-54-g00ecf From d8b7b63dcaab46940a271939b7284100b7ac9328 Mon Sep 17 00:00:00 2001 From: RoiArthurB Date: Tue, 28 Apr 2020 17:43:27 +0700 Subject: [ZALO] Fix variable use Thanks @vantezzen --- all.json | 2 +- archives/zalo.tar.gz | Bin 51954 -> 51951 bytes uncompressed/zalo/package.json | 2 +- uncompressed/zalo/webview.js | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/all.json b/all.json index 1152af6..7aca725 100644 --- a/all.json +++ b/all.json @@ -1049,7 +1049,7 @@ "featured": false, "id": "zalo", "name": "Zalo", - "version": "1.1.0", + "version": "1.1.1", "icons": { "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/zalo/icon.png", "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/zalo/icon.svg" diff --git a/archives/zalo.tar.gz b/archives/zalo.tar.gz index 8e33a97..c11f022 100644 Binary files a/archives/zalo.tar.gz and b/archives/zalo.tar.gz differ diff --git a/uncompressed/zalo/package.json b/uncompressed/zalo/package.json index 57c57ce..183fc20 100644 --- a/uncompressed/zalo/package.json +++ b/uncompressed/zalo/package.json @@ -1,7 +1,7 @@ { "id": "zalo", "name": "Zalo", - "version": "1.1.0", + "version": "1.1.1", "description": "Zalo", "main": "index.js", "author": "RoiArthurB ", diff --git a/uncompressed/zalo/webview.js b/uncompressed/zalo/webview.js index 34ae4ac..0f360c3 100644 --- a/uncompressed/zalo/webview.js +++ b/uncompressed/zalo/webview.js @@ -4,7 +4,7 @@ module.exports = Franz => { const getMessages = function getMessages() { var unread = 0 const notificationBadge = document.getElementsByClassName('tab-red-dot').length; - Franz.setBadge(unread); + Franz.setBadge(notificationBadge); }; Franz.loop(getMessages); -- cgit v1.2.3-54-g00ecf From 5d61a3c5960193e896d57c9cbf63b801eb99ca64 Mon Sep 17 00:00:00 2001 From: Sanket Dasgupta Date: Sun, 3 May 2020 01:19:31 +0530 Subject: Update featured services in JSON Towards https://github.com/getferdi/server/issues/27 --- all.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/all.json b/all.json index 7aca725..f72e66e 100644 --- a/all.json +++ b/all.json @@ -89,7 +89,7 @@ }, { "author": "Stefan Malzner ", - "featured": false, + "featured": true, "id": "discord", "name": "Discord", "version": "1.1.3", @@ -210,7 +210,7 @@ }, { "author": "Brian Gilbert ", - "featured": false, + "featured": true, "id": "gitter", "name": "Gitter", "version": "1.0.2", @@ -232,7 +232,7 @@ }, { "author": "Stefan Malzner ", - "featured": false, + "featured": true, "id": "gmail", "name": "Gmail", "version": "1.3.1", @@ -331,7 +331,7 @@ }, { "author": "Stefan Malzner ", - "featured": false, + "featured": true, "id": "hangouts", "name": "Hangouts", "version": "1.0.4", @@ -474,7 +474,7 @@ }, { "author": "Stefan Malzner ", - "featured": false, + "featured": true, "id": "mattermost", "name": "Mattermost", "version": "1.2.1", @@ -485,7 +485,7 @@ }, { "author": "Stefan Malzner ", - "featured": false, + "featured": true, "id": "messenger", "name": "Messenger", "version": "1.1.0", @@ -694,7 +694,7 @@ }, { "author": "Stefan Malzner ", - "featured": false, + "featured": true, "id": "rocketchat", "name": "Rocket.Chat", "version": "1.0.6", @@ -727,7 +727,7 @@ }, { "author": "Stefan Malzner ", - "featured": false, + "featured": true, "id": "skype", "name": "Skype", "version": "1.3.0", @@ -738,7 +738,7 @@ }, { "author": "Stefan Malzner ", - "featured": false, + "featured": true, "id": "slack", "name": "Slack", "version": "1.0.15", @@ -804,7 +804,7 @@ }, { "author": "Stefan Malzner ", - "featured": false, + "featured": true, "id": "telegram", "name": "Telegram", "version": "3.0.0", @@ -881,7 +881,7 @@ }, { "author": "Stefan Malzner ", - "featured": false, + "featured": true, "id": "tweetdeck", "name": "Tweetdeck", "version": "1.0.2", @@ -980,7 +980,7 @@ }, { "author": "Stefan Malzner ", - "featured": false, + "featured": true, "id": "whatsapp", "name": "WhatsApp", "version": "2.0.3", -- cgit v1.2.3-54-g00ecf From 943deca4887f52ec73b8a05663947dd11a354d9b Mon Sep 17 00:00:00 2001 From: Jake Lee Date: Tue, 5 May 2020 08:01:34 +0100 Subject: Adds Guilded.gg recipe (#150) --- all.json | 11 +++++++++++ archives/guilded.tar.gz | Bin 0 -> 10315 bytes uncompressed/guilded/README.md | 8 ++++++++ uncompressed/guilded/icon.png | Bin 0 -> 13670 bytes uncompressed/guilded/icon.svg | 9 +++++++++ uncompressed/guilded/index.js | 3 +++ uncompressed/guilded/package.json | 14 ++++++++++++++ uncompressed/guilded/webview.js | 15 +++++++++++++++ 8 files changed, 60 insertions(+) create mode 100644 archives/guilded.tar.gz create mode 100644 uncompressed/guilded/README.md create mode 100644 uncompressed/guilded/icon.png create mode 100644 uncompressed/guilded/icon.svg create mode 100644 uncompressed/guilded/index.js create mode 100644 uncompressed/guilded/package.json create mode 100644 uncompressed/guilded/webview.js diff --git a/all.json b/all.json index f72e66e..f046c16 100644 --- a/all.json +++ b/all.json @@ -307,6 +307,17 @@ "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/groupme/icon.svg" } }, + { + "author": "Jake Lee ", + "featured": false, + "id": "guilded", + "name": "Guilded", + "version": "1.0.0", + "icons": { + "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/guilded/icon.png", + "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/guilded/icon.svg" + } + }, { "author": "Yuriy Badalyantc ", "featured": false, diff --git a/archives/guilded.tar.gz b/archives/guilded.tar.gz new file mode 100644 index 0000000..2c01e32 Binary files /dev/null and b/archives/guilded.tar.gz differ diff --git a/uncompressed/guilded/README.md b/uncompressed/guilded/README.md new file mode 100644 index 0000000..caba8cf --- /dev/null +++ b/uncompressed/guilded/README.md @@ -0,0 +1,8 @@ +# Guilded for Ferdi +This is the unofficial Ferdi recipe for Guilded, it only supports the current server. + +### Release notes +1.0.0: First version + +### How to create your own Ferdi recipes: +* [Read the documentation](https://github.com/getferdi/recipes/blob/master/docs/integration.md) \ No newline at end of file diff --git a/uncompressed/guilded/icon.png b/uncompressed/guilded/icon.png new file mode 100644 index 0000000..e2cd5ae Binary files /dev/null and b/uncompressed/guilded/icon.png differ diff --git a/uncompressed/guilded/icon.svg b/uncompressed/guilded/icon.svg new file mode 100644 index 0000000..199d4a5 --- /dev/null +++ b/uncompressed/guilded/icon.svg @@ -0,0 +1,9 @@ + + + + Logomark / Guilded-Wordmark-Black + Created with Sketch. + + + + \ No newline at end of file diff --git a/uncompressed/guilded/index.js b/uncompressed/guilded/index.js new file mode 100644 index 0000000..e8243fb --- /dev/null +++ b/uncompressed/guilded/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = Franz => Franz; \ No newline at end of file diff --git a/uncompressed/guilded/package.json b/uncompressed/guilded/package.json new file mode 100644 index 0000000..fbb7eda --- /dev/null +++ b/uncompressed/guilded/package.json @@ -0,0 +1,14 @@ +{ + "id": "guilded", + "name": "Guilded", + "version": "1.0.0", + "description": "Guilded", + "main": "index.js", + "author": "Jake Lee ", + "license": "MIT", + "config": { + "serviceURL": "https://www.guilded.gg/", + "hasTeamId": false, + "hasNotificationSound": true + } +} diff --git a/uncompressed/guilded/webview.js b/uncompressed/guilded/webview.js new file mode 100644 index 0000000..371fac8 --- /dev/null +++ b/uncompressed/guilded/webview.js @@ -0,0 +1,15 @@ +"use strict"; + +module.exports = Franz => { + const getMessages = function getMessages() { + var unread = 0 + const notificationBadge = document.getElementsByClassName('NavSelectorItem-unread-badge')[0] + if (notificationBadge != undefined) { + const innerBadge = notificationBadge.getElementsByClassName('BadgeV2-count')[0] + unread = innerBadge.innerText; + } + Franz.setBadge(parseInt(unread, 10)); + }; + + Franz.loop(getMessages); +}; \ No newline at end of file -- cgit v1.2.3-54-g00ecf From f121df564fda032b5ffc45a13c9bed807fc6f335 Mon Sep 17 00:00:00 2001 From: Amine Mouafik Date: Tue, 5 May 2020 07:03:23 +0000 Subject: #130 Repackage archives on macOS --- archives/guilded.tar.gz | Bin 10315 -> 10306 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/archives/guilded.tar.gz b/archives/guilded.tar.gz index 2c01e32..70a7e45 100644 Binary files a/archives/guilded.tar.gz and b/archives/guilded.tar.gz differ -- cgit v1.2.3-54-g00ecf From 7828ffd94eb23122bb2d0ead8e781b2b350f4687 Mon Sep 17 00:00:00 2001 From: Daniele Lenares Date: Wed, 6 May 2020 10:12:27 +0200 Subject: Add Clubhouse recipe --- all.json | 11 +++++++++++ archives/clubhouse.tar.gz | Bin 0 -> 69281 bytes uncompressed/clubhouse/.gitignore | 3 +++ uncompressed/clubhouse/README.md | 2 ++ uncompressed/clubhouse/icon.png | Bin 0 -> 82638 bytes uncompressed/clubhouse/icon.svg | 20 ++++++++++++++++++++ uncompressed/clubhouse/index.js | 1 + uncompressed/clubhouse/package.json | 14 ++++++++++++++ uncompressed/clubhouse/webview.js | 11 +++++++++++ 9 files changed, 62 insertions(+) create mode 100644 archives/clubhouse.tar.gz create mode 100644 uncompressed/clubhouse/.gitignore create mode 100644 uncompressed/clubhouse/README.md create mode 100644 uncompressed/clubhouse/icon.png create mode 100644 uncompressed/clubhouse/icon.svg create mode 100644 uncompressed/clubhouse/index.js create mode 100644 uncompressed/clubhouse/package.json create mode 100644 uncompressed/clubhouse/webview.js diff --git a/all.json b/all.json index f046c16..5d26625 100644 --- a/all.json +++ b/all.json @@ -87,6 +87,17 @@ "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/cliq/icon.svg" } }, + { + "author": "Daniele Lenares ", + "featured": false, + "id": "clubhouse", + "name": "Clubhouse", + "version": "1.0.0", + "icons": { + "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/clubhouse/icon.png", + "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/clubhouse/icon.svg" + } + }, { "author": "Stefan Malzner ", "featured": true, diff --git a/archives/clubhouse.tar.gz b/archives/clubhouse.tar.gz new file mode 100644 index 0000000..8b44a8c Binary files /dev/null and b/archives/clubhouse.tar.gz differ diff --git a/uncompressed/clubhouse/.gitignore b/uncompressed/clubhouse/.gitignore new file mode 100644 index 0000000..e026003 --- /dev/null +++ b/uncompressed/clubhouse/.gitignore @@ -0,0 +1,3 @@ +.DS_Store +.idea +.vscode \ No newline at end of file diff --git a/uncompressed/clubhouse/README.md b/uncompressed/clubhouse/README.md new file mode 100644 index 0000000..3066666 --- /dev/null +++ b/uncompressed/clubhouse/README.md @@ -0,0 +1,2 @@ +# Clubhouse for Franz +This is a community Ferdi recipe for [Clubhouse](https://clubhouse.io) diff --git a/uncompressed/clubhouse/icon.png b/uncompressed/clubhouse/icon.png new file mode 100644 index 0000000..c91b19f Binary files /dev/null and b/uncompressed/clubhouse/icon.png differ diff --git a/uncompressed/clubhouse/icon.svg b/uncompressed/clubhouse/icon.svg new file mode 100644 index 0000000..eaf00fc --- /dev/null +++ b/uncompressed/clubhouse/icon.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + diff --git a/uncompressed/clubhouse/index.js b/uncompressed/clubhouse/index.js new file mode 100644 index 0000000..23607bd --- /dev/null +++ b/uncompressed/clubhouse/index.js @@ -0,0 +1 @@ +module.exports = Ferdi => Ferdi; diff --git a/uncompressed/clubhouse/package.json b/uncompressed/clubhouse/package.json new file mode 100644 index 0000000..f21948a --- /dev/null +++ b/uncompressed/clubhouse/package.json @@ -0,0 +1,14 @@ +{ + "id": "clubhouse", + "name": "Clubhouse", + "version": "1.0.0", + "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 + } +} \ No newline at end of file diff --git a/uncompressed/clubhouse/webview.js b/uncompressed/clubhouse/webview.js new file mode 100644 index 0000000..b16ab05 --- /dev/null +++ b/uncompressed/clubhouse/webview.js @@ -0,0 +1,11 @@ +module.exports = (Ferdi) => { + function getMessages() { + let unread = 0; + const hasNotifications = document.querySelector('#notifications-link .badge').classList.contains('visible'); + if (hasNotifications) { + Ferdi.setBadge(1); + } + } + + Ferdi.loop(getMessages); +} -- cgit v1.2.3-54-g00ecf From 5ad19c79dc5747d70080eba99c2d95487dac9521 Mon Sep 17 00:00:00 2001 From: Daniele Lenares Date: Wed, 6 May 2020 17:31:06 +0200 Subject: Bump Clubhouse to 1.0.1 --- all.json | 2 +- archives/clubhouse.tar.gz | Bin 69281 -> 69267 bytes uncompressed/clubhouse/package.json | 4 ++-- uncompressed/clubhouse/webview.js | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/all.json b/all.json index 5d26625..6751500 100644 --- a/all.json +++ b/all.json @@ -92,7 +92,7 @@ "featured": false, "id": "clubhouse", "name": "Clubhouse", - "version": "1.0.0", + "version": "1.0.1", "icons": { "png": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/clubhouse/icon.png", "svg": "https://cdn.jsdelivr.net/gh/getferdi/recipes/uncompressed/clubhouse/icon.svg" diff --git a/archives/clubhouse.tar.gz b/archives/clubhouse.tar.gz index 8b44a8c..53f91f3 100644 Binary files a/archives/clubhouse.tar.gz and b/archives/clubhouse.tar.gz differ diff --git a/uncompressed/clubhouse/package.json b/uncompressed/clubhouse/package.json index f21948a..ce49f10 100644 --- a/uncompressed/clubhouse/package.json +++ b/uncompressed/clubhouse/package.json @@ -1,7 +1,7 @@ { "id": "clubhouse", "name": "Clubhouse", - "version": "1.0.0", + "version": "1.0.1", "description": "Project Management for Software Teams", "main": "index.js", "author": "Daniele Lenares ", @@ -11,4 +11,4 @@ "serviceURL": "https://app.clubhouse.io/{teamId}/dashboard", "hasTeamId": true } -} \ No newline at end of file +} diff --git a/uncompressed/clubhouse/webview.js b/uncompressed/clubhouse/webview.js index b16ab05..51cd09d 100644 --- a/uncompressed/clubhouse/webview.js +++ b/uncompressed/clubhouse/webview.js @@ -1,9 +1,8 @@ module.exports = (Ferdi) => { function getMessages() { - let unread = 0; const hasNotifications = document.querySelector('#notifications-link .badge').classList.contains('visible'); if (hasNotifications) { - Ferdi.setBadge(1); + Ferdi.setBadge(0, 1); } } -- cgit v1.2.3-54-g00ecf