svn commit: samba-web r262 - trunk/news

deryck at samba.org deryck at samba.org
Tue Aug 17 22:07:51 GMT 2004


Author: deryck
Date: 2004-08-17 22:07:51 +0000 (Tue, 17 Aug 2004)
New Revision: 262
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba-web&path=/&rev=262&nolog=1
Log:

Add javascript to redirect news.samba.org to a 
random us mirror.

--deryck


Modified:
   trunk/news/header2.html

Changeset:
Modified: trunk/news/header2.html
===================================================================
--- trunk/news/header2.html	2004-08-17 17:47:47 UTC (rev 261)
+++ trunk/news/header2.html	2004-08-17 22:07:51 UTC (rev 262)
@@ -27,6 +27,21 @@
 }
 </style>
 
+<script type="text/javascript">
+
+newsMirrors = new Array
+newsMirrors[0] = "http://us1.samba.org/samba/news/"
+newsMirrors[1] = "http://us3.samba.org/samba/news/"
+newsMirrors[2] = "http://us4.samba.org/samba/news/"
+
+n=Math.floor(Math.random()*3)
+
+if (document.location == "http://samba.org/samba/news/" || document.location == "http://www.samba.org/samba/news/") {
+
+    document.location = newsMirrors[n]
+}
+</script>
+
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <meta http-equiv="Content-Language" content="en-us" />
 <meta name="keywords" content="Samba SMB CIFS" />



More information about the samba-cvs mailing list