1 2 3 4 5 6 7 8 9 10 11
module.exports = Ferdium => { const getMessages = () => { const direct = document.querySelectorAll( '.notifications .notification-container .notification-wrapper li .notification', ).length; Ferdium.setBadge(direct); }; Ferdium.loop(getMessages); };