web/_javascript/modules/components/mode-watcher.js
Cotes Chung fe7afa379f
perf: replace jQuery with Vanilla JS (#1681)
Also replaced `magnific-popup` with `GLightbox`
2024-04-17 06:10:01 +08:00

14 lines
246 B
JavaScript

/**
* Add listener for theme mode toggle
*/
const toggle = document.getElementById('mode-toggle');
export function modeWatcher() {
if (!toggle) {
return;
}
toggle.addEventListener('click', () => {
modeToggle.flipMode();
});
}