blob: 39e293db105859fba1dd9d0cbb6eafcf8ec07b32 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
module.exports = (Ferdi) => {
function getMessages() {
let directCount = 0;
const element = document.querySelector('.ws-navigation-button__indicator.ws-navigation-button-indicator');
if (element) {
directCount = Ferdi.safeParseInt(element.innerText);
}
Ferdi.setBadge(directCount);
}
Ferdi.loop(getMessages);
};
|