diff options
Diffstat (limited to 'web/templates/run.html')
| -rw-r--r-- | web/templates/run.html | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/web/templates/run.html b/web/templates/run.html index 77f9f90..92d7843 100644 --- a/web/templates/run.html +++ b/web/templates/run.html @@ -10,9 +10,12 @@ {% for n in run %} <script> - document.getElementById('stdout').textContent = {{ n|tojson }}; - var s = document.currentScript; - s.parentNode.removeChild(s); + if (document.getElementById('stdout').textContent !== {{ n|tojson }}) { + document.getElementById('stdout').textContent = {{ n|tojson }}; + window.scrollTo({ left: 0, top: document.body.scrollHeight, behavior: "smooth" }); + } + var s = document.currentScript; + s.parentNode.removeChild(s); </script> {% endfor %} {% endblock %} |
