I attempted to deploy a Dark Mode following the advice on the community by @artur, from this code, which I inserted into the footer of my website. I don’t understand it doesn’t work
<script src="<https://cdn.jsdelivr.net/npm/darkmode-js@1.5.7/lib/darkmode-js.min.js>"></script>
<script>
function addDarkmodeWidget() {
new Darkmode().showWidget();
}
window.addEventListener('load', addDarkmodeWidget);
</script>
I get this error in Google Chrome Console
Uncaught ReferenceError: Darkmode is not defined at addDarkmodeWidget