Wikipedia:Gadget
Wikipedia programs
Bots ExtensionsGadgets RepositoriesScripts User scripts Scripts listScripts ranking Script requests GuideTools
This is an information page.
It is not one of Wikipedia's policies or guidelines, but rather intends to describe some aspect(s) of Wikipedia's norms, customs, technicalities, or practices. It may reflect varying levels of consensus and vetting.
Warning: You take full responsibility for any action you perform using any gadget. You must understand Wikipedia policies and use this tool within these policies, or risk being blocked from editing.
Wikipedia data structure
Namespaces
Subject namespacesTalk namespaces
0(Main/Article)Talk1
2UserUser talk3
4WikipediaWikipedia talk5
6FileFile talk7
8MediaWikiMediaWiki talk9
10TemplateTemplate talk11
12HelpHelp talk13
14CategoryCategory talk15
100PortalPortal talk101
118DraftDraft talk119
710TimedTextTimedText talk711
828ModuleModule talk829
Deprecated
2300GadgetGadget talk2301
2302Gadget definitionGadget definition talk2303
Virtual namespaces
-1Special
-2Media
A Wikipedia gadget is a JavaScript program and/or a CSS snippet that can be enabled simply by checking an option in your preferences. The gadget's function is provided by the MediaWiki extension Extension:Gadgets.
Many gadgets started out as user scripts. Once a user script is approved as a gadget, it is removed from Wikipedia:User scripts/List.
General criteria for gadgets
In order to be deployed on the English language Wikipedia, gadgets should generally pass the following conditions:
  1. Gadgets must work if just included with no further configuration. They can be configurable via personal common.js, but must work unconfigured.
  2. Gadgets must be compatible with all major browsers, i.e. they must not terminate with errors.
  3. Gadgets should be functional in most major browsers (cross-browser compatibility). Exceptions must be clearly stated.
  4. Duplication of gadgets should only be made if it is reasonable.
  5. Collections of scripts should be split if they have disparate functions.
  6. Gadgets requiring permissions must be marked and must fail gracefully if the permissions aren't present.
  7. Gadgets only working in some skins must be marked as such if that data is available.
Proposals
New gadgets should be proposed at the technical Village Pump.
Historically, new gadgets were proposed at a subpage of this page, but that page was marked historical due to low participation. Also, existing WikiProject User scripts used to be evaluated for conversion to gadgets, but that process has also been marked historical.
Installation
Gadgets can be installed after discussion at the technical section of the village pump by interface administrators in the following way:
  1. Add the header below and the script code to MediaWiki:Gadget-​scriptname​.js
  2. Optionally, add the header below and CSS code to MediaWiki:Gadget-​scriptname​.css
  3. Add a script description to MediaWiki:Gadget-​scriptname​. Please link to the script home and/or help page and state browser requirements if needed.
  4. Add to MediaWiki:Gadgets-definition under the appropriate heading
    * scriptname|scriptname.js​[|scriptname.css|otherscript.js|...]
The gadget should now appear on Special:Gadgets.
Comments
Comments or warnings can be added to the gadget description templates in two ways:
Comments added in this way will be automatically discarded during the page creation process.
Header
The following header is to be added to the gadget files:
/* _____________________________________________________________________________ * | | * | === WARNING: GLOBAL GADGET FILE === | * | Changes to this page affect many users. | * | Please discuss changes on the talk page or on [[WT:Gadget]] before editing. | * |_____________________________________________________________________________| * * Imported from version XXXX as of DATE from [[SCRIPT_SOURCE]] * SHORT_DESCRIPTION, see [[SCRIPT_HOME_PAGE]] */
Default gadgets
A gadget with default keyword is enabled for all Wikipedia visitors and only registered users can disable it.
A gadget with [default|rights=minoredit] description would be automatically enabled only for registered users.
Currently installed gadgets
Users can browse a list of all available gadgets in the gadgets section of their preferences page:
Preferences → Gadgets
See Special:Gadgets for a list of all active gadgets and links to their script files.
See also
Last edited on 8 July 2021, at 14:43
Content is available under CC BY-SA 3.0 unless otherwise noted.
Privacy policy
Terms of Use
Desktop
HomeRandomNearbyLog inSettingsDonateAbout WikipediaDisclaimers
LanguageWatchEdit