This JavaScript code checks whether the user prefers dark mode by using the window.matchMedia...
We use cookies to improve your experience on our site. Learn more .