blob: cd3afedaeb150febdc1cb77b8602f51a93a231d3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import path from 'path';
module.exports = (Franz) => {
const getMessages = function getMessages() {
// get unread messages
const count = document.querySelectorAll('.guilds-wrapper .badge').length;
// set Franz badge
Franz.setBadge(count);
};
// check for new messages every second and update Franz badge
Franz.loop(getMessages);
// Hide download message
Franz.injectCSS(path.join(__dirname, 'service.css'));
};
|