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