Revert "Do not load jquery.jStorage for logged in users"

This reverts commit 5884337c9f.

Change-Id: Icfdfd89059a417a6aaea30d12164e7174dd5f58b
This commit is contained in:
Nikerabbit
2013-11-12 12:47:56 +00:00
parent 5884337c9f
commit 2bc77f2c18
3 changed files with 7 additions and 18 deletions

View File

@@ -115,14 +115,13 @@
* Initialize
*/
init: function () {
var options;
if ( this.isAnon ) {
this.preferences = $.jStorage.get( this.preferenceName ) || {};
this.preferences = $.jStorage.get( this.preferenceName );
} else {
options = mw.user.options.get( this.preferenceName );
this.preferences = $.parseJSON( options ) || {};
var options = mw.user.options.get( this.preferenceName );
this.preferences = $.parseJSON( options );
}
this.preferences = this.preferences || {};
},
/**
@@ -158,6 +157,7 @@
$.jStorage.set( this.preferenceName, this.preferences );
callback.call( this, true );
} else {
// Logged in user. Use MW APIs to change preferences
saveOptionsWithToken( {
action: 'options',