Help:Gadgets/options

Gadgets allow users to pick JavaScript (JS) or CSS-based "gadgets" that other community users provide. These are usually configured in MediaWiki:Gadgets-definition using the following syntax, where each field is separated by :

The first field sets up the internal name of the gadget. The other fields are  pages that will be loaded for the user. In the above example, mygadget:
 * mygadget|mygadget.js|mygadget.css
 * has definition text at [ MediaWiki:Gadget-mygadget]
 * will load [ MediaWiki:Gadget-mygadget.js] and [ MediaWiki:Gadget-mygadget.css].

It's possible to also configure options in the first field of your gadgets.

Examples:


 * mygadget[ResourceLoader]|mygadget.js|mygadget.css
 * mygadget[ ResourceLoader | rights=foo, bar ] | mygadget.js | mygadget.css

Option format
[option1 | option2 | ... optionN] whitespace can be omitted. Single option can either consist of single option name (in this case it is a flag option), or contain a comma-separated list of values: option = value1, value2, value3

To enable it by default use " ":


 * mygadget[ResourceLoader|default|dependencies=mediawiki.util]|mygadget.js|mygadget.css

To make the gadget available only to users with appropriate permissions, set the  option. For example,


 * mygadget[rights=foo,bar]|mygadget.js|mygadget.css

Available options
Here's all the gadget options available: