1 2 3 4 5 6 7 8
module.exports = Ferdium => { const getMessages = function getMessages() { const notificationsCounter = document.querySelector('.js-notificationsCounter'); Ferdium.setBadge(Ferdium.safeParseInt(notificationsCounter.textContent)); }; Ferdium.loop(getMessages); };