From cda557e1b94dde801e1185450b11231929229cc0 Mon Sep 17 00:00:00 2001 From: n1474335 Date: Tue, 18 Jul 2017 14:28:51 +0000 Subject: [PATCH] Removed sessionStorage as it is no longer used and marginally affects performance --- src/web/App.js | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/web/App.js b/src/web/App.js index 693e3efb..cc4b424c 100755 --- a/src/web/App.js +++ b/src/web/App.js @@ -200,13 +200,7 @@ App.prototype.silentBake = function() { * @returns {string} */ App.prototype.getInput = function() { - const input = this.manager.input.get(); - - // Save to session storage in case we need to restore it later - sessionStorage.setItem("inputLength", input.length); - sessionStorage.setItem("input", input); - - return input; + return this.manager.input.get(); }; @@ -216,8 +210,6 @@ App.prototype.getInput = function() { * @param {string} input - The string to set the input to */ App.prototype.setInput = function(input) { - sessionStorage.setItem("inputLength", input.length); - sessionStorage.setItem("input", input); this.manager.input.set(input); }; @@ -468,9 +460,7 @@ App.prototype.nextIngId = function() { * @returns {Object[]} */ App.prototype.getRecipeConfig = function() { - const recipeConfig = this.manager.recipe.getConfig(); - sessionStorage.setItem("recipeConfig", JSON.stringify(recipeConfig)); - return recipeConfig; + return this.manager.recipe.getConfig(); }; @@ -480,7 +470,6 @@ App.prototype.getRecipeConfig = function() { * @param {Object[]} recipeConfig - The recipe configuration */ App.prototype.setRecipeConfig = function(recipeConfig) { - sessionStorage.setItem("recipeConfig", JSON.stringify(recipeConfig)); document.getElementById("rec-list").innerHTML = null; for (let i = 0; i < recipeConfig.length; i++) {