From 8a0971ff9f41fdaa1af15e88740ce9479e1ec6ea Mon Sep 17 00:00:00 2001 From: Vijay A Date: Sun, 20 Jun 2021 11:08:00 +0530 Subject: Added new services - 'air-droid' - 'basecamp' - 'box' - 'buffer' - 'chatra' - 'easy-redmine' - 'feedbin' - 'iCloud' - 'jollor' - 'nomadlist' - 'paymo' - 'pivotal-tracker' - 'plan' - 'podio' - 'protonet' - 'teamleader' --- recipes/chatra/icon.png | Bin 0 -> 463730 bytes recipes/chatra/icon.svg | 3 +++ recipes/chatra/index.js | 2 ++ recipes/chatra/package.json | 24 ++++++++++++++++++++++++ recipes/chatra/webview.js | 19 +++++++++++++++++++ 5 files changed, 48 insertions(+) create mode 100644 recipes/chatra/icon.png create mode 100644 recipes/chatra/icon.svg create mode 100644 recipes/chatra/index.js create mode 100644 recipes/chatra/package.json create mode 100644 recipes/chatra/webview.js (limited to 'recipes/chatra') diff --git a/recipes/chatra/icon.png b/recipes/chatra/icon.png new file mode 100644 index 0000000..15ab278 Binary files /dev/null and b/recipes/chatra/icon.png differ diff --git a/recipes/chatra/icon.svg b/recipes/chatra/icon.svg new file mode 100644 index 0000000..84b62b4 --- /dev/null +++ b/recipes/chatra/icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/recipes/chatra/index.js b/recipes/chatra/index.js new file mode 100644 index 0000000..46f936f --- /dev/null +++ b/recipes/chatra/index.js @@ -0,0 +1,2 @@ +// just pass through Franz +module.exports = Franz => Franz; diff --git a/recipes/chatra/package.json b/recipes/chatra/package.json new file mode 100644 index 0000000..4315771 --- /dev/null +++ b/recipes/chatra/package.json @@ -0,0 +1,24 @@ +{ + "id": "chatra", + "name": "chatra", + "version": "1.0.0", + "description": "Chatra – Live chat software", + "main": "index.js", + "author": "Julien Ma ", + "license": "MIT", + "config": { + "serviceURL": "https://app.chatra.io/", + "serviceName": "Chatra", + "message": "", + "popup": [], + "hasTeamID": false, + "hasNotificationSound": true, + "hasIndirectMessages": true, + "customURL": false, + "hostedOnly": false, + "webviewOptions": { + "webpreferences": "" + }, + "openDevTools": false + } +} diff --git a/recipes/chatra/webview.js b/recipes/chatra/webview.js new file mode 100644 index 0000000..a8a611c --- /dev/null +++ b/recipes/chatra/webview.js @@ -0,0 +1,19 @@ +const path = require('path'); + +module.exports = (Franz, options) => { + const getMessages = () => { + // get new conversations in My Queue + const myQueue = $('.super-nav a.super-nav__item.js-from-super-to-nav[href^="/chat/box:my"] .count').not('.count--gray').text(); + + // get all missed conversations + const missed = $('.super-nav a.super-nav__item.js-from-super-to-nav[href^="/chat/box:missed"] .count').text(); + + // set Franz badge + // myQueue => New conversations in My Queue + // missed => All missed conversations + Franz.setBadge(myQueue, missed); + }; + + // check for new messages every second and update Franz badge + Franz.loop(getMessages); +}; -- cgit v1.2.3-54-g00ecf