mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 13:47:26 +02:00
Implement Tomahawk.localStorage
This commit is contained in:
@@ -805,9 +805,15 @@ Tomahawk.removeDiacritics = function (str) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Tomahawk.localStorage = Tomahawk.localStorage || {
|
Tomahawk.localStorage = Tomahawk.localStorage || {
|
||||||
setItem: function() {},
|
setItem: function(key, value) {
|
||||||
getItem: function() {},
|
window.localStorage[key] = value;
|
||||||
removeItem: function() {}
|
},
|
||||||
|
getItem: function(key) {
|
||||||
|
return window.localStorage[key];
|
||||||
|
},
|
||||||
|
removeItem: function(key) {
|
||||||
|
delete window.localStorage[key];
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// some aliases
|
// some aliases
|
||||||
|
Reference in New Issue
Block a user