Package net.i2p.router.web
Class CSSHelper
- java.lang.Object
-
- net.i2p.router.web.HelperBase
-
- net.i2p.router.web.CSSHelper
-
public class CSSHelper extends HelperBase
Copied and modded from I2PTunnel IndexBean (GPL)- Author:
- zzz
-
-
Field Summary
Fields Modifier and Type Field Description static StringALT_THEMEstatic StringBASE_THEME_PATHstatic booleanDEFAULT_DISABLE_OLDstatic StringDEFAULT_REFRESHstatic StringDEFAULT_THEMEstatic intMIN_REFRESHstatic StringPROP_DISABLE_OLDstatic StringPROP_DISABLE_REFRESHstatic StringPROP_EMBED_APPSstatic StringPROP_FORCE_MOBILE_CONSOLEstatic StringPROP_REFRESHstatic StringPROP_THEME_NAMEstatic StringPROP_THEME_PFXstatic StringPROP_UNIVERSAL_THEMING-
Fields inherited from class net.i2p.router.web.HelperBase
_context, _out, CHECKED, PROP_ADVANCED, SELECTED
-
-
Constructor Summary
Constructors Constructor Description CSSHelper()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallowIFrame(String ua)Should we allow a refreshing IFrame?booleanembedApps()Returns whether app embedding is enabled or disabledbooleangetDisableRefresh()StringgetLang()needed for conditional css loads for zhstatic StringgetNonce()formerly stored in System.getProperty("router.consoleNonce")StringgetRefresh()StringgetTheme(String userAgent)voidsetDisableRefresh(String r)change disable refresh boolean and save itvoidsetLang(String lang)change default language for the router AND save itvoidsetNews(String val)Show / hide news on home pagevoidsetRefresh(String r)change refresh and save itbooleanshouldSendXFrame()Should we send X_Frame_Options=SAMEORIGIN Default trueStringtitle(String s)translate the title and display consistently-
Methods inherited from class net.i2p.router.web.HelperBase
_t, _t, _t, _x, getChecked, isAdvanced, ngettext, setContextId, storeWriter
-
-
-
-
Field Detail
-
PROP_UNIVERSAL_THEMING
public static final String PROP_UNIVERSAL_THEMING
- See Also:
- Constant Field Values
-
PROP_THEME_NAME
public static final String PROP_THEME_NAME
- See Also:
- Constant Field Values
-
PROP_THEME_PFX
public static final String PROP_THEME_PFX
- Since:
- 0.9.33 moved from ConfigUIHelper
- See Also:
- Constant Field Values
-
DEFAULT_THEME
public static final String DEFAULT_THEME
- See Also:
- Constant Field Values
-
ALT_THEME
public static final String ALT_THEME
- See Also:
- Constant Field Values
-
BASE_THEME_PATH
public static final String BASE_THEME_PATH
- See Also:
- Constant Field Values
-
PROP_REFRESH
public static final String PROP_REFRESH
- See Also:
- Constant Field Values
-
DEFAULT_REFRESH
public static final String DEFAULT_REFRESH
- See Also:
- Constant Field Values
-
MIN_REFRESH
public static final int MIN_REFRESH
- See Also:
- Constant Field Values
-
PROP_DISABLE_REFRESH
public static final String PROP_DISABLE_REFRESH
- See Also:
- Constant Field Values
-
PROP_FORCE_MOBILE_CONSOLE
public static final String PROP_FORCE_MOBILE_CONSOLE
- See Also:
- Constant Field Values
-
PROP_EMBED_APPS
public static final String PROP_EMBED_APPS
- Since:
- 0.9.32
- See Also:
- Constant Field Values
-
PROP_DISABLE_OLD
public static final String PROP_DISABLE_OLD
- Since:
- 0.9.36
- See Also:
- Constant Field Values
-
DEFAULT_DISABLE_OLD
public static final boolean DEFAULT_DISABLE_OLD
- See Also:
- Constant Field Values
-
-
Method Detail
-
getNonce
public static String getNonce()
formerly stored in System.getProperty("router.consoleNonce")- Since:
- 0.9.4
-
embedApps
public boolean embedApps()
Returns whether app embedding is enabled or disabled- Since:
- 0.9.32
-
setLang
public void setLang(String lang)
change default language for the router AND save it- Parameters:
lang- xx OR xx_XX OR xxx OR xxx_XX
-
getLang
public String getLang()
needed for conditional css loads for zh- Returns:
- two-letter only, lower-case
-
setNews
public void setNews(String val)
Show / hide news on home page- Parameters:
val- if non-null, "1" to show, else hide- Since:
- 0.8.12
-
shouldSendXFrame
public boolean shouldSendXFrame()
Should we send X_Frame_Options=SAMEORIGIN Default true- Since:
- 0.9.1
-
setRefresh
public void setRefresh(String r)
change refresh and save it
-
getRefresh
public String getRefresh()
- Returns:
- refresh time in seconds, as a string
-
setDisableRefresh
public void setDisableRefresh(String r)
change disable refresh boolean and save it- Since:
- 0.9.1
-
getDisableRefresh
public boolean getDisableRefresh()
- Returns:
- true if refresh is disabled
- Since:
- 0.9.1
-
allowIFrame
public boolean allowIFrame(String ua)
Should we allow a refreshing IFrame?- Since:
- 0.8.5
-
-