---
title: "Comment by Kristopher Guzman on \"🌓 How to change the favicon according to system dark mode!\" | Hashnode"
description: "Nice! Quick additional tip, you don&#39;t have to run setInterval every second. You can add an event listener directly: // chrome + firefox isDark .addEventList"
url: "https://hashnode.com/posts/how-to-change-the-favicon-according-to-system-dark-mode/5fd1bb7b49835e38d0a9c374/comment/5fd338eacd0355570faea707"
---

[Discussion](https://hashnode.com/posts/how-to-change-the-favicon-according-to-system-dark-mode/5fd1bb7b49835e38d0a9c374)

Comment [🌓 How to change the favicon according to system dark mode!](https://hashnode.com/posts/how-to-change-the-favicon-according-to-system-dark-mode/5fd1bb7b49835e38d0a9c374)

[Kristopher Guzman](https://hashnode.com/@kag359six)

[Dec 11, 2020](https://hashnode.com/posts/how-to-change-the-favicon-according-to-system-dark-mode/5fd1bb7b49835e38d0a9c374/comment/5fd338eacd0355570faea707)

Nice! Quick additional tip, you don't have to run `setInterval` every second. You can add an event listener directly:

```
// chrome + firefox
isDark.addEventListener('change', (e) => {})

// safari
isDark.addListener((e) => {})
```

[Usman Sabuwala](https://hashnode.com/@usmanwrites)

[Dec 11, 2020](https://hashnode.com/posts/how-to-change-the-favicon-according-to-system-dark-mode/5fd1bb7b49835e38d0a9c374/comment/5fd338eacd0355570faea707#reply-5fd37ee002d534634d37faab)

Yeah I got to know about it later. Thanks for letting us know.
