From 05082e3ffa3e5d2dcb62f6cb29690a2bc9fdbbaf Mon Sep 17 00:00:00 2001 From: hankhill19580 Date: Fri, 22 May 2020 01:29:28 +0000 Subject: [PATCH] On iframed i2ptunnel pages, resize the height of the iframe when a config table is expanded or contacted --- apps/i2ptunnel/jsp/js/tableSlider.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/i2ptunnel/jsp/js/tableSlider.js b/apps/i2ptunnel/jsp/js/tableSlider.js index 6410f674f1..4ff2f14c09 100644 --- a/apps/i2ptunnel/jsp/js/tableSlider.js +++ b/apps/i2ptunnel/jsp/js/tableSlider.js @@ -52,6 +52,14 @@ hideableTables.forEach(function(configTable) { } } 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() for (var i = 0, row; (row = hideableTables[0].offsetParent.rows[i]); i++) {