Removed sessionStorage as it is no longer used and marginally affects performance

This commit is contained in:
n1474335 2017-07-18 14:28:51 +00:00
parent 8d09f7c7eb
commit cda557e1b9

View file

@ -200,13 +200,7 @@ App.prototype.silentBake = function() {
* @returns {string} * @returns {string}
*/ */
App.prototype.getInput = function() { App.prototype.getInput = function() {
const input = this.manager.input.get(); return 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;
}; };
@ -216,8 +210,6 @@ App.prototype.getInput = function() {
* @param {string} input - The string to set the input to * @param {string} input - The string to set the input to
*/ */
App.prototype.setInput = function(input) { App.prototype.setInput = function(input) {
sessionStorage.setItem("inputLength", input.length);
sessionStorage.setItem("input", input);
this.manager.input.set(input); this.manager.input.set(input);
}; };
@ -468,9 +460,7 @@ App.prototype.nextIngId = function() {
* @returns {Object[]} * @returns {Object[]}
*/ */
App.prototype.getRecipeConfig = function() { App.prototype.getRecipeConfig = function() {
const recipeConfig = this.manager.recipe.getConfig(); return this.manager.recipe.getConfig();
sessionStorage.setItem("recipeConfig", JSON.stringify(recipeConfig));
return recipeConfig;
}; };
@ -480,7 +470,6 @@ App.prototype.getRecipeConfig = function() {
* @param {Object[]} recipeConfig - The recipe configuration * @param {Object[]} recipeConfig - The recipe configuration
*/ */
App.prototype.setRecipeConfig = function(recipeConfig) { App.prototype.setRecipeConfig = function(recipeConfig) {
sessionStorage.setItem("recipeConfig", JSON.stringify(recipeConfig));
document.getElementById("rec-list").innerHTML = null; document.getElementById("rec-list").innerHTML = null;
for (let i = 0; i < recipeConfig.length; i++) { for (let i = 0; i < recipeConfig.length; i++) {