Gadget kitchen



Welcome to the gadget kitchen. This is intended to become a space where developers far and wide can coordinate their work on user scripts and gadgets to the benefit of the MediaWiki community far and wide. Right now, it's a quick tutorial to get you started.

What are user scripts and gadgets?
One of MediaWiki's coolest features is that it enables anyone to immediately write enhancements to the software, and to share those enhancements with other users.


 * User scripts are publicly visible scripts (written in JavaScript) which are executed for a given user
 * Gadgets are user scripts which have been promoted to become available in the user preferences of all users.

If you're running your own copy of MediaWiki, $wgAllowUserJs needs to be enabled for user scripts to work, and the Gadgets extension needs to be installed to make it possible to promote individual scripts to gadget status. Both are enabled for all Wikimedia Foundation sites, including Wikipedia.

I want to try!

 * 1) Visit Special:MyPage/common.js
 * 2) Create this page with the following text:
 * 3) Save. You should now have a link in the toolbox section called "Quick changelog" which shows you a subset of recent changes in a quick pop-up.

I want to do more!

 * 1) For a nicer (experimental!) development experience, go to Special:Preferences and enable the "Code Editor" gadget
 * 2) Now,  copy and paste the contents of MediaWiki:Tutorial-QuickRC.js into your Special:MyPage/common.js.

The result should be the same as above, but now you can modify the script, play with it, and replace it with something else entirely.

Let's say you want to run the script on English Wikipedia instead of MediaWiki.org. Visit your common.js there and add the following:

Of course, you could also load the user script you just created using the same mechanism by changing  in the URI above to. Ta-da! It's really that easy to customize your site experience on one of the largest sites on the planet.

Are there additional tutorial scripts?
Please contribute additional tutorial scripts in this section:


 * MediaWiki:Tutorial-QuickRC.js - API usage, mw.util, jQuery dialog plug-in, mw.user

Where can I find more docs?
These are key resources:
 * WikiProject User Scripts on the English Wikipedia and its alternatives in other languages are the primary hubs for user script and gadget development in Wikipedia. The guide has tons of useful information to get you started.
 * ResourceLoader/Default modules documents which JavaScript libraries, plugins and scripts already exist for your perusal
 * the jQuery docs are essential for every JavaScript developer