Storing night mode setting in local storage