underscore means default. ouch
Sebastian Hahn

Sebastian Hahn commited on 2015-02-11 19:16:03
Zeige 1 geänderte Dateien mit 5 Einfügungen und 2 Löschungen.

... ...
@@ -11,7 +11,7 @@
11 11
 // the terms of the GNU GPLv2, http://www.gnu.org/licenses/gpl-2.0.html.
12 12
 var sources = {};
13 13
 var software = {
14
-'tor': { 'stable': { 'squeeze': [ 'squeeze' ],
14
+'tor': { '_stable': { 'squeeze': [ 'squeeze' ],
15 15
                      'wheezy':  [ 'wheezy' ],
16 16
                      'jessie':  [ 'jessie' ],
17 17
                      'sid':     [ 'sid' ],
... ...
@@ -30,7 +30,7 @@ var software = {
30 30
                      'trusty':  [ 'trusty'],
31 31
                      'utopic':  [ 'utopic'] },
32 32
        },
33
-'tor (from source)': { 'stable': { 'squeeze': [ 'squeeze' ],
33
+'tor (from source)': { '_stable': { 'squeeze': [ 'squeeze' ],
34 34
                      'wheezy':  [ 'wheezy' ],
35 35
                      'jessie':  [ 'jessie' ],
36 36
                      'sid':     [ 'sid' ],
... ...
@@ -89,16 +89,19 @@ function update() {
89 89
     if (package != pkg.prev) {
90 90
         while (ver.firstChild)
91 91
             ver.removeChild(ver.firstChild);
92
+        var selected;
92 93
         for (version in software[package]) {
93 94
             option = document.createElement('option');
94 95
             if (version[0] == '_') {
95 96
                 version = version.slice(1);
97
+                selected = version;
96 98
             }
97 99
             option.appendChild(document.createTextNode(version));
98 100
             option.value = version = version.replace(/ \(.*\)/,'');
99 101
 //alert(version);
100 102
             ver.appendChild(option);
101 103
         }
104
+        ver.value = version = selected || version;
102 105
         pkg.prev = package
103 106
     }
104 107
     try {
105 108