Changes

Jump to navigation Jump to search

Embedded Iframe

3 bytes added, 15:40, 20 September 2021
no edit summary
<script>
<nowiki>
var addUrlParamsToiFrameSrcs addUrlParamsToIframeSrcs = function () {
const validParameters = ["checkin","checkout","numnight","numadult","numchild","ownerid","propid","roomid","referer","redirect","lang","group","nogroup","category1","category2","category3","category4", "customParameter"];
const iFrameAttrIdentifier iframeAttrIdentifier = "ouriFrameourIframe"; 
const currentUrl = new URL(window.location.href);
let parametersString = "";
}
});
const iFrames iframes = document.getElementsByTagName("iFrameiframe"); for (let iFrame iframe of iFrames) { if (iFrame.getAttribute(iFrameAttrIdentifier) !== nulliframes) { let iFrameSrc iframeSrc = iFrameiframe.getAttribute("data-src"); if (!iFrameSrc.includes("?")iframeSrc === null) { iFrameSrc += "?"continue;
}
iFrameSrc if (!iframeSrc.includes("?")) { iframeSrc += "?"; } iframeSrc += parametersString; iFrameiframe.setAttribute("src", iFrameSrciframeSrc) }
}
}
addUrlParamsToiFrameSrcsaddUrlParamsToIframeSrcs();
</nowiki>
</script>

Navigation menu