()
| 31 | // Persisted across reloads so the next song honors the user's last |
| 32 | // chosen subset, but a 0-selection state is normalized to all 6. |
| 33 | function refreshStemChoiceVisuals() { |
| 34 | for (const btn of document.querySelectorAll(".stem-choice[data-stem]")) { |
| 35 | btn.setAttribute( |
| 36 | "aria-pressed", |
| 37 | String(selectedStems.has(btn.dataset.stem)), |
| 38 | ); |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | function handleStemChoiceClick(stem) { |
| 43 | const allSelected = selectedStems.size === STEM_NAMES.length; |
no outgoing calls
no test coverage detected