blob: a82a78db14bd76d9aad0b17df02fba7d40e1cfa4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
module.exports = (Ferdi) => {
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 Ferdi badge
// myQueue => New conversations in My Queue
// missed => All missed conversations
Ferdi.setBadge(myQueue, missed);
};
Ferdi.loop(getMessages);
};
|