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