call Ox.localStorage only once
This commit is contained in:
parent
175c8b23d0
commit
23ad209561
1 changed files with 5 additions and 4 deletions
|
@ -9,9 +9,10 @@ Ox.Theme <f> get/set theme
|
|||
|
||||
Ox.Theme = (function() {
|
||||
|
||||
var that = function(theme) {
|
||||
return theme ? setTheme(theme) : getTheme();
|
||||
};
|
||||
var localStorage = Ox.localStorage('Ox'),
|
||||
that = function(theme) {
|
||||
return theme ? setTheme(theme) : getTheme();
|
||||
};
|
||||
|
||||
function getTheme() {
|
||||
var classNames = Ox.UI.$body.attr('class'),
|
||||
|
@ -123,7 +124,7 @@ Ox.Theme = (function() {
|
|||
});
|
||||
});
|
||||
}
|
||||
Ox.localStorage('Ox')('theme', theme);
|
||||
localStorage({theme: theme});
|
||||
return that;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue