# HG changeset patch # User Alexander Solovyov # Date 1234735498 -7200 # Node ID 18110c461824a18c1f287ad43bc8978ba66937a4 # Parent cbfc4d01da6b0874847e321d47bfc6a3dd15a9eb js: loading another content if OS is Win diff -r cbfc4d01da6b -r 18110c461824 src/en/index.html --- a/src/en/index.html Sun Feb 15 19:59:01 2009 +0100 +++ b/src/en/index.html Mon Feb 16 00:04:58 2009 +0200 @@ -5,13 +5,14 @@ - + + Mercurial SCM - +

mercurial

- + - + - +

Work easier
Work faster

Mercurial is a free, distributed source control management tool. It offers you the power to efficiently handle projects of any size while using an easy and intuitive interface.

- - + +
+ That's a default content here +
+

How you can benefit from Mercurial

@@ -77,7 +82,7 @@
- + - + diff -r cbfc4d01da6b -r 18110c461824 src/en/javascript/main.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/en/javascript/main.js Mon Feb 16 00:04:58 2009 +0200 @@ -0,0 +1,43 @@ +// http://simonwillison.net/2004/May/26/addLoadEvent/ +function addLoadEvent(func) { + var oldonload = window.onload; + if (typeof window.onload != 'function') { + window.onload = func; + } else { + window.onload = function() { + if (oldonload) { + oldonload(); + } + func(); + } + } +} + +var xmlhttp = null; + +function loadXMLDoc(url) { + if (window.XMLHttpRequest) {// code for Firefox, Opera, IE7, etc. + xmlhttp = new XMLHttpRequest(); + } else if (window.ActiveXObject) {// code for IE6, IE5 + xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); + } + if (xmlhttp != null) { + xmlhttp.onreadystatechange = stateChange; + xmlhttp.open("GET",url,true); + xmlhttp.send(null); + } else { + alert("Your browser does not support XMLHTTP."); + } +} + +function stateChange() { + if (xmlhttp.readyState==4) {// 4 = "loaded" + document.getElementById('replace').innerHTML = xmlhttp.responseText; + } +} + +addLoadEvent(function () { + if (navigator.appVersion.indexOf("Win")!=-1) { + loadXMLDoc("win.html"); + } +}); diff -r cbfc4d01da6b -r 18110c461824 src/en/win.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/en/win.html Mon Feb 16 00:04:58 2009 +0200 @@ -0,0 +1,1 @@ +That's a part for Windows! \ No newline at end of file