๐Ÿ† Hackathon HQ

๐Ÿ‡บ๐Ÿ‡ธ - HQ
--:--:--
Miami, FL (ET)
๐Ÿ‡ช๐Ÿ‡บ
--:--:--
London (GMT)
๐ŸŒ
--:--:--
Lagos (WAT)
๐ŸŒ
--:--:--
Tokyo (JST)
๐Ÿ‡ฆ๐Ÿ‡บ
--:--:--
Sydney (AEDT)
๐Ÿ‡ฎ๐Ÿ‡ณ
--:--:--
Mumbai (IST)

GENERATE YOUR CERTIFICATE โ€ข Hack Fiesta Miami Edition Feb 2026 Session A & B

[ OFFICIAL CERTIFICATE ] โ€” Download your volunteer certificate using your registered email address

`; const w = window.open('', '_blank', 'width=1300,height=900,scrollbars=yes,resizable=yes'); if(!w){ alert('Please allow pop-ups to view/print your certificate.'); return; } w.opener = null; w.document.open(); w.document.write(html); w.document.close(); } /* ===== Generate flow ===== */ async function generateCertificate(){ const email = document.getElementById('certificateEmailInput').value.trim(); if(!email){ setStatus('error','Please enter your email address.'); return; } if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)){ setStatus('error','Please enter a valid email address.'); return; } setStatus('info','Checking for available certificates...'); toggleButton(true); try { // โœ… IMPORTANT: use location.origin so referer passes backend startsWith() const res = await fetch( `${CERT_API_URL}?email=${encodeURIComponent(email)}&referer=${encodeURIComponent(location.origin)}` ); const payload = await res.json(); if (payload?.error) { setStatus('error', esc(payload.error)); return; } const certs = Array.isArray(payload?.certificates) ? payload.certificates : []; if (!certs.length) { const msg = payload?.message || 'No record was found for the email address provided. If you believe this is an error, please message us on LinkedIn so our team can assist.'; setStatus('error', esc(msg)); return; } const available = certs.filter(c => c.status === 'Certificate Available' && c.certificateData); const blocked = certs.filter(c => c.status === 'Certificate Not Available'); // โœ… verified wins if (available.length > 0) { const normalized = available.map(c => normalizeCert(c.certificateData)); const ticketIds = [...new Set(available.map(c => c.ticketId).filter(Boolean))]; setStatus('ok', ` Certificate Ready

Ticket ID${ticketIds.length > 1 ? 's' : ''}: ${ticketIds.map(id => `${esc(id)}`).join(', ')}
Your certificate will now open in a new tab for download or printing.
`); openCertificatesInNewTab(normalized, true); return; } // โŒ all blocked if (blocked.length === certs.length) { const b = blocked[0]; const nextSteps = String(b.nextStepsMessage || ''); setStatus('error', ` ${esc(b.message)}

Ticket ID: ${esc(b.ticketId || 'N/A')}
${esc(nextSteps)}
`); return; } setStatus('error', 'Unable to determine certificate status.'); } catch (err) { console.error(err); setStatus('error','Failed to check records. Please try again later.'); } finally { toggleButton(false); } } /* ===== Clocks + init ===== */ function updateTimes(){ const now=new Date(); const set=(id,tz)=>{ const t=new Date(now.toLocaleString("en-US",{timeZone:tz})); const hh=String(t.getHours()).padStart(2,'0'); const mm=String(t.getMinutes()).padStart(2,'0'); const ss=String(t.getSeconds()).padStart(2,'0'); const el=document.getElementById(id); if(el) el.textContent=`${hh}:${mm}:${ss}`; }; set('miami-time',"America/New_York"); set('london-time',"Europe/London"); set('lagos-time',"Africa/Lagos"); set('tokyo-time',"Asia/Tokyo"); set('sydney-time',"Australia/Sydney"); set('mumbai-time',"Asia/Kolkata"); } document.addEventListener('DOMContentLoaded', ()=>{ document.getElementById('year').textContent = new Date().getFullYear(); document.getElementById('certificateResult').innerHTML = infoBoxHTML() + 'Enter your email above to check for available certificates...'; document.getElementById('certificateEmailInput')?.addEventListener('keydown', e=>{ if(e.key==='Enter') generateCertificate(); }); updateTimes(); setInterval(updateTimes, 1000); });