Commons:Gadget

From Wikimedia Commons, the free media repository
Jump to: navigation, search

Other languages:
Deutsch 30% • ‎English 100% • ‎Esperanto 7% • ‎suomi 40% • ‎français 47% • ‎עברית 30% • ‎日本語 33% • ‎polski 30% • ‎português do Brasil 10% • ‎русский 87%
The Gadget tab of Preferences on French Wikipedia

Gadgets are standard user scripts which extend the functionality of MediaWiki, the software on which Commons runs, and are available to easily install via a user's Preferences. (Other user scripts are available which must be installed manually.) Individual gadgets can be activated or deactivated (some are activated by default) by visiting your Preferences (you must be logged in) and ticking the relevant box. Most gadgets require JavaScript to be enabled in your browser.

Technical details[edit]

Definition[edit]

  • MediaWiki:Gadgets-definition is where gadgets are installed so that they show up in Preferences
    • Gadgets can be restricted to users with certain user rights by adding, for example, rights=delete in the gadget definition. Gadgets are loaded by default (including for users not logged in) by adding default. Gadgets can be restricted to logged-in users with rights=upload.
  • Special:Gadgets provides an overview of installed gadgets, with links to the gadgets' script files

Localization[edit]

Templates[edit]

  • {{Gadget-state}} stores some redundant information about gadgets and should be kept up-to-date. Indicating the default-state of a gadget is requested in Bugzilla49501
  • {{Gadget-desc}} standardises descriptions of gadgets (as displayed in Preferences)

Limitations[edit]

Since MediaWiki 1.18, gadgets (and user CSS/JS) are not loaded on certain special pages, for security reasons. This includes Special:Preferences, breaking the previous means of moving gadgets to other parts of the Preferences. See Bugzilla18186. Bugzilla33220 requests a native MediaWiki replacement for what was previously done in Javascript.

Bugs[edit]

Links[edit]