Help:Including additional CSS and JS

You can use the global JavaScript method  to include additional scripts or styles that are not included on your wiki by default. This method will work with local resources (such as "MediaWiki:Wikia.js") or external resources (such as "a script on dev wiki. Using this method will combine all of the articles you need into one request which will reduce file size and web traffic to help make your wiki faster. The files will also be minified.

Usage
To use this method, you will need to provide an options object containing the type of files to include (either "script" or "style") and an array of article names.

For example, if you wanted to import two JavaScript files, one from the local wiki and one from an external wiki, your code would look something like this:

Likewise, if you wanted to include two Stylesheets, one from the local wiki and one from an external wiki, your code would look something like this:

If you only need to include one file, you may use this alternate syntax:

Most users will probably want to include both "script" and "style" in the same js file. To do so, you must make separate declarations, like so:

Advanced Usage
is mainly a convenience function. Its job is to build a proper URL, perform sanity checks and provide you with error messages. But you do not truly need  to build the URL. You can do so yourself.

The URLs look like this:

The ResourceLoader is a complex beast and there are a few parameters you might want to add but these ones are essential:

You could use such an URL in an @import rule in a CSS file:

or with $.getScript in a JS file:

nl:Help:Bijkomende JavaScript en CSS laden