From 011bfdaef0044ee99af623f02f1e822a04cbf61b Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Thu, 17 Sep 2015 17:18:09 -0700 Subject: [PATCH] Implement Tomahawk.localStorage --- data/js/tomahawk.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/data/js/tomahawk.js b/data/js/tomahawk.js index d1522d186..fe372fb4f 100644 --- a/data/js/tomahawk.js +++ b/data/js/tomahawk.js @@ -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