Manual:$wgAllowUserJs
<translate> Security</translate>: $wgAllowUserJs | |
---|---|
Allow user JavaScript pages |
|
<translate> Introduced in version:</translate> | 1.3.0 (r4194) |
<translate> Removed in version:</translate> | <translate> still in use</translate> |
<translate> Allowed values:</translate> | (boolean) |
<translate> Default value:</translate> | false (1.3.10+, r7357)true (1.3.0-1.3.9) |
<translate> Other settings:</translate> <translate> Alphabetical</translate> | <translate> By function</translate> |
Description
Enables/disables user JavaScript pages. This enables a lot of neat customizations, but may increase security risk to users and server load. (Personal scripts can only be edited by the owner and interface administrators, but they may still serve as vectors for various social engineering based attacks.)
A related setting $wgAllowUserCss
allows/disallows users to use their own CSS files.
Usage
To enable users to perform their own JavaScript, append the following line to your LocalSettings.php file:
$wgAllowUserJs = true;
To disable this function set $wgAllowUserJs
to false or delete whole line.
Important note
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 $wgAllowUserCss
as well.