User:WikiMacaroons/notif.js

var params = { action: 'query', meta: 'userinfo', uiprop: 'rights', format: 'json' },	api = new mw.Api;

api.get( params ).done( function ( data ) {	console.log( data ); } );