Simplify JavaScript used for embedded landscapes (#12522)

pull/12527/head
Dan Kohn 2019-02-06 11:35:02 -05:00 committed by Kubernetes Prow Robot
parent 0cfc80e181
commit ff80f66959
1 changed files with 1 additions and 16 deletions

View File

@ -76,22 +76,7 @@ cid: partners
<body>
<div id="frameHolder">
<iframe id="landscape" frameBorder="0" scrolling="no" style="width: 1px; min-width: 100%" src=""></iframe>
<script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/3.6.0/iframeResizer.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
iFrameResize({
log:true,
messageCallback : function(messageData){ // Callback fn when message is received
if (messageData.message.type === 'showModal') {
document.querySelector('body').style.overflow = 'hidden';
}
if (messageData.message.type === 'hideModal') {
document.querySelector('body').style.overflow = 'auto';
}
},
}, '#landscape');
});
</script>
<script src="https://landscape.cncf.io/iframeResizer.js"></script>
</div>
</body>
</main>