diff --git a/toys/starship/index.md b/toys/starship/index.md index 63cb804..b866f37 100644 --- a/toys/starship/index.md +++ b/toys/starship/index.md @@ -8,7 +8,7 @@ headers:
- + 🔉 diff --git a/toys/starship/starship.js b/toys/starship/starship.js index ede7acd..cbb4a1a 100644 --- a/toys/starship/starship.js +++ b/toys/starship/starship.js @@ -40,11 +40,14 @@ function init() { document.querySelector("#fader").addEventListener("input", setFade); setFade(); - document.querySelector("#play").addEventListener("click", e => { + let play = document.querySelector("#play"); + play.addEventListener("click", e => { if (audioCtx.state == "running") { audioCtx.suspend(); + play.textContent = "▶️️"; } else { audioCtx.resume(); + play.textContent = "⏸️"; } });