1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Setting default jQuery Ajax properties

Discussion in 'XenForo Development Discussions' started by karll, Nov 29, 2014.

  1. karll

    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:
        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.)
  2. karll

    karll Well-Known Member

    Ah, it seems just putting it into e.g. the page_container_js_head template works perfectly.

    Thanks for listening :)

Share This Page