MsRewards-Reborn/Flask/templates/dev.html

29 lines
864 B
HTML

{% extends "base.html" %}
{% block left_pannel %}
{% endblock %}
{% 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>
<script>
var myIframe = document.getElementById('iframe');
myIframe.addEventListener("load", function() {
myIframe.contentWindow.scrollTo(0, myIframe.contentDocument.body.scrollHeight);
});
window.setInterval(function() {
reloadIFrame()
}, 500);
function reloadIFrame() {
console.log('reloading..');
document.getElementById('iframe').contentWindow.location.reload();
}
</script>
{% endif %}
{% endblock %}