Added Firefox 8 detection

In preperation for Firefox 8 (the beta is public)



git-svn-id: https://beef.googlecode.com/svn/trunk@1385 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
bcoles@gmail.com
2011-10-30 12:07:17 +00:00
parent 5f59e198d1
commit 5ea6dd9fd2

View File

@@ -133,13 +133,21 @@ beef.browser = {
isFF7: function() {
return !!window.history.replaceState && window.navigator.userAgent.match(/Firefox\/7/) != null;
},
/**
* Returns true if FF8.
* @example: beef.browser.isFF8()
*/
isFF8: function() {
return !!window.history.replaceState && window.navigator.userAgent.match(/Firefox\/8/) != null;
},
/**
* Returns true if FF.
* @example: beef.browser.isFF()
*/
isFF: function() {
return this.isFF2() || this.isFF3() || this.isFF35() || this.isFF36() || this.isFF4() || this.isFF5() || this.isFF6() || this.isFF7();
return this.isFF2() || this.isFF3() || this.isFF35() || this.isFF36() || this.isFF4() || this.isFF5() || this.isFF6() || this.isFF7() || this.isFF8();
},
/**
@@ -332,6 +340,7 @@ beef.browser = {
FF5: this.isFF5(), // Firefox 5
FF6: this.isFF6(), // Firefox 6
FF7: this.isFF7(), // Firefox 7
FF8: this.isFF8(), // Firefox 8
FF: this.isFF(), // Firefox any version
IE6: this.isIE6(), // Internet Explorer 6
@@ -381,6 +390,7 @@ beef.browser = {
if (this.isFF5()) { return '5' }; // Firefox 5
if (this.isFF6()) { return '6' }; // Firefox 6
if (this.isFF7()) { return '7' }; // Firefox 7
if (this.isFF8()) { return '8' }; // Firefox 8
if (this.isIE6()) { return '6' }; // Internet Explorer 6