blob: d66b355d525461d8d082e590b73a3775c6ddff13 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
|
module.exports = Ferdium => {
const getMessages = () => {
const totalNotifications = document.querySelectorAll('#notificationList > .notification').length;
const hasUnread = document.querySelectorAll('#notificationsButton.hasUnread').length > 0;
Ferdium.setBadge(hasUnread ? totalNotifications : 0);
};
Ferdium.loop(getMessages);
};
|