User:Kouhyar/common.js

mediaWiki.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/',	'Open dialog', 't-mworg',	'Open a sample dialog',	'm', '#t-print')	$(link).click(function(event) { event.preventDefault; //$(' ').text('KXM').dialog; $.getJSON('/w/api.php', {				action: 'help',				format: 'json'			}, function(data, textStatus, jqXHR) {			$(' ').text(JSON.stringify(data)).dialog;		}); });	});