fetch("https://acsbace.com/embedders/page-init", { method: "GET",headers: { "Content-Type": "application/json", "x-api-key": "66ba1eb2dc90026de15d0ecb"}}).then((response) => {return response.json()}) .then((data) => { const divElement = document.getElementById("p66ba1eb2dc90026de15d0ecb"); divElement.innerHTML = data.html; document.head.insertAdjacentHTML("beforeend", data.style); if(data.moveModalToBottom){ const modalDiv = divElement.querySelector("#modal66ba1eb2dc90026de15d0ecb"); document.body.appendChild(modalDiv); } var script = document.createElement("script");script.type = "text/javascript";script["async"] = false;script.textContent = data.script;document.body.appendChild(script); })