From 29707c3b13c9a72f80c23f5370e7441331c9043c Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 1 Nov 2020 21:21:55 +0100 Subject: [PATCH] always adjust iframe height --- UI/GeneralUI.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/UI/GeneralUI.js b/UI/GeneralUI.js index 53b33e4..66a82fa 100644 --- a/UI/GeneralUI.js +++ b/UI/GeneralUI.js @@ -98,13 +98,10 @@ export class GeneralUI const length = e.length; for (let i = 0; i < length; ++i) { - if (e[i].contentWindow.document.readyState === 'complete') { - e[i].height = e[i].contentWindow.document.body.scrollHeight + 25; - } else { - e[i].addEventListener('load', function() { - this.height = this.contentWindow.document.body.scrollHeight + 25; - }); - } + e[i].height = e[i].contentWindow.document.body.scrollHeight + 25; + e[i].addEventListener('load', function() { + this.height = this.contentWindow.document.body.scrollHeight + 25; + }); } }