forked from I2P_Developers/i2p.i2p
* Console:
- Parameterize download button tags (ticket #425) - Clean up summary bar HTML warnings - Just display a summary bar link for text browsers - Move welcome div from the readme files to index.jsp - Require a nonce to change language
This commit is contained in:
@ -28,11 +28,13 @@ public class CSSHelper extends HelperBase {
|
||||
return url;
|
||||
}
|
||||
|
||||
/** change default language for the router but don't save it */
|
||||
/** change default language for the router AND save it */
|
||||
public void setLang(String lang) {
|
||||
// TODO: Protect with nonce or require POST
|
||||
if (lang != null && lang.length() == 2)
|
||||
// Protected with nonce in css.jsi
|
||||
if (lang != null && lang.length() == 2 && !lang.equals(_context.getProperty(Messages.PROP_LANG))) {
|
||||
_context.router().setConfigSetting(Messages.PROP_LANG, lang);
|
||||
_context.router().saveConfig();
|
||||
}
|
||||
}
|
||||
|
||||
/** needed for conditional css loads for zh */
|
||||
@ -61,4 +63,13 @@ public class CSSHelper extends HelperBase {
|
||||
.append("</title>");
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Should we allow a refreshing IFrame?
|
||||
* @since 0.8.5
|
||||
*/
|
||||
public boolean allowIFrame(String ua) {
|
||||
return ua == null || !(ua.startsWith("Lynx") || ua.startsWith("w3m") ||
|
||||
ua.startsWith("ELinks") || ua.startsWith("Dillo"));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user