zebra-report: zebra-audio puppet reveal works on mobile (3 taps)
This commit is contained in:
parent
9ecc84e34e
commit
847b2414e8
1 changed files with 13 additions and 5 deletions
|
|
@ -603,9 +603,17 @@ function puppetStop(){
|
||||||
* this inline script — wire them once the rest of the document exists */
|
* this inline script — wire them once the rest of the document exists */
|
||||||
function wirePuppet(){
|
function wirePuppet(){
|
||||||
const seal = $('pi-seal');
|
const seal = $('pi-seal');
|
||||||
/* native triple-click = three clicks on the same node (event.detail === 3) */
|
/* 3 clicks within 800ms reveals the console. counting our own clicks (rather
|
||||||
if (seal) seal.addEventListener('click', (e) => {
|
* than checking event.detail === 3) means mobile taps work too — touch click
|
||||||
if (e.detail === 3){ try { getSelection().removeAllRanges(); } catch(_){} revealPuppet(); }
|
* 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 speak = $('puppet-speak'); if (speak) speak.addEventListener('click', () => { puppeting ? puppetStop() : puppetSpeak(); });
|
||||||
const close = $('puppet-close'); if (close) close.addEventListener('click', () => { puppetStop(); $('puppet').hidden = true; });
|
const close = $('puppet-close'); if (close) close.addEventListener('click', () => { puppetStop(); $('puppet').hidden = true; });
|
||||||
|
|
@ -644,8 +652,8 @@ else wirePuppet();
|
||||||
|
|
||||||
<footer style="max-width:560px;margin:2.2rem auto 0;font-size:0.65rem;color:#999;line-height:1.7;word-break:break-all;font-family:monospace">
|
<footer style="max-width:560px;margin:2.2rem auto 0;font-size:0.65rem;color:#999;line-height:1.7;word-break:break-all;font-family:monospace">
|
||||||
<span id="pi-seal" style="color:#777;cursor:default;user-select:none" title="">page integrity</span> · built <span class="stamp-date">2026-05-29</span><br>
|
<span id="pi-seal" style="color:#777;cursor:default;user-select:none" title="">page integrity</span> · built <span class="stamp-date">2026-05-29</span><br>
|
||||||
md5 <span class="stamp-md5">70f28512b6bc9af9121f6c533676024d</span><br>
|
md5 <span class="stamp-md5">db399c213000ea9dfe57b41bbe76b620</span><br>
|
||||||
sha256 <span class="stamp-sha">7ca19b46a6738039f4e4d10e026019a142c769d1a96017419f562f7d701be6ac</span><br>
|
sha256 <span class="stamp-sha">bdafd83348428485418947fd35aa21d77e3d98dcc1d050183bcda5a55ccd6291</span><br>
|
||||||
<span style="color:#bbb">hashes are of this page with these two fields zeroed — to verify, blank them and re-hash</span><br>
|
<span style="color:#bbb">hashes are of this page with these two fields zeroed — to verify, blank them and re-hash</span><br>
|
||||||
<span style="color:#bbb">one self-contained file — <strong>save a copy</strong> and verify it against these hashes; point it at your own servers with ?signal= and ?turncred=, or <a href="host-your-own.html" style="color:#999">host your own community</a></span>
|
<span style="color:#bbb">one self-contained file — <strong>save a copy</strong> and verify it against these hashes; point it at your own servers with ?signal= and ?turncred=, or <a href="host-your-own.html" style="color:#999">host your own community</a></span>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue