This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

website: Fix download link on win, un-break industry section

  • Loading branch information...
isaacs committed Aug 22, 2012
1 parent 99ad52e commit 1597ce0eb3c1a836d9af3a02d9f07460dc939920
Showing with 36 additions and 36 deletions.
  1. +36 −36 doc/index.html
View
@@ -39,41 +39,6 @@
<a href="http://github.com/joyent/node"><img class="forkme" src="images/forkme.png" alt="Fork me on GitHub"></a>
</div>
- <script>;(function(d,n){
- var os = n.platform.match(/(Win|Mac|Linux)/);
- var x = n.userAgent.match(/x86_64|Win64|WOW64/) || n.cpuClass === 'x64' ?
- 'x64' : 'x86';
- var base = 'http://nodejs.org/dist/__VERSION__/';
- var href = 'node-__VERSION__.tar.gz';
- var db = d.getElementById('downloadbutton');
- var d2;
- switch (os && os[1]) {
- case 'Mac':
- href = 'node-__VERSION__.pkg';
- break;
- case 'Win':
- href = 'node-__VERSION__-x' + x + '.msi';
- break;
-
- // TODO uncomment when we have these
- // case 'Linux':
- // // two buttons: .deb and .rpm
- // href = 'node-__VERSION__-' + x + '.rpm';
- // var d2 = document.createElement('a');
- // d2.href = base + 'node-__VERSION__-' + x + '.deb';
- // d2.className = 'button downloadbutton';
- // d2.innerHTML = 'INSTALL .deb';
- // db.innerHTML = 'INSTALL .rpm';
- // db.parentNode.insertBefore(d2, db);
- // break;
- }
-
- db.href = base + href;
- // if there's one download option, then download it at #download
- if (location.hash === '#download' && !d2)
- location.replace(b.href);
- })(document,navigator);</script>
-
<div id="quotes" class="clearfix">
<h2>Node.js in the Industry</h2>
<ul>
@@ -195,6 +160,41 @@ <h2>Explore Node.js</h2>
g.src = '//www.google-analytics.com/ga.js';
s.parentNode.insertBefore(g, s);
}(document, 'script'));
+ ;(function(d,n) {
+ var os = n.platform.match(/(Win|Mac|Linux)/);
+ var x = n.userAgent.match(/x86_64|Win64|WOW64/) ||
+ n.cpuClass === 'x64' ? 'x64' : 'x86';
+ var base = 'http://nodejs.org/dist/__VERSION__/';
+ var href = 'node-__VERSION__.tar.gz';
+ var db = d.getElementById('downloadbutton');
+ var d2;
+ switch (os && os[1]) {
+ case 'Mac':
+ href = 'node-__VERSION__.pkg';
+ break;
+ case 'Win':
+ href = 'node-__VERSION__-' + x + '.msi';
+ if (x === 'x64') href = 'x64/' + href;
+ break;
+
+ // TODO uncomment when we have these
+ // case 'Linux':
+ // // two buttons: .deb and .rpm
+ // href = 'node-__VERSION__-' + x + '.rpm';
+ // var d2 = document.createElement('a');
+ // d2.href = base + 'node-__VERSION__-' + x + '.deb';
+ // d2.className = 'button downloadbutton';
+ // d2.innerHTML = 'INSTALL .deb';
+ // db.innerHTML = 'INSTALL .rpm';
+ // db.parentNode.insertBefore(d2, db);
+ // break;
+ }
+
+ db.href = base + href;
+ // if there's one download option, then download it at #download
+ if (location.hash === '#download' && !d2)
+ location.replace(b.href);
+ })(document,navigator);
</script>
- </body>
+ </body>
</html>

0 comments on commit 1597ce0

Please sign in to comment.