blob: f9aead4fe9bed2ab1e9d4e76f370732a7cd73408 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
module.exports = Ferdium => {
const getMessages = () => {
const directElements = document.querySelectorAll('.unreadcount');
let direct = 0;
for (const directElement of directElements) {
direct += Ferdium.safeParseInt(directElement.textContent);
}
Ferdium.setBadge(direct);
};
Ferdium.loop(getMessages);
};
|