diff --git a/app.js b/app.js index b2f5ba9..35054bc 100644 --- a/app.js +++ b/app.js @@ -2789,9 +2789,11 @@ document.getElementById('podcast-toggle').addEventListener('click', () => { utterance.rate = 0.9; utterance.pitch = 0.9; btn.textContent = '⏹'; + btn.classList.add('active'); speechSynthesis.speak(utterance); utterance.onend = () => { btn.textContent = '🎧'; + btn.classList.remove('active'); }; }) .catch(err => { @@ -2802,6 +2804,7 @@ document.getElementById('podcast-toggle').addEventListener('click', () => { } else { speechSynthesis.cancel(); btn.textContent = '🎧'; + btn.classList.remove('active'); } }); diff --git a/style.css b/style.css index 22c71f3..0ebc7b3 100644 --- a/style.css +++ b/style.css @@ -70,6 +70,10 @@ canvas { cursor: pointer; } +#podcast-toggle.active { + background-color: #0066cc; +} + #podcast-toggle:hover { background-color: var(--color-primary); }