1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/dashboard-ui/scripts/localsettings.js

30 lines
603 B
JavaScript
Raw Normal View History

2014-05-21 14:38:12 -04:00
(function ($, window, document) {
function get(key, userId) {
return localStorage.getItem(key + '-' + userId);
}
function set(key, userId, value) {
localStorage.setItem(key + '-' + userId, value);
}
function localSettings() {
var self = this;
self.val = function (key, userId, value) {
if (arguments.length < 3) {
return get(key, userId);
}
set(key, userId, value);
};
}
window.LocalSettings = new localSettings();
})(jQuery, window, document);