kayako.ready(function () { kayako.hideLauncher = true // listen for realtime updates kayako.on('unread_messages_count_changed', function (count) { const element = document.getElementById('kayako-unread-counts') if (count > 0) { var suffix = count === 1 ? '' : 's' element.style.display = 'block' element.innerHTML = count + ' new message' + suffix } else { element.style.display = 'none' } }) })
Powered by Dhru Fusion