diff --git a/admin/index.php b/admin/index.php index 0e14c4d..5b9e026 100644 --- a/admin/index.php +++ b/admin/index.php @@ -811,6 +811,10 @@ tr:hover td{background:rgba(255,255,255,.015)} +
+ + +
PLAY NOW
+
@@ -1405,19 +1406,40 @@ async function refreshUser() { } // ─── PLATFORMS ───────────────────────────────────────────── +function openPlatform(slug, url, aliasParam) { + const alias = savedAliases[slug] || ''; + let launchUrl = url; + if (alias && aliasParam) { + const sep = url.includes('?') ? '&' : '?'; + launchUrl = url + sep + encodeURIComponent(aliasParam) + '=' + encodeURIComponent(alias); + } + window.open(launchUrl, '_blank', 'noopener'); + if (alias) { + navigator.clipboard?.writeText(alias).catch(() => {}); + const t = document.getElementById('platform-alias-toast'); + if (t) { + t.textContent = '📋 "' + alias + '" copied — paste into login'; + t.style.opacity = '1'; t.style.transform = 'translateY(0)'; + clearTimeout(t._timer); + t._timer = setTimeout(() => { t.style.opacity='0'; t.style.transform='translateY(10px)'; }, 3000); + } + } +} + function buildPlatforms() { if (!CFG.platforms || !CFG.platforms.length) return; const grid = document.getElementById('platform-grid'); if (grid) { grid.innerHTML = CFG.platforms.map(p => ` - +
${p.name}
${p.name}
TAP TO PLAY →
-
`).join(''); +
`).join(''); } // Populate selects — clear dynamic options first to prevent duplicates on re-call