Patched browser detection

Revision 1285 broke browser hooking for Opera, Chrome and Safari.

This commit should fix this issue. Also:

Fixes issue 514
Fixes issue 503



git-svn-id: https://beef.googlecode.com/svn/trunk@1291 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
bcoles@gmail.com
2011-09-16 06:21:13 +00:00
parent 96f547429d
commit 9127bbeb88

View File

@@ -107,7 +107,7 @@ beef.browser = {
* @example: beef.browser.isFF4()
*/
isFF4: function() {
return !!window.globalStorage && !!window.history.replaceState && ((parseInt(window.navigator.userAgent.match(/Firefox\/(\d+)\./)[1], 11)==4)?true:false);
return !!window.globalStorage && !!window.history.replaceState && window.navigator.userAgent.match(/Firefox\/4/) != null;
},
/**
@@ -115,8 +115,7 @@ beef.browser = {
* @example: beef.browser.isFF5()
*/
isFF5: function() {
//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);
return !!window.history.replaceState && window.navigator.userAgent.match(/Firefox\/5/) != null;
},
/**
@@ -124,8 +123,7 @@ beef.browser = {
* @example: beef.browser.isFF6()
*/
isFF6: function() {
//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);
return !!window.history.replaceState && window.navigator.userAgent.match(/Firefox\/6/) != null;
},
/**
@@ -133,11 +131,9 @@ beef.browser = {
* @example: beef.browser.isFF()
*/
isFF: function() {
result=this.isFF2() || this.isFF3() || this.isFF35() || this.isFF36() || this.isFF4() || this.isFF5() || this.isFF6();
//alert('result='+result);
return result;
return this.isFF2() || this.isFF3() || this.isFF35() || this.isFF36() || this.isFF4() || this.isFF5() || this.isFF6();
},
/**
* Returns true if Safari 4.xx
* @example: beef.browser.isS4()