Skip to content

Instantly share code, notes, and snippets.

@bvibber
Created December 7, 2011 00:20
Show Gist options
  • Save bvibber/1440763 to your computer and use it in GitHub Desktop.
Save bvibber/1440763 to your computer and use it in GitHub Desktop.
$.ajax({
url: mw.config.get('wgScriptUrl') + '/api' + mw.config.get('wgScriptExtension'),
data: {
action: "query",
prop: "onlinestatus",
onlinestatususer: mw.config.get('wgTitle'),
format: 'json'
},
success: function(data) {
// code to update the statusbar based on the returned message
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment