Help:Enabling scripts

From Miraheze Developers Wiki
(Redirected from Enabling scripts)
Jump to navigation Jump to search

MediaWiki offers the ability to enable custom user scripts which can alter the way that things are displayed or work. This wiki has many scripts which can be enabled on your wiki. To enable scripts, follow the following steps.

Enabling[edit]

Basics[edit]

Both JavaScript and CSS scripts can either be loaded for yourself only, for a group (like sysops, bureaucrats) or for the whole wiki on either all skins or only on one skin.

CSS[edit]

CSS scripts can be enabled by following these steps:

  • If you wish to enable them for yourself only on all skins: Add the script as subpage of your user under the name common.css (e.g. if my username is Example, I would add it to User:Example/common.css)
  • If you wish to enable them for yourself only on one skin only (like Vector): Add it to a subpage of your user titled [skinname].css (e.g. Vector.css, Monobook.css, etc.) Note that capitalization is important.
  • If you wish to enable them for a certain group: Add it to the page MediaWiki:Group-[groupname].css (e.g. to load it for bureaucrats only, it would go into MediaWiki:Group-bureaucrat.css).
  • If you wish to enable them for the entire wiki (irregardless of skin): Add it to MediaWiki:Common.css.
  • If you wish to enable them for the entire wiki on a specific skin: Add it to MediaWiki:[skinname].css (e.g. MediaWiki:Vector.css). As with the previous ones, capitalization is important or else it won't work!

JavaScript[edit]

JavaScript (JS) scripts can be enabled by following these steps:

  • If you wish to enable them for yourself only on all skins: Add the script as subpage of your user under the name common.js (e.g. if my username is Example, I would add it to User:Example/common.js)
  • If you wish to enable them for yourself only on one skin only (like Vector): Add it to a subpage of your user titled [skinname].js (e.g. Vector.js, Monobook.js, etc.). Note that capitalization is important.
  • If you wish to enable them for a certain group: Add it to the page MediaWiki:Group-[groupname].js (e.g. to load it for bureaucrats only, it would go into MediaWiki:Group-bureaucrat.js).
  • If you wish to enable them for the entire wiki (irregardless of skin): Add it to MediaWiki:Common.js.
  • If you wish to enable them for the entire wiki on a specific skin: Add it to MediaWiki:[skinname].js (e.g. MediaWiki:Vector.js). Remember, capitalization is important.