Wikipedia:Gadget
From Wikipedia, the free encyclopedia
A Wikipedia gadget is a JavaScript and/or a CSS snippet that can be enabled simply by checking an option in your Wikipedia preferences. The gadgets functionality is provided by the MediaWiki extension Extension:Gadgets.
Contents |
[edit] General criteria for Gadgets
Gadgets should generally pass the following conditions:
- Gadgets must work if just included with no further configuration. They can be configurable via monobook.js, but must work unconfigured.
- Gadgets must be compatible with all major browsers, i.e. they must not terminate with errors.
- Gadgets should be functional in most major browsers (cross-browser compatibility). Exceptions must be clearly stated.
- Duplication of gadgets should only be made if it's mostly reasonable.
- 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.)
- Gadgets requiring permissions must be marked, and must fail gracefully if the permissions aren't present.
- Gadgets only working in some skins must be marked as such, if that data is available.
[edit] Proposals
Please use Wikipedia:Gadget/proposals for discussing the addition of user scripts as gadgets.
Please see Wikipedia:Gadget/evaluation for an evaluation of the existing WikiProject User scripts scripts as potential gadgets.
[edit] Installation
Gadgets can be installed after discussion at Wikipedia:Gadget/proposals by administrators in the following way:
- Add the header below and the script code to MediaWiki:Gadget-scriptname.js
- Optionally, add the header below and CSS code to MediaWiki:Gadget-scriptname.css
- Add a script description to MediaWiki:Gadget-scriptname. Please link to the script home and/or help page and state browser requirements if needed.
- Add to MediaWiki:Gadgets-definition under the appropriate heading
* scriptname|scriptname.js[|scriptname.css|otherscript.js|...]
- Update the table of installed gadgets below
The gadget should now appear on Special:Gadgets.
[edit] Comments
Comments or warnings can be added to the gadget description templates in two ways:
- noiclude tag (visible on description page with links):
<noinclude> comment </noinclude>
- HTML comments (visible in source text only):
<!-- comment -->
Comments added in this way will be automatically discarded during the page creation process.
[edit] 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 [[Wikipedia_talk:Gadget]] before editing. | // |_________________________________________________________________________________________| // // Imported from version XXXX as of DATE from [[SCRIPT_SOURCE]] // SHORT_DESCRIPTION, see [[SCRIPT_HOME_PAGE]]
[edit] Currently installed gadgets
Name | Function | Script: Homepage, Source, Maintainer |
Gadget: Version, Description, Script, CSS |
---|---|---|---|
Navigation popups | Provides easy access to article previews and several Wikipedia functions in popup windows which appear when you hover the mouse over links. | Wikipedia:Tools/Navigation_popups User:Lupin/popups.js User:Lupin |
Sat Mar 10 21:40:16 UTC 2007 MediaWiki:Gadget-Navigation_popups MediaWiki:Gadget-popups.js MediaWiki:Gadget-navpop.css |
wikEd | A full-featured edit page-integrated text editor for Firefox / Mozilla | wikEd User:Cacycle/wikEd.js User:Cacycle |
0.9.62c, April 6, 2008 MediaWiki:Gadget-wikEd MediaWiki:Gadget-wikEd.js - |
RemoveAccessKeys | Disables browser access keys on Wikipedia pages. | Wikipedia:Tools/Disable access keys Wikipedia:WikiProject User scripts/Scripts/removeAccessKeys ? |
? MediaWiki:Gadget-removeAccessKeys MediaWiki:Gadget-removeAccessKeys.js |
Exlinks (?) | Opens external links in a new tab/window. | ? ? ? |
? MediaWiki:Gadget-exlinks MediaWiki:Gadget-exlinks.js |
Edittop (?) | Adds an [edit] link for the lead section of a page. | ? User:Alex Smotrov/edittop.js User:Alex Smotrov |
2007-06-19T04:28:52 MediaWiki:Gadget-edittop MediaWiki:Gadget-edittop.js |
UTC Live Clock (?) | A clock in the personal toolbar that shows the current time in UTC, and provides a purge link. | ? ? User:AzaToth |
? MediaWiki:Gadget-UTCLiveClock MediaWiki:Gadget-UTCLiveClock.js |
Blackskin | Use a black background with green text on the Monobook skin | ? ? User:Prodego |
? MediaWiki:Gadget-Blackskin MediaWiki:Gadget-Blackskin.css |
Javascript Standard Library | A compatibility library for browsers that lack full support of JavaScript 1.6. | ? ? User:AzaToth |
? MediaWiki:Gadget-JSL MediaWiki:Gadget-JSL.js |
Modern skin compatibility | Compatibility function to run scripts only tested on Monobook on the new Modern skin. Required for using Twinkle or Friendly (along with many other scripts) with the Modern skin. | ? ? ? |
? MediaWiki:Gadget-modernskin-thunks MediaWiki:Gadget-modernskin-thunks.js |
Article assessment | Display an assessment of an article's quality as part of the page header for each article. (documentation) | User:Pyrospirit/metadata User:Pyrospirit/metadata.js User:Pyrospirit |
17:47, 4 May 2008 MediaWiki:Gadget-metadata MediaWiki:Gadget-metadata.js |
addsection + | Change the "new section" tab text to instead display the much narrower "+". | User:Random832 | Mediawiki:Gadget-addsection-plus.js |
[edit] See also
- Wikipedia:Gadget/proposals, discussing the addition of gadgets
- Wikipedia:Gadget/evaluation for an evaluation of the existing user scripts
- Special:Gadgets, lists the installed gadgets similar to the preferences but has edit links
- MediaWiki talk:Gadgets-definition, discussing technical details of making and maintaining gadgets
- Wikipedia:WikiProject User scripts
- mw:Extension:Gadgets, the Mediawiki gadget extension page