Fix for Issue 503: Firefox is identified as Safari:

Under certain configurations Firefox was incorrectly being detected as Safari, this happened because !!window.globalStorage returns false on at least some Firefox 5 and Firefox 6 browser configurations such as mine.

git-svn-id: https://beef.googlecode.com/svn/trunk@1285 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
abraham.aranguren@gmail.com
2011-09-13 21:39:14 +00:00
parent d33e9f88b5
commit 2b095f2cf0

View File

@@ -115,7 +115,8 @@ beef.browser = {
* @example: beef.browser.isFF5()
*/
isFF5: function() {
return !!window.globalStorage && !!window.history.replaceState && ((parseInt(window.navigator.userAgent.match(/Firefox\/(\d+)\./)[1], 11)==5)?true:false);
//abraham.aranguren: !!window.globalStorage returns false on some Firefox 5 browsers such as mine
return !!window.history.replaceState && ((parseInt(window.navigator.userAgent.match(/Firefox\/(\d+)\./)[1], 11)==5)?true:false);
},
/**
@@ -123,7 +124,8 @@ beef.browser = {
* @example: beef.browser.isFF6()
*/
isFF6: function() {
return !!window.globalStorage && !!window.history.replaceState && ((parseInt(window.navigator.userAgent.match(/Firefox\/(\d+)\./)[1], 11)==6)?true:false);
//abraham.aranguren: !!window.globalStorage returns false on some Firefox 6 browsers such as mine
return !!window.history.replaceState && ((parseInt(window.navigator.userAgent.match(/Firefox\/(\d+)\./)[1], 11)==6)?true:false);
},
/**
@@ -131,7 +133,9 @@ beef.browser = {
* @example: beef.browser.isFF()
*/
isFF: function() {
return this.isFF2() || this.isFF3() || this.isFF35() || this.isFF36() || this.isFF4() || this.isFF5() || this.isFF6();
result=this.isFF2() || this.isFF3() || this.isFF35() || this.isFF36() || this.isFF4() || this.isFF5() || this.isFF6();
//alert('result='+result);
return result;
},
/**