call Ox.localStorage only once

This commit is contained in:
rolux 2012-06-17 16:42:27 +02:00
parent 175c8b23d0
commit 23ad209561

View file

@ -9,7 +9,8 @@ Ox.Theme <f> get/set theme
Ox.Theme = (function() { Ox.Theme = (function() {
var that = function(theme) { var localStorage = Ox.localStorage('Ox'),
that = function(theme) {
return theme ? setTheme(theme) : getTheme(); return theme ? setTheme(theme) : getTheme();
}; };
@ -123,7 +124,7 @@ Ox.Theme = (function() {
}); });
}); });
} }
Ox.localStorage('Ox')('theme', theme); localStorage({theme: theme});
return that; return that;
} }