Adding auto-saving to localStorage