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/nomadlist/webview.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 recipes/nomadlist/webview.js (limited to 'recipes/nomadlist/webview.js') diff --git a/recipes/nomadlist/webview.js b/recipes/nomadlist/webview.js new file mode 100644 index 0000000..a754a5f --- /dev/null +++ b/recipes/nomadlist/webview.js @@ -0,0 +1,21 @@ +const path = require('path'); + +module.exports = (Franz, options) => { + const getMessages = () => { + // get unread messages + // const updates = document.getElementById('franz').getAttribute('data-unread'); + const count = $(".unread").length; + Franz.setBadge(count); + + // 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, inbox); + }; + + // check for new messages every second and update Franz badge + Franz.loop(getMessages); +}; \ No newline at end of file -- cgit v1.2.3-70-g09d2