User:Catpat/common.js

// Import the jQuery dialog plugin before starting the rest of this script mw.loader.using(['jquery.ui.dialog'], function {	// Add MediaWiki.org-link in the toolbox before the Print-link	var link = mw.util.addPortletLink( 'p-tb', '//www.mediawiki.org/', 'ouvrir dialogue', 't-mworg', 'essai lieng ', 'm', '#t-log' );	$(link).click(function(event){ event.preventDefault; // Fetch recent changes from the API by one of jQuery's AJAX functions jQuery.getJSON(			mw.util.wikiScript( 'api' ),			{				'format': 'json',				'action': 'query',				'list': 'recentchanges',				'rclimit' : 25			},			function( data ) {				$(' ').text(JSON.stringify(data)).dialog;			}		); }) })