1 2 3 4 5 6 7 8 9 10 11
module.exports = Ferdi => { const getMessages = () => { // get unread messages const count = document.querySelector('#hangout-landing-chat iframe').contentWindow.document.querySelectorAll('.ee').length; // set Ferdi badge Ferdi.setBadge(count); }; Ferdi.loop(getMessages); };