Open
Description
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:
const iframe = document.querySelector("iframe.giscus-frame");
iframe.contentWindow.postMessage({giscus: {setConfig: {theme: "dark"}}}, "https://giscus.app/");
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.
Metadata
Metadata
Assignees
Labels
No labels