User: SimonAW Date: 2010-02-12 02:52:17+0000 Modified: de/www/downloads/download.js
Log: Liste wird bei zufaellig ausgewaehltem Mirror geupdatet File Changes: Directory: /de/www/downloads/ ============================= File [changed]: download.js Url: http://de.openoffice.org/source/browse/de/www/downloads/download.js?r1=1.6&r2=1.7 Delta lines: +10 -2 -------------------- --- download.js 2010-02-10 14:26:09+0000 1.6 +++ download.js 2010-02-12 02:52:14+0000 1.7 @@ -88,20 +88,28 @@ lstMirrors.removeChild(lstMirrors.firstChild); } + // Zufaellig einen auswaehlen + rndMirror = Math.floor(Math.random() * mirror_list.length); + // Mirrors zur Liste hinzufuegen for ( i=0; i<mirror_list.length; i++ ) { E = document.createElement( "option" ); E.setAttribute( "label", mirror_list[i][1] ); E.setAttribute( "value", mirror_list[i][2] ); + // den zufaelligen Mirror in der List auswaehlen + if ( rndMirror == i ) { + E.setAttribute( "selected", "true" ); + } + T = document.createTextNode( mirror_list[i][1] ); E.appendChild(T); lstMirrors.appendChild(E); } - // Zufaellig einen auswaehlen - add_mk_dl_link(Math.floor(Math.random() * mirror_list.length)); + // Links aendern zum zufaellig ausgewaehlten Mirror + add_mk_dl_link(rndMirror); } function add_set_href( id, download_link) { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
