2 * @class mw.Api.plugin.rollback
7 $.extend( mw.Api.prototype, {
9 * Convenience method for `action=rollback`.
11 * @param {string|mw.Title} page
12 * @param {string} user
13 * @param {Object} [params] Additional parameters
14 * @return {jQuery.Promise}
16 rollback: function ( page, user, params ) {
17 return this.postWithToken( 'rollback', $.extend( {
19 title: String( page ),
21 uselang: mw.config.get( 'wgUserLanguage' )
23 .then( function ( data ) {
31 * @mixins mw.Api.plugin.rollback
34 }( mediaWiki, jQuery ) );