blob: b64727a7b45815c35c04ce63dacf016d4faf5567 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
module.exports = Ferdium => {
const getMessages = () => {
let direct = 0;
const badgeDiv = document.querySelector(
'.notion-sidebar-container > div > div > div > :nth-child(4) > :nth-child(2) > div > :nth-child(3) > div > div',
);
if (badgeDiv) {
direct = Ferdium.safeParseInt(badgeDiv.textContent);
}
Ferdium.setBadge(direct);
};
Ferdium.loop(getMessages);
};
|