Author: nextgens
Date: 2007-12-16 21:24:55 +0000 (Sun, 16 Dec 2007)
New Revision: 16611

Modified:
   trunk/website/pages/en/download.php
Log:
website: try to detect if java is available or not, show the JWS instructions 
accordingly

Modified: trunk/website/pages/en/download.php
===================================================================
--- trunk/website/pages/en/download.php 2007-12-16 21:01:46 UTC (rev 16610)
+++ trunk/website/pages/en/download.php 2007-12-16 21:24:55 UTC (rev 16611)
@@ -14,9 +14,36 @@
 href="/faq.html#firewall"><b>here</b></a>
 for some info.</i> <BR> &nbsp;<BR>

+<script language="javascript">
+       // Os detection
+       var OSName="";
+       if (navigator.appVersion.indexOf("Win")!=-1)
+               OSName="windows";
+       else if (navigator.appVersion.indexOf("Mac")!=-1)
+               OSName="macos";
+       else if (navigator.appVersion.indexOf("X11")!=-1)
+               OSName="unix";
+       else if (navigator.appVersion.indexOf("Linux")!=-1)
+               OSName="unix";
+       
+       if(navigator.javaEnabled())
+               toggleLayer("jws");
+       else if (OSName != "") {
+               toggleLayer("nojws");
+               toggleLayer(OSName);
+       }
+</script>
+<div class="hideit" id="jws">
 <h2>Installation Instructions</h2>
 Clicking the <big><big><a 
href="http://downloads.freenetproject.org/alpha/installer/mac/freenet.jnlp";>Install
 Freenet 0.7</a></big></big> link should start the installer up. If it doesn't 
work for some reason, you can try the platform specific instructions (<a 
href="javascript:toggleLayer('windows');">Windows instructions</a>, <a 
href="javascript:toggleLayer('macos');">Mac OSX instructions</a>, <a 
href="javascript:toggleLayer('unix');">Unix/Linux instructions</a>).
+<div>

+<div class="hideit" id="nojws">
+Show <a href="javascript:toggleLayer('windows');">Windows instructions</a><br>
+Show <a href="javascript:toggleLayer('macos');">Mac OSX instructions</a><br>
+Show <a href="javascript:toggleLayer('unix');">Unix/Linux instructions</a><br>
+</div>
+
 <div class="hideit" id="windows">
 <h3>Windows</h3>
 - Download and run <big><a 
href="http://downloads.freenetproject.org/alpha/installer/freenet-win32-with_jre.exe";>freenet
 webinstall</a> (13MB)</big><br>


Reply via email to