diff --git a/web/templates/entry_view.html b/web/templates/entry_view.html index 830077a..168145e 100644 --- a/web/templates/entry_view.html +++ b/web/templates/entry_view.html @@ -102,19 +102,10 @@
@@ -216,7 +207,7 @@ border-color:#c9def5; } - /* Subject chip gets a hit → color the whole pill */ + /* Subject chip gets a hit → color the whole chip */ .chip-subject.chip-hit{ background:#f8e3c5; /* your chosen highlight color */ border-color:#e0b98e; @@ -394,10 +385,9 @@ a.muted = false; try { - await a.play(); // <- may throw NotAllowedError on some iOS/Safari cases + await a.play(); playing = true; } catch (err) { - // Autoplay/permission style block (Safari/iOS or Chrome heuristics) if (err && (err.name === 'NotAllowedError' || /not allowed|denied permission/i.test(err.message))) { showToast("Audio was blocked. Make sure the phone isn't on Silent and tap the speaker again."); @@ -407,9 +397,7 @@ } } - // -------- button: toggle behavior -------- ttsBtn.addEventListener('click', async () => { - // Toggle OFF if something is already playing (either engine) if (playing) { try { stopAll(); @@ -438,7 +426,6 @@ } }); - // Safety: stop audio when navigating away window.addEventListener('pagehide', stopAll); })(); @@ -469,10 +456,7 @@ function showToast(message, duration = 3000) { toast.textContent = message; document.body.appendChild(toast); - // Trigger fade in setTimeout(() => toast.classList.add("show"), 50); - - // Fade out & remove setTimeout(() => { toast.classList.remove("show"); setTimeout(() => document.body.removeChild(toast), 500); @@ -483,7 +467,6 @@ function showToast(message, duration = 3000) { - + + + + + + +