diff --git a/Flask/static/js/main.js b/Flask/static/js/main.js index 5b184ff..70581ea 100644 --- a/Flask/static/js/main.js +++ b/Flask/static/js/main.js @@ -72,6 +72,7 @@ function change_logs(value) { myIframe.addEventListener("load", function() { let doc = myIframe.contentDocument; doc.body.innerHTML = doc.body.innerHTML + ''; + myIframe.contentWindow.scrollTo(0, myIframe.contentDocument.body.scrollHeight); }); myIframe.src = "/static/logs/" + value + ".txt"; diff --git a/Flask/templates/dev.html b/Flask/templates/dev.html index b322fb3..5b4f4df 100644 --- a/Flask/templates/dev.html +++ b/Flask/templates/dev.html @@ -19,6 +19,8 @@ function reloadIFrame() { console.log('reloading..'); document.getElementById('iframe').contentWindow.location.reload(); + var myIframe = document.getElementById('iframe'); + myIframe.contentWindow.scrollTo(0, myIframe.contentDocument.body.scrollHeight); } {% endif %}