Flashcard Generator & Player

Random Picker Generator — Upload Names → Download HTML or Excel

Upload or Paste Names
CSV tips: If you include headers, make sure one column is named Name. Otherwise the first column is used.
Preview
Export
The HTML App runs in any browser (full‑screen stage, space to pick). The Excel version is macro‑free; press F9 (Recalculate) to reshuffle.
Quick Self‑Test (dev only)
Checks: no stray backticks, proper hsl() quoting, basic generation.
`; } // ===== Simple self‑tests ===== document.getElementById('btnTest').addEventListener('click', ()=>{ const out = document.getElementById('testlog'); const sample = ["Ana","O'Connor","Back`tick","Dollar$Sign","Angle < > &", "José"]; const html = buildAppHTML(sample); const tests = []; tests.push({name:'Generated HTML contains no backticks (risk in scripts)', pass: html.indexOf('`') === -1}); tests.push({name:'Confetti color uses quoted hsl()', pass: /c:\s*['\"]hsl\(/.test(html)}); tests.push({name:'Names serialized via JSON (const NAMES = [ … ])', pass: /const NAMES = \[/.test(html)}); const lines = tests.map(t=> (t.pass? '✅ ' : '❌ ') + t.name).join('\n'); out.textContent = lines + '\n\nPreview snippet:\n' + html.slice(0,400) + '...'; out.style.display = 'block'; }); });

Post a Comment