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 Details

  • Constructor Details

    • CSSHelper

      public CSSHelper()
  • Method Details

    • getNonce

      public static String getNonce()
      formerly stored in System.getProperty("router.consoleNonce")
      Since:
      0.9.4
    • getTheme

      public String getTheme(String userAgent)
    • setTheme

      public void setTheme(String theme)
      So we don't have to refresh after saving. Called from css.jsi.
      Since:
      0.9.52
    • 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
    • title

      public String title(String s)
      translate the title and display consistently
    • allowIFrame

      public boolean allowIFrame(String ua)
      Should we allow a refreshing IFrame?
      Since:
      0.8.5