[fusion-commits] r2915 - trunk/common
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Sun Jun 14 07:06:05 PDT 2015
Author: jng
Date: 2015-06-14 07:06:05 -0700 (Sun, 14 Jun 2015)
New Revision: 2915
Modified:
trunk/common/browserdetect.js
Log:
#633: Update browserdetect.js
Modified: trunk/common/browserdetect.js
===================================================================
--- trunk/common/browserdetect.js 2015-06-04 14:22:45 UTC (rev 2914)
+++ trunk/common/browserdetect.js 2015-06-14 14:06:05 UTC (rev 2915)
@@ -1,12 +1,16 @@
var agent = navigator.userAgent.toLowerCase();
var firefox = agent.indexOf("firefox") != -1;
var opera = agent.indexOf("opera") != -1;
+var chrome = agent.indexOf("chrome") != -1;
var safariIndex = agent.indexOf("safari");
var safari1or2 = false;
var safari3plus = false;
var safari = false;
-if(safariIndex != -1)
+
+var macOS = navigator.appVersion.indexOf("Mac")!=-1;
+
+if(!chrome && safariIndex != -1)
{
safari = true;
var safariVersion = agent.substr(safariIndex + 7, 3);
@@ -27,7 +31,8 @@
if(msieIndex != -1)
{
msie = true;
- var msieVersion = agent.substr(msieIndex + 5, 1);
+ var msieVersion = agent.substr(msieIndex + 5, 2);
+
if(parseFloat(msieVersion) >= 7)
{
msie7plus = true;
@@ -37,3 +42,12 @@
msie6minus = true;
}
}
+
+function getAttributeNodeValue(obj,attr){
+
+ if(obj[attr])
+ return obj[attr];
+ else
+ return obj.attributes[attr].nodeValue;
+
+}
More information about the fusion-commits
mailing list