# HG changeset patch # User David Soria Parra # Date 1274691078 -7200 # Node ID 5bd86f67ebb378cdadbb75f4037454764e9b6cd6 # Parent 8ed8a4121eac1dc4e939d1253677fd6cab446275# Parent 657b465caaa2b68b370be0567cae9f553433310c Merge http://hg.grauw.nl/hg-website/ diff -r 8ed8a4121eac -r 5bd86f67ebb3 static/js/download.js --- a/static/js/download.js Fri May 21 09:14:41 2010 +0200 +++ b/static/js/download.js Mon May 24 10:51:18 2010 +0200 @@ -1,5 +1,5 @@ function Download() { - this.downloads = new Array(); + this.downloads = {}; } Download.prototype = { @@ -26,7 +26,12 @@ }, os_link: function() { - document.location.href = this.downloads[this.parse_os()]; + var os = this.parse_os(); + if (this.downloads[os]) { + document.location.href = this.downloads[os]; + return false; + } + return true; }, register_download:function(type, url) { diff -r 8ed8a4121eac -r 5bd86f67ebb3 templates/base.html --- a/templates/base.html Fri May 21 09:14:41 2010 +0200 +++ b/templates/base.html Mon May 24 10:51:18 2010 +0200 @@ -58,7 +58,7 @@
{% block sidebar %} - + Download now Mercurial {{ downloads['current'] }}