forked from I2P_Developers/i2p.i2p
Console: Support params on /dns
pass params to the iframe link directly to latest page from susidns bubble
This commit is contained in:
@ -371,8 +371,14 @@ class SummaryBarRenderer {
|
||||
.append(_t("Manage your I2P hosts file here (I2P domain name resolution)"))
|
||||
.append("\">")
|
||||
.append(nbsp(tx));
|
||||
addBubble(rbuf, PortMapper.SVC_SUSIDNS);
|
||||
rbuf.append("</a>\n");
|
||||
StringBuilder bbuf = new StringBuilder(128);
|
||||
addBubble(bbuf, PortMapper.SVC_SUSIDNS);
|
||||
if (bbuf.length() > 0) {
|
||||
rbuf.append("<a href=\"/dns?book=router&filter=latest\" target=\"_top\">");
|
||||
rbuf.append(bbuf);
|
||||
rbuf.append("</a>\n");
|
||||
}
|
||||
svcs.put(tx, rbuf.toString());
|
||||
}
|
||||
|
||||
|
@ -10,11 +10,19 @@
|
||||
%>
|
||||
<jsp:setProperty name="tester" property="contextId" value="<%=i2pcontextId1%>" />
|
||||
<%
|
||||
// take /dns query params and pass to the iframe
|
||||
String isrc;
|
||||
String query = request.getQueryString();
|
||||
if (query != null)
|
||||
isrc = "/susidns/addressbook?" + query;
|
||||
else
|
||||
isrc = "/susidns/index";
|
||||
|
||||
// CSSHelper is also pulled in by css.jsi below...
|
||||
boolean testIFrame = tester.allowIFrame(request.getHeader("User-Agent"));
|
||||
if (!testIFrame) {
|
||||
response.setStatus(307);
|
||||
response.setHeader("Location", "/susidns/index");
|
||||
response.setHeader("Location", isrc);
|
||||
// force commitment
|
||||
response.getOutputStream().close();
|
||||
return;
|
||||
@ -43,11 +51,11 @@
|
||||
</script>
|
||||
</head><body>
|
||||
<%@include file="summary.jsi" %>
|
||||
<h1><%=intl._t("I2P Address Book")%> <span class="newtab"><a href="/susidns/index" target="_blank" title="<%=intl._t("Open in new tab")%>"><img src="<%=intl.getTheme(request.getHeader("User-Agent"))%>images/newtab.png" /></a></span></h1>
|
||||
<h1><%=intl._t("I2P Address Book")%> <span class="newtab"><a href="<%=isrc%>" target="_blank" title="<%=intl._t("Open in new tab")%>"><img src="<%=intl.getTheme(request.getHeader("User-Agent"))%>images/newtab.png" /></a></span></h1>
|
||||
<div class="main" id="dns">
|
||||
<iframe src="/susidns/index" width="100%" height="100%" frameborder="0" border="0" name="susidnsframe" id="susidnsframe" allowtransparency="true">
|
||||
<iframe src="<%=isrc%>" width="100%" height="100%" frameborder="0" border="0" name="susidnsframe" id="susidnsframe" allowtransparency="true">
|
||||
<%=intl._t("Your browser does not support iFrames.")%>
|
||||
<a href="/susidns/index"><%=intl._t("Click here to continue.")%></a>
|
||||
<a href="<%=isrc%>"><%=intl._t("Click here to continue.")%></a>
|
||||
</iframe>
|
||||
</div></body></html>
|
||||
<%
|
||||
|
Reference in New Issue
Block a user