Commons:WikiProject WikiWidgets

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Project logo.

The WikiProject WikiWidgets provides a central hub to coordinate the creation, maintenance, improvement and spread of WikiWidgets throughout the Wikipedias.

WikiWidgets are interactive JavaScript widgets (little "games" you may say) that can be inserted into Wikipedia articles to aid the understanding of particular topics. Until now, Wikipedia articles have been enriched with images, audios and videos. The WikiWidgets project aims to introduce interactive media to the mix. You can see an example of a working wikiwidget by clicking here.

Enable WikiWidgets on your wiki[edit]

To enable WikiWidgets on any MediaWiki wiki, first seek community consensus, and then ask an admin to add the following to MediaWiki:Common.js and/or MediaWiki:Mobile.js of your wiki:

// Only load if there's a wikiwidget in the page
var widgets = $( '.WikiWidget' );
if ( widgets.length > 0 ) {

	// Only load when viewing or previewing the page
	var action = mw.config.get( 'wgAction' );
	if ( action === 'view' || action === 'submit' ) {

		// Load the initialization script from Commons
		mw.loader.load( '//' );

After this code has been added, you must create a template for each wikiwidget that you want available in your wiki. This is because each wikiwidget comes with its own set of options that are passed on through the template parameters. See the page of each available wikiwidget for the template code and more info.

Available WikiWidgets[edit]

So far there are only two wikiwidgets available, both for articles about cellular automata:

Future, potential or requested[edit]

  • Automata (latin for 'acting on their own will') is meant for Wikipedia articles about elementary cellular automata and cellular automata in general
  • Keyboard for articles about keyboard instruments and music theory
  • Go for articles about the Go strategy board game (using EidoGo)
  • Chess for articles about chess
  • Gravity to test different objects falling

See also[edit]

  • MediaWiki:WikiWidgets.js - WikiWidgets initialization script
  • Category:WikiWidgets - Contains all the files used by the WikiWidgets project
  • Discussions: first (English Wikipedia), second (Spanish Wikipedia), third (English Wikipedia), fourth (Commons)
  • phab:T131436 - Experimental interface for embedding with partial security isolation. With further development, this will probably merge with WikiWidgets to provide infrastructure for widgets that are easier to review for security.