comparison static/js/download.js @ 308:b7d326bc57f9

Detect Mac OS 10.6
author David Soria Parra <dsp@php.net>
date Mon, 03 May 2010 09:57:58 +0200
parents 59e0087c784a
children 1de4a7a49d94
comparison
equal deleted inserted replaced
307:422c3b7cc6d4 308:b7d326bc57f9
5 Download.prototype = { 5 Download.prototype = {
6 6
7 parse_os: function() { 7 parse_os: function() {
8 var OSName="Source code"; 8 var OSName="Source code";
9 if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows"; 9 if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows";
10 if (navigator.appVersion.indexOf("Mac")!=-1) OSName="Mac OS X"; 10 if (navigator.appVersion.indexOf("Mac")!=-1) {
11 if (navigator.userAgent.indexOf("10.6")!=-1 || /* firefox */
12 navigator.userAgent.indexOf("10_6") !=-1) { /* chrome */
13 OSName="Mac OS X 10.6";
14 } else {
15 OSName="Mac OS X 10.5";
16 }
17 }
11 if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX"; 18 if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX";
12 if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux"; 19 if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux";
13 20
14 return OSName; 21 return OSName;
15 }, 22 },