Extend Xenforo.Ajax

I have a simple question,

I am passing back a new variable in all ajax json calls and added the new column "_visitor_messagesUnread".

All ajax calls that update the conversations and alerts has this new field.


I then want to update XenForo.balloonCounterUpdate for this section (in this case groups)

Other then editing js/xenforo/xenforo.js, is there a way to extend or overwrite xenforo.ajax so i can add my custom code for the necessary call backs & updates?

Thanks gents


XenForo developer
Staff member
We trigger a XFAjaxSuccess event on the document which should have the data you need passed into it.