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/podio/webview.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 recipes/podio/webview.js (limited to 'recipes/podio/webview.js') diff --git a/recipes/podio/webview.js b/recipes/podio/webview.js new file mode 100644 index 0000000..b1ddc4f --- /dev/null +++ b/recipes/podio/webview.js @@ -0,0 +1,22 @@ +const path = require('path'); + +module.exports = (Franz, options) => { + const getMessages = () => { + // get unread messages + const updates = document.getElementsByClassName('counter')[0].innerHTML; + + // get conversations in 'My Inbox' + //const inbox = document.getElementById('franz').getAttribute('data-inbox'); + + // set Franz badge + // updates => active unread count + // inbox => passive unread count + Franz.setBadge(updates, 0); + }; + + // inject franz.css stylesheet + Franz.injectCSS(path.join(__dirname, 'css', 'franz.css')); + + // check for new messages every second and update Franz badge + Franz.loop(getMessages); +}; -- cgit v1.2.3-54-g00ecf