Fix typos in 'beef.hardware.cpuType()' and OS detection

This commit is contained in:
bcoles
2013-02-03 03:36:41 +10:30
parent 7dc1882427
commit 10bdcce34a
2 changed files with 9 additions and 9 deletions

View File

@@ -10,19 +10,19 @@ beef.hardware = {
cpuType: function() {
// IE
if ((typeof navigator.cpuClass != 'undefined')) {
if (typeof navigator.cpuClass != 'undefined') {
cpu = navigator.cpuClass;
if (cpu == "x86") return "32-bit";
if (cpu == "68K") return "Motorola 68K":
if (cpu == "68K") return "Motorola 68K";
if (cpu == "PPC") return "Motorola PPC";
if (cpu == "Alpha") return "Digital";
if (this.ua.match('Win64; IA64') return "64-bit (Intel)";
if (this.ua.match('Win64; x64') return "64-bit (AMD)";
if (this.ua.match('Win64; IA64')) return "64-bit (Intel)";
if (this.ua.match('Win64; x64')) return "64-bit (AMD)";
// Firefox
} else if ((typeof navigator.oscpu != 'undefined' {
if (navigator.oscpu.match('WOW64|x64|x86_64)') return "64-bit";
} else if (typeof navigator.oscpu != 'undefined') {
if (navigator.oscpu.match('(WOW64|x64|x86_64)')) return "64-bit";
}
if (navigator.platform.toLowerCase() == "win64") return "64-bit"
if (navigator.platform.toLowerCase() == "win64") return "64-bit";
return "32-bit";
},

View File

@@ -9,7 +9,7 @@ beef.os = {
ua: navigator.userAgent,
isWin311: function() {
return (this.ua.match('(Win16')) ? true : false;
return (this.ua.match('(Win16)')) ? true : false;
},
isWinNT4: function() {
@@ -28,7 +28,7 @@ beef.os = {
},
isWinME: function() {
return (this.ua.match('(Windows ME)|(Win 9x 4.90')) ? true : false;
return (this.ua.match('(Windows ME)|(Win 9x 4.90)')) ? true : false;
},
isWin2000: function() {