aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/nomadlist/webview.js
blob: a754a5f9578d9763d5659f2dad6a1ea9e550c4fa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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);
};