include 3rd party js file

Kintaro

Well-known member
I'm releasing an addon that use a 3rd party js file.
The js file will be included only on a specific template.

In my testing env I'm loading it from js/myname/myaddon/3rdparty.js

Is it ok like that or do you think it have to be loaded from js/3rdparty/3rdparty.js so other devs can rely on it without loading it twice or more?
 
I'd say it would be safer to just load the stuff you need from your own add-on directory. Even if another add-on exists already that needs the same functionality, what happens when he other add-on wants to start using a new version? What if you do and it breaks another add-on using it that isn't compatible.

Sometimes the joined up thinking is a nice thought, but can often lead to more problems than it solves.

Also, I would urge you to consider first of all whether the XenForo framework already offers the said feature. It's not uncommon to see people using the jQuery Cookie plugin, but this is silly because XenForo is already capable of setting and getting cookies.

That's just an example, but definitely worth checking out in case XenForo (or jQuery Tools) has something built in already.
 
Thank you Chris.

Is a little "derivated" of jQuery so I think is not included on xenForo's framework.
I'm going to include it in my js add-on directory.
 
Top Bottom