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