Jump to content

User:Harsh4101991/common.js

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Harsh4101991 (talk | contribs) at 00:34, 15 March 2015. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
mw.loader.using('mediawiki.api', function(){
	var api = new mw.Api();
	///w/api.php?action=query&list=users&format=json&usprop=editcount&ususers=Harsh4101991
	api.get({
		action:'query',
		list: 'user',
		format:'json',
		usprop:'editcout',
		ususer:'Harsh4101991'
	})
	.done(function(data){
		console.log(2);
		alert(data.query.users[0].editCount);
	})
})

//importScript('User:Harsh4101991/EditCount.js');
/*
var link = mw.util.addPortletLink(
			'p-tb',
			'#',
			'Language Support',
			't-prettylinkwidget',
			'Show Edit Count of User',
			null,
			'#t-whatlinkshere'
		);
*/