forked from I2P_Developers/i2p.i2p
Separated disabling of iframe refresh from the refresh time
This commit is contained in:
@ -20,6 +20,7 @@ public class CSSHelper extends HelperBase {
|
||||
public static final String PROP_REFRESH = "routerconsole.summaryRefresh";
|
||||
public static final String DEFAULT_REFRESH = "60";
|
||||
public static final int MIN_REFRESH = 3;
|
||||
public static final String PROP_DISABLE_REFRESH = "routerconsole.summaryDisableRefresh";
|
||||
private static final String PROP_XFRAME = "routerconsole.disableXFrame";
|
||||
|
||||
public String getTheme(String userAgent) {
|
||||
@ -90,6 +91,25 @@ public class CSSHelper extends HelperBase {
|
||||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* change disable refresh boolean and save it
|
||||
* @since 0.9.1
|
||||
*/
|
||||
public void setDisableRefresh(String r) {
|
||||
String disableRefresh = "false";
|
||||
if ("0".equals(r))
|
||||
disableRefresh = "true";
|
||||
_context.router().saveConfig(PROP_DISABLE_REFRESH, disableRefresh);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if refresh is disabled
|
||||
* @since 0.9.1
|
||||
*/
|
||||
public boolean getDisableRefresh() {
|
||||
return _context.getBooleanProperty(PROP_DISABLE_REFRESH);
|
||||
}
|
||||
|
||||
/** translate the title and display consistently */
|
||||
public String title(String s) {
|
||||
StringBuilder buf = new StringBuilder(128);
|
||||
|
Reference in New Issue
Block a user