On iframed i2ptunnel pages, resize the height of the iframe when a config table is expanded or contacted

This commit is contained in:
hankhill19580
2020-05-22 01:29:28 +00:00
parent 4b655070d4
commit 05082e3ffa

View File

@ -52,6 +52,14 @@ hideableTables.forEach(function(configTable) {
} }
} }
configTable.parentNode.style.visibility = "visible"; configTable.parentNode.style.visibility = "visible";
var iiframe = document.getElementById("i2ptunnelframe");
if (iiframe != null) {
var adjustHeight = 0;
for (var child = frame.firstChild; child !== null; child.nextSibling){
adjustHeight += child.offsetHeight;
}
iiframe.height = adjustHeight;
}
}; };
showAllControls() showAllControls()
for (var i = 0, row; (row = hideableTables[0].offsetParent.rows[i]); i++) { for (var i = 0, row; (row = hideableTables[0].offsetParent.rows[i]); i++) {