blob: b3a78cf00a33f8f04bc2e9467df8fe653c498088 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
module.exports = Ferdi => {
const getMessages = () => {
let unread = 0;
const notificationBadge = document.querySelectorAll('.unreadcount')[0];
if (notificationBadge != undefined) {
unread = Ferdi.safeParseInt(notificationBadge.textContent);
}
Ferdi.setBadge(unread);
};
Ferdi.loop(getMessages);
};
|