blob: 0a3d9f348982b2b6ba3cdecd78dce4bc79e17ea1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
module.exports = Ferdi => {
const getMessages = () => {
const element = document.querySelector('[href="/notifications"] > div');
const content = window.getComputedStyle(element, ':after').getPropertyValue('content').match(/\d+/);
const notifications = Number(content);
Ferdi.setBadge(notifications);
};
Ferdi.loop(getMessages);
};
|