aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/nextcloud-calendar/webview.js
blob: 84c55f29c6fefabf52bd6c7cf889908477cea7d3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const _path = _interopRequireDefault(require('path'));

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

module.exports = Ferdium => {
  const getMessages = () => {
    const direct = document.querySelectorAll(
      '.notifications .notification-wrapper .notification[object_type="dav"]',
    ).length;

    Ferdium.setBadge(direct);
  };

  Ferdium.loop(getMessages);

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