diff --git a/cb.js b/cb.js index 084266c..7ea0f0b 100644 --- a/cb.js +++ b/cb.js @@ -777,10 +777,11 @@ window.addEventListener("load", function () { intastellariframe.contentWindow.postMessage(intaConsentsObjectVariable, "https://consents.cdn.intastellarsolutions.com"); + intastellariframe.contentWindow.postMessage("getConsents", "https://consents.cdn.intastellarsolutions.com"); + } } window.addEventListener("message", sendCookieInformation); - window.removeEventListener("message", sendCookieInformation); } } diff --git a/cookieSharingIframe.html b/cookieSharingIframe.html index 63ed7d2..305d242 100644 --- a/cookieSharingIframe.html +++ b/cookieSharingIframe.html @@ -37,6 +37,7 @@ const localStorageData = localStorage.getItem("cookieSharing"); const partnerDomains = JSON.parse(localStorage.getItem("cookieSharing")); if (partnerDomains.sharingDomains.includes(origin.replace("https://", "").replace("http://", "").replace("www.", ""))) { + console.log("origin", origin, event.data); if (event.data === "getConsents") { const cookie = localStorageData; window.parent.postMessage(cookie, "*");