Skip to content

Commit 37490d2

Browse files
committed
message about page size to websites, which will try to include this page in an iframe
1 parent 01f55f6 commit 37490d2

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

index-pl.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,4 +429,5 @@ <h2>Rekomendacje</h2>
429429
</aside>
430430
</div>
431431
</body>
432+
<script src="script.js"></script>
432433
</html>

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,4 +449,5 @@ <h2>Recommendations</h2>
449449
</aside>
450450
</div>
451451
</body>
452+
<script src="script.js"></script>
452453
</html>

script.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
window.onload = function () {
2+
window.parent.postMessage(
3+
{ type: "size", height: document.body.scrollHeight, width: document.body.scrollWidth },
4+
"*"
5+
);
6+
};

0 commit comments

Comments
 (0)