diff --git a/index.php b/index.php index 811a6d3..16187de 100644 --- a/index.php +++ b/index.php @@ -3,6 +3,8 @@ ob_start(); require_once __DIR__ . '/../includes/config.php'; require_once __DIR__ . '/../includes/square.php'; ob_end_clean(); +// Prevent Cloudflare Rocket Loader from deferring our scripts (breaks DOMContentLoaded listener) +header('Cache-Control: no-transform'); $_appVersion = '1.0.2'; ?> @@ -1317,10 +1319,13 @@ function showApp() { var app = document.getElementById('main-app'); if (auth) auth.setAttribute('style', 'display:none'); if (app) app.setAttribute('style', 'display:block;min-height:100vh;'); - // Rebuild platform grid now that app is visible (covers race where me.php resolves before platforms fetch) + // Rebuild dynamic UI now that app is visible (covers race where me.php resolves before data fetches) if (CFG.platforms && CFG.platforms.length) { try { buildPlatforms(); buildCashoutPlatforms(); } catch(e) {} } + if (CFG.payMethods && CFG.payMethods.length) { + try { buildPaymentMethods(); } catch(e) {} + } try { updateUI(); } catch(e) { console.warn('updateUI err:', e); } try { loadCashoutHistory(); } catch(e) { console.warn('cashout err:', e); } try { pollChatBadge(); } catch(e) { console.warn('badge err:', e); }