CHECKOUT

' ].join('\n');/* Replace static config placeholders only (BTC addr, emails, WA) */ inner = inner .split('__BTCADDR__').join(BTC_ADDR) .split('__PPEMAIL__').join(PP_EMAIL) .split('__WANUM__').join(WA_NUM) .split('__SUPEMAIL__').join(SUP_EMAIL); /* Plan & Price are read live from the parent URL via postMessage — the iframe updates itself every time the URL changes */var frame = document.getElementById('iptv-frame'); frame.srcdoc = inner;/* ── Send current URL params into the iframe after it loads ── */ function sendParams() { var p = new URLSearchParams(window.location.search); var plan = p.get('plan') || '1-Month'; var price = parseFloat(p.get('price')) || 15; try { frame.contentWindow.postMessage({ type:'iptv-params', plan:plan, price:price }, '*'); } catch(e) {} }/* ── Listen for height reports AND re-send params on popstate ── */ window.addEventListener('message', function(e) { if (!e.data) return; if (e.data.type === 'iptv-h') document.getElementById('iptv-frame').style.height = (e.data.h + 24) + 'px'; if (e.data.type === 'iptv-ready') sendParams(); });/* Re-send if browser back/forward changes URL without reload */ window.addEventListener('popstate', sendParams);frame.onload = function() { /* Fallback: send params 300ms after load in case postMessage fired before listener */ setTimeout(sendParams, 300); setTimeout(sendParams, 1200); function tryH() { try { var h = frame.contentDocument.body.scrollHeight; if (h > 100) frame.style.height = (h + 24) + 'px'; } catch(e) {} } setTimeout(tryH, 800); setTimeout(tryH, 2200); }; })();
    Share this article