# HG changeset patch # User David Soria Parra # Date 1272873478 -7200 # Node ID b7d326bc57f92b46316411a01e6a3ba46ee291d5 # Parent 422c3b7cc6d47c980ba526f7262b0ebde3ad5627 Detect Mac OS 10.6 diff -r 422c3b7cc6d4 -r b7d326bc57f9 .hgsubstate --- a/.hgsubstate Mon May 03 09:26:55 2010 +0200 +++ b/.hgsubstate Mon May 03 09:57:58 2010 +0200 @@ -1,2 +1,2 @@ 94b9005489e807fa19bca790e7f9c9714fd3b32c content -2c5ea51eb0a0c7f440b45c1728ca6697952add3b rendered +101489a15253f144f1059b4a64e03a8a17caff59 rendered diff -r 422c3b7cc6d4 -r b7d326bc57f9 static/js/download.js --- a/static/js/download.js Mon May 03 09:26:55 2010 +0200 +++ b/static/js/download.js Mon May 03 09:57:58 2010 +0200 @@ -7,7 +7,14 @@ parse_os: function() { var OSName="Source code"; if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows"; - if (navigator.appVersion.indexOf("Mac")!=-1) OSName="Mac OS X"; + if (navigator.appVersion.indexOf("Mac")!=-1) { + if (navigator.userAgent.indexOf("10.6")!=-1 || /* firefox */ + navigator.userAgent.indexOf("10_6") !=-1) { /* chrome */ + OSName="Mac OS X 10.6"; + } else { + OSName="Mac OS X 10.5"; + } + } if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX"; if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux"; diff -r 422c3b7cc6d4 -r b7d326bc57f9 templates/base.html --- a/templates/base.html Mon May 03 09:26:55 2010 +0200 +++ b/templates/base.html Mon May 03 09:57:58 2010 +0200 @@ -14,7 +14,8 @@ {% set download = downloads[downloads['current']] %} var dl = new Download(); dl.register_download('Windows', "{{ download['Windows']}}"); - dl.register_download('Mac OS X', "{{ download['Mac OS X 10.6']}}"); + dl.register_download('Mac OS X 10.6', "{{ download['Mac OS X 10.6']}}"); + dl.register_download('Mac OS X 10.5', "{{ download['Mac OS X 10.5']}}"); dl.register_download('UNIX', "{{ download['Source code']}}"); dl.register_download('Linux', "{{ download['Source code']}}");