1
mirror of https://github.com/jakejarvis/dark-mode.git synced 2025-06-27 16:45:40 -04:00

expose an init function instead of exporting as module default

This commit is contained in:
2021-08-04 15:00:26 -04:00
parent 092c833d97
commit 4881b908e9
6 changed files with 25 additions and 25 deletions

View File

@ -11,11 +11,11 @@
<button class="dark-mode-toggle">💡 Click to see the light... or not.</button>
<p><a href="https://github.com/jakejarvis/dark-mode-example" target="_blank" rel="noopener">View the source code</a> or <a href="https://jarv.is/notes/dark-mode/" target="_blank" rel="noopener">read the post</a>.</p>
<p><a href="https://github.com/jakejarvis/dark-mode" target="_blank" rel="noopener">View the source code</a> or <a href="https://jarv.is/notes/dark-mode/" target="_blank" rel="noopener">read the post</a>.</p>
<script src="../dist/index.js"></script>
<script>
window.darkMode({
window.darkMode.init({
toggle: document.querySelector(".dark-mode-toggle"),
});
</script>