I decided to add a dark mode toggle to my site which persists between pages and uses the browser’s default setting; all without adding external dependencies. I settled on using JavaScript to detect t…