luci-app-ttyd auto fit iframe height

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Bob zhang 2021-05-14 12:32:48 +08:00 committed by Tianling Shen
parent a5a2740d7c
commit cb22ff8ea2
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -5,5 +5,9 @@
</div>
<script type="text/javascript">
document.getElementById("terminal").src = "http://" + window.location.hostname + ":7681";
document.getElementById("terminal").height = document.documentElement.clientHeight;
window.onresize = function(){
document.getElementById("terminal").height = document.documentElement.clientHeight;
}
</script>
<%+footer%>
<%+footer%>