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(data); |
console.log(data); |
||
alert(data.query.users[0].editcount); |
|||
}) |
}) |
||
}) |
}) |
Revision as of 00:40, 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: 'users',
format:'json',
usprop:'editcount',
ususers:'Harsh4101991'
})
.done(function(data){
console.log(data);
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'
);
*/