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:
@@ -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
|
||||
|
Reference in New Issue
Block a user