Extension:Javascript

This extension allows you to manage your Javascript files imports from one place. The extension is a single script which you can obtain from Javascript.php and save into a directory called Javascript in your extensions directory and include in your LocalSettings.php file. Set the $wgJavascriptPaths to an array containing all the directories and Javascript files you want added, this must be defined before the include line as in the following example, In this example, the scripts are all located in the same directory as the extension script. The last javascriptToolbox item is a directory containing a number of related Javascript files which will all be imported.

Note that if this extension is included in the LocalSettings after all the other extensions, then those extensions may also add Javascript files to the $wgJavascriptPaths list to be imported.

You can check which scripts have successfully been included by checking the Special:Version page.