From 45db9eb67cf858dd842248e9817791803d19d9ce Mon Sep 17 00:00:00 2001 From: piair Date: Wed, 27 Sep 2023 11:34:47 +0200 Subject: [PATCH] =?UTF-8?q?d=C3=A9j=C3=A0=20skip=20la=206.6.6=20;(?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Flask/static/js/main.js | 1 + Flask/templates/dev.html | 2 ++ 2 files changed, 3 insertions(+) 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 %}