Doom Wiki:Gadget

A gadget is a and/or  snippet that can be enabled simply by checking an option in your preferences. The gadgets functionality is provided by the MediaWiki extension Extension:Gadgets.

General criteria for gadgets
In order to be deployed on the Doom Wiki, gadgets should generally pass the following conditions:


 * 1) Gadgets must work if just included with no further configuration. They can be configurable, but must work without explicit configuration.
 * 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's reasonable.
 * 5) Collections of scripts should be applied as own entities. (No collection of scripts dumped as a gadget, unless the collection is specially defined as an own entity.)
 * 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.

Proposals
|Proposals: Discuss the addition of scripts as gadgets.

Installation
Gadgets can be installed after discussion at by 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  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|...]
 * 5) Update the table of installed gadgets below

The gadget should now appear on Special:Gadgets.

Comments
Comments or warnings can be added to the gadget description templates in two ways:


 * noinclude tag (visible on description page with links):  
 * HTML comments (visible in source text only):  

Comments added in this way will be automatically discarded during the page creation process.

Header
The following header should be added to the gadget files, with modifications as necessary: /* _____________________________________________________________________________ * |                                                                             | * |                    === WARNING: GLOBAL GADGET FILE ===                      | * |                 Changes to this page affect many users. | * |          Please discuss changes on the talk page before editing. | * |_____________________________________________________________________________| * * Imported from SCRIPT_SOURCE as of DATE * SHORT_DESCRIPTION, see SCRIPT_HOME_PAGE */

Default gadgets
A gadget with  keyword is enabled for all visitors and only registered users can disable it.

A gadget with  description would be automatically enabled only for registered users.