blob: c1e6b7f7b64f019632467534d1c20e3764e9c667 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
module.exports = (Ferdium) => {
const getMessages = () => {
// get new conversations in My Queue
const myQueue = $('.super-nav a.super-nav__item.js-from-super-to-nav[href^="/chat/box:my"] .count').not('.count--gray').text();
// get all missed conversations
const missed = $('.super-nav a.super-nav__item.js-from-super-to-nav[href^="/chat/box:missed"] .count').text();
// set Ferdium badge
// myQueue => New conversations in My Queue
// missed => All missed conversations
Ferdium.setBadge(myQueue, missed);
};
Ferdium.loop(getMessages);
};
|