Created
April 13, 2021 14:34
-
-
Save be-mohand/08fed30d9859edf60eb01963eb58be67 to your computer and use it in GitHub Desktop.
Display an iFrame on a listing page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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