velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cbris...@apache.org
Subject svn commit: r511098 - /velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/BrowserSnifferTool.java
Date Fri, 23 Feb 2007 20:40:40 GMT
Author: cbrisson
Date: Fri Feb 23 12:40:40 2007
New Revision: 511098

URL: http://svn.apache.org/viewvc?view=rev&rev=511098
Log:
added some user agents for new OSes and browsers

Modified:
    velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/BrowserSnifferTool.java

Modified: velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/BrowserSnifferTool.java
URL: http://svn.apache.org/viewvc/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/BrowserSnifferTool.java?view=diff&rev=511098&r1=511097&r2=511098
==============================================================================
--- velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/BrowserSnifferTool.java
(original)
+++ velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/BrowserSnifferTool.java
Fri Feb 23 12:40:40 2007
@@ -50,7 +50,10 @@
  * </ul>
  *
  * Thanks to Lee Semel (lee@semel.net), the author of the HTTP::BrowserDetect Perl module.
- * See also http://www.zytrax.com/tech/web/browser_ids.htm and http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html
+ * See also:
+ * * http://www.zytrax.com/tech/web/browser_ids.htm
+ * * http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html
+ * * http://en.wikipedia.org/wiki/User_agent
  *
  * @author <a href="mailto:claude@renegat.net">Claude Brisson</a>
  * @since VelocityTools 1.2
@@ -143,7 +146,17 @@
 
     public boolean getFirefox()
     {
-        return test("firefox") || test("firebird") || test("phoenix");
+        return test("firefox") || test("firebird") || test("phoenix") || test("iceweasel");
+    }
+
+    public boolean getIceweasel()
+    {
+        return test("iceweasel");
+    }
+
+    public boolean getEpiphany()
+    {
+        return test("epiphany");
     }
 
     public boolean getSafari()
@@ -262,6 +275,16 @@
         return getIe() && getMajorVersion() >= 6;
     }
 
+    public boolean getIe7()
+    {
+        return getIe() && getMajorVersion() == 7;
+    }
+
+    public boolean getIe7up()
+    {
+        return getIe() && getMajorVersion() >= 6;
+    }
+
     public boolean getNeoplanet()
     {
         return test("neoplanet");
@@ -332,6 +355,16 @@
         return test("opera 7") || test("opera/7");
     }
 
+    public boolean getOpera8()
+    {
+        return test("opera 8") || test("opera/8");
+    }
+
+    public boolean getOpera9()
+    {
+        return test("opera/9");
+    }
+
     public boolean getHotjava()
     {
         return test("hotjava");
@@ -552,6 +585,11 @@
     public boolean getWinxp()
     {
         return test("nt 5.1");
+    }
+
+    public boolean getVista()
+    {
+        return test("nt 6.0");
     }
 
     public boolean getDotnet()



Mime
View raw message