aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/podio
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/podio')
-rw-r--r--recipes/podio/index.js3
-rw-r--r--recipes/podio/package.json2
-rw-r--r--recipes/podio/webview.js22
3 files changed, 9 insertions, 18 deletions
diff --git a/recipes/podio/index.js b/recipes/podio/index.js
index 46f936f..23607bd 100644
--- a/recipes/podio/index.js
+++ b/recipes/podio/index.js
@@ -1,2 +1 @@
1// just pass through Franz module.exports = Ferdi => Ferdi;
2module.exports = Franz => Franz;
diff --git a/recipes/podio/package.json b/recipes/podio/package.json
index 59fc0b4..3985a1a 100644
--- a/recipes/podio/package.json
+++ b/recipes/podio/package.json
@@ -1,7 +1,7 @@
1{ 1{
2 "id": "podio", 2 "id": "podio",
3 "name": "podio", 3 "name": "podio",
4 "version": "1.0.2", 4 "version": "1.1.0",
5 "license": "MIT", 5 "license": "MIT",
6 "config": { 6 "config": {
7 "serviceURL": "https://podio.com", 7 "serviceURL": "https://podio.com",
diff --git a/recipes/podio/webview.js b/recipes/podio/webview.js
index 2b1ed2a..1bfa60d 100644
--- a/recipes/podio/webview.js
+++ b/recipes/podio/webview.js
@@ -1,22 +1,14 @@
1const path = require('path'); 1const _path = _interopRequireDefault(require('path'));
2 2
3module.exports = (Franz, options) => { 3function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4
5module.exports = (Ferdi) => {
4 const getMessages = () => { 6 const getMessages = () => {
5 // get unread messages
6 const updates = document.getElementsByClassName('counter')[0].innerHTML; 7 const updates = document.getElementsByClassName('counter')[0].innerHTML;
7 8 Ferdi.setBadge(updates, 0);
8 // get conversations in 'My Inbox'
9 // const inbox = document.getElementById('franz').getAttribute('data-inbox');
10
11 // set Franz badge
12 // updates => active unread count
13 // inbox => passive unread count
14 Franz.setBadge(updates, 0);
15 }; 9 };
16 10
17 // inject franz.css stylesheet 11 Ferdi.loop(getMessages);
18 Franz.injectCSS(path.join(__dirname, 'css', 'franz.css'));
19 12
20 // check for new messages every second and update Franz badge 13 Ferdi.injectCSS(_path.default.join(__dirname, 'css', 'franz.css'));
21 Franz.loop(getMessages);
22}; 14};