diff --git a/resources/js/ext.uls.preferences.js b/resources/js/ext.uls.preferences.js index e915da81..601af712 100644 --- a/resources/js/ext.uls.preferences.js +++ b/resources/js/ext.uls.preferences.js @@ -32,7 +32,7 @@ ULSPreferences.prototype = { /** - * Initalize + * Initialize */ init: function () { if ( this.isAnon ) { @@ -88,8 +88,8 @@ api.post( { action: 'tokens', type: 'options' - } ).done( function ( result ) { - var token = result.tokens.optionstoken; + } ).done( function ( tokenresult ) { + var token = tokenresult.tokens.optionstoken; api.post( { action: 'options', change: 'hideminor=1', @@ -109,7 +109,7 @@ }; mw.uls = mw.uls || {}; - mw.uls.preferences = function( option ) { + mw.uls.preferences = function( option ) { var data = $( 'body' ).data( "preferences" ), options = typeof option === "object" && option; @@ -117,7 +117,7 @@ $( 'body' ).data( "preferences", ( data = new ULSPreferences( options ) ) ); } if ( typeof option === "string" ) { - data.get(option); + data.get( option ); } return data; }; diff --git a/resources/js/ext.uls.webfonts.js b/resources/js/ext.uls.webfonts.js index ca11d542..2a256abb 100644 --- a/resources/js/ext.uls.webfonts.js +++ b/resources/js/ext.uls.webfonts.js @@ -16,7 +16,7 @@ * @licence GNU General Public Licence 2.0 or later * @licence MIT License */ -( function ( $, mw ) { +( function ( $, mw, document, undefined ) { "use strict"; $( document ).ready( function() { @@ -39,4 +39,4 @@ } } ); } ); -} )( jQuery, mediaWiki ); +} )( jQuery, mediaWiki, document );