From 2b095f2cf039e5e2bd2266daca2d8859b9270b71 Mon Sep 17 00:00:00 2001 From: "abraham.aranguren@gmail.com" Date: Tue, 13 Sep 2011 21:39:14 +0000 Subject: [PATCH] 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 --- core/main/client/browser.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/main/client/browser.js b/core/main/client/browser.js index 2dcada66a..f6592fa5a 100644 --- a/core/main/client/browser.js +++ b/core/main/client/browser.js @@ -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; }, /**