aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/chatra
diff options
context:
space:
mode:
authorLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-08-27 18:13:24 +0530
committerLibravatar GitHub <noreply@github.com>2021-08-27 18:13:24 +0530
commit155c4b832281348c16be1f4ef667e6e23dbf1bd8 (patch)
treed144e2de2e6c7fb2e334246e8a4aecdbeb08ef8d /recipes/chatra
parentdocs: fixed template file for creating recipe. (diff)
downloadferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.tar.gz
ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.tar.zst
ferdium-recipes-155c4b832281348c16be1f4ef667e6e23dbf1bd8.zip
chore: normalized all recipes to ensure compatibility with es6 (#639)
- Removed some calls to set badge with '0' all the time. - Removed all 'sourceMaps' since they are all outdated atm.
Diffstat (limited to 'recipes/chatra')
-rw-r--r--recipes/chatra/index.js3
-rw-r--r--recipes/chatra/package.json2
-rw-r--r--recipes/chatra/webview.js11
3 files changed, 6 insertions, 10 deletions
diff --git a/recipes/chatra/index.js b/recipes/chatra/index.js
index 46f936f..23607bd 100644
--- a/recipes/chatra/index.js
+++ b/recipes/chatra/index.js
@@ -1,2 +1 @@
1// just pass through Franz module.exports = Ferdi => Ferdi;
2module.exports = Franz => Franz;
diff --git a/recipes/chatra/package.json b/recipes/chatra/package.json
index 482765f..3cea500 100644
--- a/recipes/chatra/package.json
+++ b/recipes/chatra/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "chatra", 2 "id": "chatra",
3 "name": "chatra", 3 "name": "chatra",
4 "version": "1.0.2", 4 "version": "1.1.0",
5 "license": "MIT", 5 "license": "MIT",
6 "config": { 6 "config": {
7 "serviceURL": "https://app.chatra.io/", 7 "serviceURL": "https://app.chatra.io/",
diff --git a/recipes/chatra/webview.js b/recipes/chatra/webview.js
index a8a611c..a82a78d 100644
--- a/recipes/chatra/webview.js
+++ b/recipes/chatra/webview.js
@@ -1,6 +1,4 @@
1const path = require('path'); 1module.exports = (Ferdi) => {
2
3module.exports = (Franz, options) => {
4 const getMessages = () => { 2 const getMessages = () => {
5 // get new conversations in My Queue 3 // get new conversations in My Queue
6 const myQueue = $('.super-nav a.super-nav__item.js-from-super-to-nav[href^="/chat/box:my"] .count').not('.count--gray').text(); 4 const myQueue = $('.super-nav a.super-nav__item.js-from-super-to-nav[href^="/chat/box:my"] .count').not('.count--gray').text();
@@ -8,12 +6,11 @@ module.exports = (Franz, options) => {
8 // get all missed conversations 6 // get all missed conversations
9 const missed = $('.super-nav a.super-nav__item.js-from-super-to-nav[href^="/chat/box:missed"] .count').text(); 7 const missed = $('.super-nav a.super-nav__item.js-from-super-to-nav[href^="/chat/box:missed"] .count').text();
10 8
11 // set Franz badge 9 // set Ferdi badge
12 // myQueue => New conversations in My Queue 10 // myQueue => New conversations in My Queue
13 // missed => All missed conversations 11 // missed => All missed conversations
14 Franz.setBadge(myQueue, missed); 12 Ferdi.setBadge(myQueue, missed);
15 }; 13 };
16 14
17 // check for new messages every second and update Franz badge 15 Ferdi.loop(getMessages);
18 Franz.loop(getMessages);
19}; 16};