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

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

module.exports = Ferdi => {
  const getMessages = function getMessages() {
    const unread = document.querySelectorAll('.header__bell-wrapper_unread');
    Ferdi.setBadge(unread.length > 0 ? 1 : 0);
  };

  Ferdi.loop(getMessages);
};