User:Harsh4101991/common.js: Difference between revisions
Appearance
Content deleted Content added
Harsh4101991 (talk | contribs) No edit summary |
Harsh4101991 (talk | contribs) No edit summary |
||
Line 11: | Line 11: | ||
.done(function(data){ |
.done(function(data){ |
||
console.log(2); |
console.log(2); |
||
alert(data.query.users.usercount); |
alert(data.query.users[0].usercount); |
||
}) |
}) |
||
}) |
}) |
Revision as of 00:33, 15 March 2015
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].usercount);
})
})
//importScript('User:Harsh4101991/EditCount.js');
/*
var link = mw.util.addPortletLink(
'p-tb',
'#',
'Language Support',
't-prettylinkwidget',
'Show Edit Count of User',
null,
'#t-whatlinkshere'
);
*/