corrected PR for other browsers

Sorry, this should work now. window.localStorage is undefined in chrome apps.