1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-01 11:50:37 +02:00

Implement Tomahawk.localStorage

This commit is contained in:
Anton Romanov
2015-09-17 17:18:09 -07:00
parent 2db6080731
commit 011bfdaef0

View File

@@ -805,9 +805,15 @@ Tomahawk.removeDiacritics = function (str) {
};
Tomahawk.localStorage = Tomahawk.localStorage || {
setItem: function() {},
getItem: function() {},
removeItem: function() {}
setItem: function(key, value) {
window.localStorage[key] = value;
},
getItem: function(key) {
return window.localStorage[key];
},
removeItem: function(key) {
delete window.localStorage[key];
}
};
// some aliases