localStorage saving

added localStorage support so people like me don't do stupid mistakes
like refresh the editor