ଉଇକିପିଡ଼ିଆ:Gadget

A Wikipedia gadget is a JavaScript and/or a CSS 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

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'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 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.
Changes: Discuss the changes you want to make.

Installation

Gadgets can be installed after discussion at Wikipedia:Gadget/proposals 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 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|...]
  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): <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]] */

Default gadgets

A gadget with default keyword is enabled for all Wikipedia visitor 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

NameFunctionScript:
Homepage, Source, Maintainer
Gadget:
Version, Description, Script, CSS
Browsing Gadgets
Page view statisticsMediaWiki:Gadget-pageviewstats: Add a "Page view statistics" link at the Tool section of the sidebar. To see how many hits the page gets.MediaWiki:Gadget-pageviewstats.js
Rollback to user ContMediaWiki:Gadget-modrollback: After rolling back an edit, automatically open the contributions of the user rolled back.MediaWiki:Gadget-modrollback.js
Navigation popupsMediaWiki:Gadget-Navigation_popups: Navigation popups, article previews and editing functions popup when hovering over linksWikipedia:Tools/Navigation_popupsMediaWiki:Gadget-popups.js
MediaWiki:Gadget-navpop.css
ExlinksMediaWiki:Gadget-exlinks: Open external links in a new tab/windowMediaWiki:Gadget-exlinks.js
TeahouseMediaWiki:Gadget-teahouse: ମିଡ଼ିଆଉଇକି:Gadget-teahouseteahouse project
User:Odisha1, User:Ansumang
MediaWiki:Gadget-teahouse.js
MediaWiki:Gadget-teahouse/content.js
MediaWiki:Gadget-teahouse.css
Dot's syntax highlighterMediaWiki:Gadget-DotsSyntaxHighlighter: Dot's syntax highlighter, make syntax stand out colorfully in the edit box. Works best in Firefox, works almost all of the time in Opera, and works most of the time in Chrome. Should not be used with the browser's page zoom feature.mw:User:Remember the dot/Syntax highlighter
mw:User:Remember the dot/Syntax highlighter.js
MediaWiki:Gadget-DotsSyntaxHighlighter.js
Preview and Changes buttonMediaWiki:Gadget-preview: Preview, an ajax tool that adds Preview and Changes buttons.MediaWiki:Gadget-preview.js
HotCatMediaWiki:Gadget-HotCat: HotCat, easily add / remove / change a category on a page, with name suggestion [example]MediaWiki:Gadget-HotCat.js
ProveItMediaWiki:Gadget-ProveIt: ProveIt is a powerful GUI tool for viewing, editing, adding, and inserting referencesProveItMediaWiki:Gadget-ProveIt.js
MediaWiki:Gadget-ProveIt.css
wikEdMediaWiki:Gadget-wikEd: wikEd, a full-featured integrated text editor for Firefox, Safari, and Google Chrome. Please read the help page for usage instructions.wikEd
User:Cacycle/wikEd.js
User:Cacycle
(Loads current version)
MediaWiki:Gadget-wikEd.js
-
Microsoft Indic Language Input Tool for OdiaMediaWiki:Gadget-microsoft-ilit: Microsoft Indic Language Input Tool for Odia (Supported on Windows Vista and Windows 7 only).User:AnsumangMediaWiki:Gadget-microsoft-ilit.js
Purge TabMediaWiki:Gadget-purgetab: ପର୍ଜ(purge) କରିବା ପାଇଁ ଲିଙ୍କ ରଖିବେMediaWiki:Gadget-purgetab.js
addsection +MediaWiki:Gadget-addsection-plus: Change the "new section" tab text to instead display the much narrower "+".MediaWiki:Gadget-addsection-plus.js
Extra Tab; such as MoveMediaWiki:Gadget-MenuToTabs: Display the drop-down menus for page actions, such as 'Move', as tabs (Vector skin).MediaWiki:Gadget-MenuToTabs.js
Drop-down menusMediaWiki:Gadget-dropdown-menus: Add page and user options to drop-down menus on the toolbar. Works in Vector, Monobook and Modern skins (documentation)User:Haza-w/Drop-down menus
User:Haza-w/cactions.js
User:Haza-w
MediaWiki:Gadget-dropdown-menus.js
MediaWiki:Gadget-dropdown-menus.css
MenuTabsToggleMediaWiki:Gadget-MenuTabsToggle: Enable toggling between tabs and dropdown menus in Vector.User:Edokter/MenuTabsToggle.js
User:Edokter
MediaWiki:Gadget-MenuTabsToggle.js
MediaWiki:Gadget-MenuTabsToggle.css
Sysop DetectorMediaWiki:Gadget-sysopdectector: Sysop Detector - On userpages, display's a user's flags (sysop, rollbacker, etc) in the title. Also highlights blocked editors.MediaWiki:Gadget-sysopdectector.js
EdittopMediaWiki:Gadget-edittop: Add an [edit] link for the lead section of a pageUser:Alex Smotrov/edittop.js
User:Alex Smotrov
MediaWiki:Gadget-edittop.js
Article assessmentMediaWiki:Gadget-metadata: 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
MediaWiki:Gadget-metadata.js
HistoryNumDiffMediaWiki:Gadget-HistoryNumDiff: HistoryNumDiff shows the number of characters added or removed, rather than the size of the revision. [Illustration]fr:MediaWiki:Gadget-HistoryNumDiff.js
Author: User:The RedBurn.
English Wikipedia uploader: User:Superm401.
MediaWiki:Gadget-HistoryNumDiff.js
RightEditLinksMediaWiki:Gadget-righteditlinks: Move section [edit] links to the right side of the screen.English WikipediaMediaWiki:Gadget-righteditlinks.css
CharInsertMediaWiki:Gadget-charinsert‎: CharInsert: add a toolbar under the edit window for quickly inserting wiki markup and special characters (troubles?)English WikipediaMediaWiki:Gadget-charinsert‎.js
MediaWiki:Gadget-charinsert‎.css
TopAlertMediaWiki:Gadget-topalert: Display a floating alert when I have new talk page messages.English WikipediaMediaWiki:Gadget-topalert.js
MediaWiki:Gadget-topalert.css

Gadgets have been removed (Deprecated)

NameFunctionScript:
Homepage, Source, Maintainer
Gadget:
Version, Description, Script, CSS
Sans-serifMediaWiki:Gadget-textareasansserifnow Default; Special:Preferences#mw-prefsection-editingMediaWiki:Gadget-textareasansserif.css
RefToolbarMediaWiki:Gadget-refToolbar, en:Wikipedia:RefToolbarDefault at MediaWiki:Common.js/edit.js
To disable this script, add
refToolbarInstalled = 'bypass'; to Special:Mypage/vector.js or Special:Mypage/common.js.
Still in use:MediaWiki:RefToolbarBase.js
MediaWiki:RefToolbar.js
MediaWiki:RefToolbarNoDialogs.js
MediaWiki:RefToolbarLegacy.js
MediaWiki:RefToolbarMessages-en.js
MediaWiki:RefToolbarMessages-or.js
MediaWiki:RefToolbarConfig.js
unused:MediaWiki:RefToolbarLocal.js
MediaWiki:Gadget-refToolbar.js
LeftEditLinksMediaWiki:Gadget-lefteditlinks: Moves edit links next to the section headers (documentation)User:Drilnoth/lefteditlinks.js/doc
User:Drilnoth/lefteditlinks.js
MediaWiki:Gadget-lefteditlinks.js

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
  • Wikipedia:Database reports/User preferences, provides statistics on gadget usage
  • mw:Extension:Gadgets, the Mediawiki gadget extension page
  • Template:Bug report, template message asking for detailed bug-related information