merge of '565f0421784f8f71177ebf0bd682750f98bce67b'

and 'e9067362adb090ff1e3d8ae327fb313ded00e9c6'
This commit is contained in:
zzz
2009-07-11 22:32:29 +00:00
22 changed files with 115 additions and 63 deletions

View File

@@ -512,7 +512,8 @@ public class I2PSnarkServlet extends HttpServlet {
Map.Entry entry = (Map.Entry)iter.next();
String name = (String)entry.getKey();
String baseURL = (String)entry.getValue();
if (!baseURL.startsWith(announce))
if (!(baseURL.startsWith(announce) || // vvv hack for non-b64 announce in list vvv
(announce.startsWith("http://lnQ6yoBT") && baseURL.startsWith("http://tracker2.postman.i2p/"))))
continue;
int e = baseURL.indexOf('=');
if (e < 0)

View File

@@ -9,12 +9,17 @@ public class CSSHelper extends HelperBase {
public static final String PROP_THEME_NAME = "routerconsole.theme";
private static final String BASE = "/themes/console/";
private static final String FORCE = "classic";
public String getTheme() {
public String getTheme(String userAgent) {
String url = BASE;
String theme = _context.getProperty(PROP_THEME_NAME);
if (theme != null)
url += theme + "/";
if (userAgent != null && userAgent.contains("MSIE")) {
url += FORCE + "/";
} else {
String theme = _context.getProperty(PROP_THEME_NAME);
if (theme != null)
url += theme + "/";
}
return url;
}
}

View File

@@ -17,4 +17,4 @@
%>
<jsp:useBean class="net.i2p.router.web.CSSHelper" id="cssHelper" scope="request" />
<jsp:setProperty name="cssHelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<link href="<%=cssHelper.getTheme()%>console.css" rel="stylesheet" type="text/css" />
<link href="<%=cssHelper.getTheme(request.getHeader("User-Agent"))%>console.css" rel="stylesheet" type="text/css" />