← view more API documentation

api.box.onShow

Whenever the chatbox is shown (unhidden), the given callback will be triggered.

Examples

You could indicate in your buddy list when a visitor is looking at a shown (visible) chatbox:

olark('api.box.onShow', function() {
    olark('api.chat.updateVisitorNickname', {snippet: "is-visible"})
})

Discussion

Feel free to propose good uses for this method, or even drop us some suggestions for improvement! You can also join our mailing list to collaborate with other developers and get updates from us.