Open kdheepak opened 2 years ago
Hey that's a nice idea, if you have some time feel free to implement it! I'll happily review, merge and deploy the feature.
This works:
var darkmode = new Darkmode();
darkmode.button.addEventListener('click', () => {
console.log("hello cb");
});
Thanks for maintaining darkmode.js.
This is a feature request. It would be nice to run some additional custom javascript code on light / dark mode toggle. For example, a user might want to toggle the theme of their comments using this:
It would be great if the constructor accepted a callback that was called in the on click handler for the button for toggling the light / dark mode.