User:Icedwater/common.js

// no more alerts.... or should we? // jQuery('#firstHeading').css('color', 'red');

mw.loader.using('mediawiki.api', function {	var api = new mw.Api;	///w/api.php?action=query&list=users&format=json&usprop=editcount&ususers=username   api.get({ action: 'query', list: 'users', format: 'json', usprop: 'editcount', ususers: mw.config.get('wgUserName') }).done(function(data){ console.log(data.query.users[0].editcount); }); });

var link = mw.util.addPortletLink(   	'p-views',    	'#',    	'Edit Count',    	't-prettylinkwidget',    	'Show Edit Count of User',    	null,    	'#t-whatlinkshere'); $(link).click( function(e) {   	e.preventDefault;    	mw.loader.using('jquery.ui', function { $dialog = $(' ') .html('Your Edits: ' + x)   		.dialog({    			autoOpen: true,    			title: 'Thanks!',    			width: '50%',    			modal: true,    		}); });   });