SheepWizard / COD4-MENU-BUILDER

This is a website that allows your to create a menu for call of Duty 4 using a editor displaying the menu.

Home Page:https://sheepwizard.github.io/COD4-MENU-BUILDER/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use localStorage instead of cookies

mirko911 opened this issue · comments

commented

I think it would be easier, if you use the localStorage instead of cookies.

var testObject = { 'one': 1, 'two': 2, 'three': 3 };

// Put the object into storage
localStorage.setItem('testObject', JSON.stringify(testObject));

// Retrieve the object from storage
var retrievedObject = localStorage.getItem('testObject');

console.log('retrievedObject: ', JSON.parse(retrievedObject));

I also think, that it would be easier to use json in general. It could save you alot of code

Alright i'll look into it, thanks

Added, good suggestion 👌 https://github.com/SheepWizard/COD4-MENU-BUILDER/commit/5ec5a7fc82ec12164b79326377ddd74db9b0628c

Also it probably would of been easier to use JSON, i'll change it as some point

commented

you failed with the commit url 5ec5a7f