User:Catpat/common.js

// Import the jQuery dialog plugin before starting the rest of this script mw.loader.using(['jquery.cookie', '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' );	// Get cookie	var nameaa = $.cookie('UserName');	//var nameaa = wgCookiePrefix;	$(link).click(function(event){ event.preventDefault; $(' ').text('Hello world 5 ' + nameaa).dialog; /*		// 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;			}		); */

}) })