Created
June 27, 2016 18:53
-
-
Save hadees/8e268a329f653ca6a0fe4813dbd3ae7f to your computer and use it in GitHub Desktop.
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
$(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