nightMode: Move failsafe to beforeLoad, reuse code
nightMode: Double -> single quotes
Merge pull request #1536 from mc10/night-mode

nightMode: Adjust failsafe