aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/fleep/webview.js
blob: 85b5365d7be4fe86b3210fa9b5b6e29a2a04ab3c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
const _path = _interopRequireDefault(require('path'));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

module.exports = Ferdi => {
  const getMessages = () => {
    // Count number of conversations or teams with unread messages
    const count = document.querySelectorAll('.unread-count').length;
    Ferdi.setBadge(count, 0);
  };

  Ferdi.loop(getMessages);

  Ferdi.injectCSS(_path.default.join(__dirname, 'service.css'));
};