blob: 7f99509c096aa4c865832f5de4bfa48c34bcad29 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
module.exports = Ferdi => {
// Tweetdeck redirect fix
Ferdi.ipcRenderer.on('redirect-url', (event, url) => {
window.location.assign(url);
});
const getMessages = () => {
const elements = document.querySelectorAll('.msg-unread-count');
let count = 0;
if (elements[0]) {
count = Ferdi.safeParseInt(elements[0].textContent);
}
Ferdi.setBadge(count);
};
Ferdi.loop(getMessages);
};
|