blob: 00030b086e4dacc8830c9ff5891a1ef6452291c9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
const path = require('path');
module.exports = Franz => {
const getMessages = () => {
const totalNotifications = document.querySelectorAll('#notificationList > .notification').length;
const hasUnread = document.querySelectorAll('#notificationsButton.hasUnread').length > 0;
// set Franz badge
if (hasUnread) {
Franz.setBadge(totalNotifications);
}
};
Franz.loop(getMessages);
};
|