diff --git a/javascript/active.js b/javascript/active.js index 042a892..6c0fb5b 100644 --- a/javascript/active.js +++ b/javascript/active.js @@ -30,6 +30,13 @@ onUiUpdate(() => { e.stopPropagation(); }); + span.addEventListener('click', (e) => { + checkbox.checked = !checkbox.checked; + badge.checked = checkbox.checked; + triggerEvent(checkbox, 'change'); + e.stopPropagation(); + }); + badge.className = checkbox.className; badge.classList.add('primary'); span.insertBefore(badge, span.firstChild);