blob: c1e6326c3303c882681b927f85415b5d5c2fe950 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
module.exports = Ferdium => {
const getMessages = () => {
let indirect = document.querySelectorAll('.new-messages');
let direct = 0;
for (const badge of document.querySelectorAll('.people-pane .badge')) {
direct += Ferdium.safeParseInt(badge.textContent);
}
Ferdium.setBadge(direct, indirect);
};
Ferdium.loop(getMessages);
};
|