විකිපීඩියා:Gadget
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.
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 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.
Proposals
සංස්කරණයProposals: Discuss the addition of user scripts as gadgets.
Evaluation: Evaluate existing WikiProject User scripts scripts as potential gadgets.
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.
Comments
සංස්කරණයComments or warnings can be added to the gadget description templates in two ways:
- noinclude 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.
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]] */
Currently installed gadgets
සංස්කරණයParts of this විකිපීඩියා පිටුව (those related to section) need to be updated. වත්මන් සිදුවීම් වලින් සහ නවතම තොරතුරු වලින් මෙම විකිපීඩියා පිටුව යාවත් කාලීන කිරීමට කාරුණික වන්න. (April 2010) |
See also
සංස්කරණය- 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
- mw:Extension:Gadgets, the Mediawiki gadget extension page
- Template:Bug report, template message asking for detailed bug-related information