Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 General criteria for gadgets  





2 Proposals  





3 Installation  



3.1  Comments  





3.2  Header  





3.3  Default gadgets  



3.3.1  Criteria  





3.3.2  Template gadgets  









4 Currently installed gadgets  





5 Pros and cons of changing a user script to a gadget  



5.1  Pros  





5.2  Cons  







6 See also  














Wikipedia:Gadget






Azərbaycanca

Беларуская
Беларуская (тарашкевіца)
Dolnoserbski
Eesti
Esperanto
Euskara
فارسی
Français
Galego
ГӀалгӀай

Hornjoserbsce
Bahasa Indonesia
Italiano
עברית
Қазақша
Latina
Македонски
Bahasa Melayu
Nederlands

Нохчийн
Norsk bokmål
ି
Português
Română
Русский
Саха тыла

Simple English
کوردی
Српски / srpski
Suomi
Тоҷикӣ
Українська


 

Edit links
 









Project page
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 




In other projects  



Wikimedia Commons
Meta-Wiki
Wiktionary
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 

(Redirected from Wikipedia:GADGETS)

  • e
  • Namespaces
    Subject namespaces Talk namespaces
    0 (Main/Article) Talk 1
    2 User User talk 3
    4 Wikipedia Wikipedia talk 5
    6 File File talk 7
    8 MediaWiki MediaWiki talk 9
    10 Template Template talk 11
    12 Help Help talk 13
    14 Category Category talk 15
    100 Portal Portal talk 101
    118 Draft Draft talk 119
    710 TimedText TimedText talk 711
    828 Module Module talk 829
    Former namespaces
    108 Book Book talk 109
    442 Course Course talk 443
    444 Institution Institution talk 445
    446 Education Program Education Program talk 447
    2300 Gadget Gadget talk 2301
    2302 Gadget definition Gadget definition talk 2303
    2600 Topic 2601
    Virtual namespaces
    -1 Special
    -2 Media
    Current list (API call)

    AWikipedia 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 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[edit]

    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.

    Gadgets that are marked as default and load for large groups of users have additional criteria they need to conform to.

    Proposals[edit]

    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[edit]

    Gadgets can be installed after discussion at the technical section of the village pumpbyinterface 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[edit]

    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[edit]

    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[edit]

    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.

    Criteria[edit]

    Gadgets that are enabled by default for all users have to comply with stricter rules. These are essentially the same rules that apply to all default shipped code. This is because users have no active choice in them being enabled and the gadgets can impact the performance, security and stability of the entire website. These gadgets should:

    This list should not be considered exhaustive.

    Template gadgets[edit]

    Template gadgets are a special category of default gadgets. These gadgets only run on pages in explicit trigger categories, generally controlled by adding a template to a page. Trigger categories should be move-protected as they are integrated with the definition.

    Currently installed gadgets[edit]

    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.

    Pros and cons of changing a user script to a gadget[edit]

    Pros[edit]

    Especially once a user script has a lot of users...

    Cons[edit]

    See also[edit]


    Retrieved from "https://en.wikipedia.org/w/index.php?title=Wikipedia:Gadget&oldid=1230723730"

    Categories: 
    Wikipedia information pages
    Wikipedia scripts
     



    This page was last edited on 24 June 2024, at 10:02 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki