Skip to content

Instantly share code, notes, and snippets.

@hadees
Created June 27, 2016 18:53
Show Gist options
  • Save hadees/8e268a329f653ca6a0fe4813dbd3ae7f to your computer and use it in GitHub Desktop.
Save hadees/8e268a329f653ca6a0fe4813dbd3ae7f to your computer and use it in GitHub Desktop.
$(document).ready(function() {
if(window.self !== window.top) {
var padding = 200;
var currentHeight = window.ApplicationHelpers.pageHeight() + padding;
var resizeIframeTracker = setInterval(function() {
$(document).ready(function() {
var height = window.ApplicationHelpers.pageHeight() + padding;
if(currentHeight !== height) {
message = JSON.stringify({"frameHeight": height});
window.parent.postMessage(message, "*");
currentHeight = height;
}
});
}, 200)
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment