Detect user resolutionTag(s): Varia


function isLowRes() {
  /*
  ** Check if the browser is running in a low-resolution environment
  ** try to use the screen object (in N4 or e4). If not available, 
  ** try to use Java.If not available, assume low-res.
  ** returns true if in a low-resolution environment (width < 800 pixels)
  */
  if (self.screen) 
    return (screen.width < 800);
  else 
    if (navigator.javaEnabled && navigator.javaEnabled())
      return 
        (java.awt.Toolkit.getDefaultToolkit().getScreenSize().width < 800);
    else
      return true;
  }

blog comments powered by Disqus