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