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