Skip to content

Instantly share code, notes, and snippets.

@be-mohand
Created April 13, 2021 14:34
Show Gist options
  • Save be-mohand/08fed30d9859edf60eb01963eb58be67 to your computer and use it in GitHub Desktop.
Save be-mohand/08fed30d9859edf60eb01963eb58be67 to your computer and use it in GitHub Desktop.
Display an iFrame on a listing page
if(typeof Kr !== 'undefined' && typeof Kr.Listing !== 'undefined' && Kr.Listing !== null){
if(Kr.Listing.id === YOUR_LISTING_ID) {
var iframe = document.createElement('iframe');
iframe.style.width="100%";
iframe.style.height="300px";
iframe.src = "YOUR_IFRAME_URL_SRC";
let container = document.getElementsByClassName('container listing_container_main_wrapper');
container[0].appendChild(iframe);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment