normalement ca marche

This commit is contained in:
piair
2023-09-27 19:59:48 +02:00
parent e6f3d66f7b
commit 11d30491c6
3 changed files with 7 additions and 6 deletions

View File

@ -10,9 +10,6 @@
<iframe id="iframe" src="{{url_for('static', filename='logs/dev.txt')}}" width="100%" height="80%"></iframe>
<script>
function delay(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
var myIframe = document.getElementById('iframe');
myIframe.addEventListener("load", async () => {
@ -20,8 +17,8 @@
await delay(2000);
document.getElementById('iframe').contentWindow.location.reload();
});
function descendre() {myIframe.contentWindow.scrollTo(0, myIframe.contentDocument.body.scrollHeight);}
window.setInterval(descendre(), 500);
window.setInterval(function() {document.getElementById('iframe').contentWindow.scrollTo(0, myIframe.contentDocument.body.scrollHeight);}, 500);
</script>
{% endif %}