Save code in localStorage