Widget:RCSandbox: Difference between revisions
Jump to navigation
Jump to search
Matt Pijoan (talk | contribs) No edit summary |
Matt Pijoan (talk | contribs) No edit summary |
||
Line 11: | Line 11: | ||
scrolltextup(1000); | scrolltextup(1000); | ||
}); | }); | ||
function getRecentChanges(){ | function getRecentChanges() { | ||
mw.loader.using('mediawiki.api', function(){ | mw.loader.using('mediawiki.api', function () { | ||
(new mw.Api()).get({ | |||
action : 'query', | |||
format : 'json', | |||
rcshow : '!bot', | |||
list : 'recentchanges', | |||
rclimit : 50, | |||
rcprop : 'title|user', | |||
}).done(function (data) { | |||
} | $("#changeslist").html(""); | ||
$(data.query.recentchanges).each(function (key, value) { | |||
$("#changeslist").append("<a class='rclink' href='http://wikidoc.org/index.php/" + value.title + "'>" + value.title + "</a> was edited by: " + value.user + "<br />"); | |||
}); | |||
); | |||
}); | |||
} | |||
}); | } | ||
} | |||
var scrollheight = $("#textup").height(); | var scrollheight = $("#textup").height(); | ||