iframe resizer use internal body, plus margin
[kengrimes.com/theme.git] / static / js / main.js
index b0ada37..13c4dae 100644 (file)
@@ -22,5 +22,5 @@ window.onload = () => {
 }
 const resizeIFrame = (iframe) => {
   iframe.style.height = 0
-  iframe.style.height = iframe.contentWindow.document.body.scrollHeight + 'px';
+  iframe.style.height = (iframe.contentWindow.document.body.scrollHeight * 1.2) + 'px';
 }