16 lines
241 B
JavaScript
16 lines
241 B
JavaScript
|
/**
|
||
|
* Add listener for theme mode toggle
|
||
|
*/
|
||
|
|
||
|
const $toggle = document.getElementById('mode-toggle');
|
||
|
|
||
|
export function modeWatcher() {
|
||
|
if (!$toggle) {
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
$toggle.addEventListener('click', () => {
|
||
|
Theme.flip();
|
||
|
});
|
||
|
}
|