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

Minified JavaScript

Discussion in 'XenForo Development Discussions' started by Zumega, Dec 20, 2011.

  1. Zumega

    Zumega New Member

    I have made some small modifications to /js/xenforo/full/xenforo.js. This works great in my sandbox running in debug mode. Once I push my changes to production and Xenforo starts using /js/xenforo/xenforo.js my changes are ignored since they are in the minified version. What is the best way to incorporate my changes from /js/full/xenforo.js to /js/xenforo.js?

  2. Brogan

    Brogan XenForo Moderator Staff Member

    Why don't you just minify the modified full js file?

    A quick search on Google results in quite a few sites and apps which will do that.
  3. Zumega

    Zumega New Member

    When I tried that some of the functionality stops and I get JS errors. The main JS error is:
    jQuery Tools is not loaded

    This surprised me since the two files are suppose to be the same. Maybe we missed something when upgrading to 1.1.1
  4. Zumega

    Zumega New Member

    Ok some more digging and I discovered that /js/xenforo/xenforo.js is NOT just a minified version of /js/xenforo/full/xenforo.js. The prior is a minified version of multiple files, so the only part that gets replaced is the last block of JS in that file; this is the minified version of /full/xenforo.js.
  5. digitalpoint

    digitalpoint Well-Known Member

    If that's the case, why would it work when using the non-minified version?
    esbes likes this.
  6. Zumega

    Zumega New Member

    The non-minified version only works in debug mode.

Share This Page