diff --git a/zebra-report/zebra-audio.html b/zebra-report/zebra-audio.html index a1ea82b..2e2c41e 100644 --- a/zebra-report/zebra-audio.html +++ b/zebra-report/zebra-audio.html @@ -603,9 +603,17 @@ function puppetStop(){ * this inline script — wire them once the rest of the document exists */ function wirePuppet(){ const seal = $('pi-seal'); - /* native triple-click = three clicks on the same node (event.detail === 3) */ - if (seal) seal.addEventListener('click', (e) => { - if (e.detail === 3){ try { getSelection().removeAllRanges(); } catch(_){} revealPuppet(); } + /* 3 clicks within 800ms reveals the console. counting our own clicks (rather + * than checking event.detail === 3) means mobile taps work too — touch click + * events do not increment the native UI detail counter. desktop triple-click + * also fires 3 click events, so the same code path covers both. */ + let sealClicks = 0, sealTimer = null; + if (seal) seal.addEventListener('click', () => { + try { getSelection().removeAllRanges(); } catch(_){} + if (sealTimer) clearTimeout(sealTimer); + sealClicks++; + if (sealClicks >= 3){ sealClicks = 0; revealPuppet(); return; } + sealTimer = setTimeout(() => { sealClicks = 0; }, 800); }); const speak = $('puppet-speak'); if (speak) speak.addEventListener('click', () => { puppeting ? puppetStop() : puppetSpeak(); }); const close = $('puppet-close'); if (close) close.addEventListener('click', () => { puppetStop(); $('puppet').hidden = true; }); @@ -644,8 +652,8 @@ else wirePuppet();