1 2 3 4 5 6 7 8 9 10 11 12
module.exports = Ferdi => { const getMessages = () => { const notifications = document.querySelector( '.c-notifications-dropdown__count', ); if (notifications) { Ferdi.setBadge(notifications.textContent); } }; Ferdi.loop(getMessages); };