Manual:$wgAllowUserJs

Description
Enables/disables user Javascript pages. This enables a lot of neat customizations, but may increase security risk to users and server load.

A related setting $wgAllowUserCss allows/disallows users to use their own CSS files.

Usage
To enable users to perform their own JavaSript, set to localsettigs.php a new line:

To disable this function set $wgAllowUserJs false or, delete whole line.

Important Note
Microsoft Internet Explorer and Mozilla/Firefox allow the embedding of Java Script into Stylesheets using HTC or XBL. So in order to prevent users from defining Java Script, you need to disable $wgAllowUserCss as well.