Night mode with pure javascript instead of jQuery