Skip to content

Commit

Permalink
Merge pull request #140 from felixaschultz:development
Browse files Browse the repository at this point in the history
Checking if iFrame has loaded
  • Loading branch information
felixaschultz authored Nov 10, 2023
2 parents 990b564 + 67f2305 commit d545393
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cb.js

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions dev/cb.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,15 @@ function setIntastellarPartnerDomain(){
}

setIntastellarPartnerDomain();
const instatellariframe = document.getElementById("intastellarCrossSiteCheck");
const iframeDoc = instatellariframe.contentDocument || instatellariframe.contentWindow.document;
if ( iframeDoc.readyState == 'complete' ) {
//iframe.contentWindow.alert("Hello");
instatellariframe.contentWindow.addEventListener("load", function(){
console.log("iframe loaded");

})
}

/* - - - Set the intastellarCookieLanguageuage dependent messages */

Expand Down Expand Up @@ -785,15 +794,6 @@ IntastellarCookieConsent.inizilize(

window.addEventListener("load", function () {

const newSearch = new URLSearchParams(window.location.search);
if(newSearch.has("intastellarPartners")){
document.cookie =
int_hideCookieBannerName + "=__inta1."+ newSearch.get("intastellarPartners") +"; expires=" + cookieLifeTime +
"; path=/; " +
intCookieDomain +
"";
}

const temp = location.host.split('.').reverse();
const domain = encodeURI(temp[1] + '.' + temp[0]);
const trImage = document.createElement("iframe");
Expand Down

0 comments on commit d545393

Please sign in to comment.