Setting default jQuery Ajax properties

karll

Well-known member
Is there a good way to override the default jQuery Ajax properties used in Xenforo?

Apparently, in jQuery you can do the following to set default Ajax properties:
Code:
$.ajaxSetup({
    type: "POST",
    data: {},
    ...
});

... so I guess I want to insert something like that somewhere.

At the moment, one bad option that comes to mind would be to directly edit js/xenforo/xenforo.js, but I would obviously like to avoid that. It there a cleaner alternative?

(I'm not developing an add-on, just making changes to my own forum. Though happy to try to write an add-on, if that's what is required.)
 
Ah, it seems just putting it into e.g. the page_container_js_head template works perfectly.

Thanks for listening :)
 
Back
Top Bottom