master
Skylar Ittner 4 years ago
parent 54a23f8417
commit e5c947c4a4

@ -264,7 +264,13 @@ if (isset($_GET["embed"])) {
?> ?>
<script nonce="<?php echo $SECURE_NONCE; ?>"> <script nonce="<?php echo $SECURE_NONCE; ?>">
window.addEventListener("load", function () { window.addEventListener("load", function () {
parent.window.postMessage(document.documentElement.scrollHeight + "px", "*"); // https://stackoverflow.com/questions/1145850/how-to-get-height-of-entire-document-with-javascript
var body = document.body,
html = document.documentElement;
var height = Math.max(body.scrollHeight, body.offsetHeight,
html.clientHeight, html.scrollHeight, html.offsetHeight);
parent.window.postMessage(height + "px", "*");
}); });
</script> </script>
<?php <?php

Loading…
Cancel
Save