diff --git a/frontends/ycdl_flask/static/css/common.css b/frontends/ycdl_flask/static/css/common.css index c1162c6..4912022 100644 --- a/frontends/ycdl_flask/static/css/common.css +++ b/frontends/ycdl_flask/static/css/common.css @@ -40,7 +40,7 @@ body "content_body" 1fr /1fr; - height: 100%; + min-height: 100%; margin: 0; background-color: var(--color_primary); diff --git a/frontends/ycdl_flask/static/js/common.js b/frontends/ycdl_flask/static/js/common.js index 051ef95..508b50e 100644 --- a/frontends/ycdl_flask/static/js/common.js +++ b/frontends/ycdl_flask/static/js/common.js @@ -76,6 +76,12 @@ function _request(method, url, callback) } "data": {JSON parsed from server response if json_ok}. } + + So, from most lenient to most strict, error catching might look like: + if response.meta.completed + if response.meta.json_ok + if response.meta.status === 200 + if response.meta.status === 200 and response.meta.json_ok */ const request = new XMLHttpRequest(); const response = { @@ -159,6 +165,12 @@ function html_to_element(html) return template.content.firstElementChild; } +common.size_iframe_to_content = +function size_iframe_to_content(iframe) +{ + iframe.style.height = iframe.contentWindow.document.documentElement.scrollHeight + 'px'; +} + //////////////////////////////////////////////////////////////////////////////////////////////////// // HOOKS & ADD-ONS ///////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////