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