forked from I2P_Developers/i2p.i2p
Use JS injection to allow iframe-specific I2PTunnel styling
This commit is contained in:
@ -22,8 +22,11 @@
|
|||||||
function requestAjax1() { ajax("/xhr1.jsp?requestURI=<%=request.getRequestURI()%>", "xhr", <%=intl.getRefresh()%>000); }
|
function requestAjax1() { ajax("/xhr1.jsp?requestURI=<%=request.getRequestURI()%>", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
function resizeFrame(f) { f.style.height = f.contentWindow.document.body.scrollHeight + "px"; }
|
function resizeFrame(f) { f.style.height = f.contentWindow.document.body.scrollHeight + "px"; }
|
||||||
|
function injectClass(f) { f.contentWindow.document.getElementsByTagName('body')[0].setAttribute('class', 'iframed'); }
|
||||||
function init() {
|
function init() {
|
||||||
resizeFrame(document.getElementById("i2ptunnelframe"));
|
f = document.getElementById("i2ptunnelframe");
|
||||||
|
resizeFrame(f);
|
||||||
|
injectClass(f);
|
||||||
initAjax();
|
initAjax();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -33,7 +36,7 @@
|
|||||||
|
|
||||||
<h1><%=intl._("I2P Tunnel Manager")%></h1>
|
<h1><%=intl._("I2P Tunnel Manager")%></h1>
|
||||||
<div class="main" id="main">
|
<div class="main" id="main">
|
||||||
<iframe src="/i2ptunnel/" width="100%" frameborder="0" border="0" name="i2ptunnelframe" id="i2ptunnelframe" onload="resizeFrame(document.getElementById('i2ptunnelframe'))">
|
<iframe src="/i2ptunnel/" width="100%" height="100%" frameborder="0" border="0" name="i2ptunnelframe" id="i2ptunnelframe" onload="resizeFrame(document.getElementById('i2ptunnelframe'))" allowtransparency="true">
|
||||||
</iframe>
|
</iframe>
|
||||||
</div></body></html>
|
</div></body></html>
|
||||||
<%
|
<%
|
||||||
|
@ -18,6 +18,10 @@ body {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body.iframed {
|
||||||
|
background: transparent url('images/transparent.gif') !important;
|
||||||
|
}
|
||||||
|
|
||||||
div {
|
div {
|
||||||
-moz-box-sizing: border-box;
|
-moz-box-sizing: border-box;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@ -213,6 +217,10 @@ hr {
|
|||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.iframed .panel {
|
||||||
|
margin: 16px auto -7px auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
.panel .footer {
|
.panel .footer {
|
||||||
float: right;
|
float: right;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
|
BIN
installer/resources/themes/console/dark/images/transparent.gif
Normal file
BIN
installer/resources/themes/console/dark/images/transparent.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 43 B |
Reference in New Issue
Block a user