Skip to content

Commit

Permalink
Remove iframe detection, always send message.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Thulin committed Jan 9, 2024
1 parent 352eed0 commit 0a47cc8
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,15 @@
</div>

<script>
if(window.location !== window.parent.location) {
document.querySelector("html, body").style.height = "auto";
const sendMessageToParent = () => {
window.parent.postMessage({
height: document.body.clientHeight
}, '*');
};sendMessageToParent();
new ResizeObserver(() => {
sendMessageToParent();
}).observe(document.body);
}
document.querySelector("html, body").style.height = "auto";
const sendMessageToParent = () => {
window.parent.postMessage({
height: document.body.clientHeight
}, '*');
};sendMessageToParent();
new ResizeObserver(() => {
sendMessageToParent();
}).observe(document.body);
</script>
</body>
</html>

0 comments on commit 0a47cc8

Please sign in to comment.