Jump to: navigation, search

Other languages:
català • ‎Deutsch • ‎English • ‎español • ‎suomi • ‎français • ‎italiano • ‎日本語 • ‎Nederlands • ‎polski • ‎português • ‎português do Brasil • ‎русский • ‎中文
Frontend: $wgAllowUserJs
Allow user JavaScript pages
Introduced in version: 1.3.0 (r7357)
Removed in version: still in use
Allowed values: (boolean)
Default value: false
true until 1.3.10 (r7357)
Other settings: Alphabetical | By function


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 $wgAllowUserCssManual:$wgAllowUserCss allows/disallows users to use their own CSS files.


To enable users to perform their own JavaScript, append the following line to your LocalSettings.phpManual:LocalSettings.php file:

$wgAllowUserJs = true;

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

Important note[edit]

Microsoft Internet Explorer and Mozilla/Firefox allow the embedding of JavaScript into stylesheets using HTC or XBL. So in order to prevent users from defining JavaScript, you need to disable $wgAllowUserCssManual:$wgAllowUserCss as well.

See also[edit]