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