MsRewards/Flask/templates/dev.html

27 lines
951 B
HTML
Raw Normal View History

2023-06-17 16:52:47 +02:00
{% extends "base.html" %}
2023-09-27 19:55:43 +02:00
{% block left_pannel %}{% endblock %}
2023-06-17 16:52:47 +02:00
{% block content %}
{%if not current_user.is_authenticated %}
<button class="unselected" onclick="location.href = '/login';">login</button>
{% else %}
<iframe id="iframe" src="{{url_for('static', filename='logs/dev.txt')}}" width="100%" height="80%"></iframe>
2023-06-17 16:52:47 +02:00
2023-09-27 10:25:54 +02:00
<script>
var myIframe = document.getElementById('iframe');
2023-09-27 19:38:21 +02:00
myIframe.addEventListener("load", async () => {
2023-09-27 19:55:43 +02:00
myIframe.contentDocument.body.innerHTML = myIframe.contentDocument.body.innerHTML + '<style>html{color:white;}</style>';
2023-09-27 19:38:21 +02:00
await delay(2000);
2023-09-27 10:25:54 +02:00
document.getElementById('iframe').contentWindow.location.reload();
});
2023-09-27 19:59:48 +02:00
2023-09-27 20:05:39 +02:00
window.setInterval(function() {
document.getElementById('iframe').contentWindow.scrollTo(0, myIframe.contentDocument.body.scrollHeight);
}, 500);
2023-09-27 19:55:43 +02:00
2023-09-27 10:25:54 +02:00
</script>
2023-06-17 16:52:47 +02:00
{% endif %}
{% endblock %}