Drop the haptics

The clock buzzed on every turn change, on a flag and on the confirming
second tap of Reset. Sound and the colour change carry all of it, so the
vibration goes: buzz() and its four call sites, and the iOS README bullet
that explained why the buzz was silent there — a platform difference that
no longer exists now there are no haptics anywhere.

Verified by stubbing navigator.vibrate and driving a turn change, a
timeout and a confirmed reset: zero calls, while the turn still counted
and the flag still fell.

It also means the Android package can declare no permissions at all.
VIBRATE was the only one it would have needed — there is no INTERNET
either, since the whole clock ships inside the APK.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-11 19:10:23 +02:00
co-authored by Claude Opus 5
parent 485aa9728d
commit 6069ef270e
3 changed files with 4 additions and 8 deletions
+3 -5
View File
@@ -673,7 +673,6 @@
tone(659.25, 0.16, 0.20, 0.24, "triangle", false);
tone(440, 0.32, 0.55, 0.26, "triangle", true);
}
function buzz(ms){ try{ if(navigator.vibrate) navigator.vibrate(ms); }catch(e){} }
/* ============ helpers ============ */
function elapsed(){
@@ -791,7 +790,6 @@
paintPlay();
render();
sndFlag();
buzz([90, 70, 90]);
saveGame();
}
@@ -808,7 +806,7 @@
st.ticked = false;
st.phase = RUN;
paintPlay(); // the bar has to show what the clock is doing
sndSwap(); buzz(14);
sndSwap();
saveGame();
return;
}
@@ -822,7 +820,7 @@
st.active = 1 - side;
st.turnAt = now;
st.ticked = false;
sndSwap(); buzz(14);
sndSwap();
saveGame();
}
@@ -942,7 +940,7 @@
btnReset.setAttribute("aria-label", "Reset clock");
}
function armReset(){
if(armT){ disarm(); resetAll(); buzz(20); return; } // second tap inside the window
if(armT){ disarm(); resetAll(); return; } // second tap inside the window
btnReset.classList.remove("armed");
void btnReset.offsetWidth; // restart the drain animation
btnReset.classList.add("armed");