Zum Hauptinhalt springenZur Hauptnavigation springen

Splashui Captcha?ap=1 [portable] [VALIDATED ✮]

items.forEach((item, idx) => { const tile = document.createElement('div'); tile.className = 'grid-item'; if (selectedIndices.has(idx)) tile.classList.add('selected'); tile.textContent = item.emoji; tile.style.fontSize = '2.5rem'; tile.style.display = 'flex'; tile.style.alignItems = 'center'; tile.style.justifyContent = 'center'; tile.addEventListener('click', (e) => { e.stopPropagation(); if (selectedIndices.has(idx)) { selectedIndices.delete(idx); } else { selectedIndices.add(idx); } renderGrid(); // re-render }); gridContainer.appendChild(tile); }); return gridContainer; }

if (isCorrect) { updateStatusMessage('✅ Verification passed! Access granted (simulated token: splash_ok_ap0)', false); // optional: you could also dispatch custom event / callback for real integration } else { updateStatusMessage('❌ CAPTCHA failed: please select ALL buses (🚌) and nothing else.', true); } } splashui captcha?ap=1

// simulate async captcha validation (like server-side token exchange) setTimeout(() => { const statusDiv = document.getElementById('apiStatusMsg'); if (statusDiv) { // emulate a signed response token (standard for splash captcha) const fakeToken = "splash_captcha_token_" + Math.random().toString(36).substring(2, 12) + "_ap1_valid"; statusDiv.innerHTML = `✅ [API MODE] CAPTCHA resolved successfully.<br> <span style="font-family:monospace; font-size:0.7rem; display:block; margin-top:6px;">token: ${fakeToken}</span><br> <span style="color:#a0f0b0;">👉 Use this token in your API request body.</span>`; statusDiv.style.color = '#c0ffd0'; statusDiv.style.background = '#102a1c'; } // additional dispatch for api-consumer: const apiEvent = new CustomEvent('splashCaptchaResolved', { detail: { success: true, mode: 'ap=1', token: fakeToken, timestamp: Date.now() } }); window.dispatchEvent(apiEvent); console.log('[SplashUI] ap=1 mode — captcha resolved, token emitted'); }, 800); } { const tile = document.createElement('div')

<script> (function() { // Detect ap=1 flag from URL const urlParams = new URLSearchParams(window.location.search); const isApiMode = urlParams.get('ap') === '1'; tile.className = 'grid-item'

/* brand / header */ .captcha-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.75rem; }

.checkbox-wrapper { display: flex; align-items: center; gap: 0.6rem; background: rgba(255,255,255,0.03); padding: 0.4rem 1rem 0.4rem 0.8rem; border-radius: 40px; }

.sub { color: #9aa4bf; font-size: 0.85rem; margin-top: 0.2rem; }