Browse code

Fix dropdown top link

hiromipaw authored on17/11/2017 15:01:22
Showing1 changed files
... ...
@@ -118,13 +118,13 @@ docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$dir/$lang/$base.wml),
118 118
      # LANGUAGE SWITCH 
119 119
       <li>
120 120
          <div class="dropdown">
121
-           <button class="dropbtn">
121
+           <div class="dropbtn">
122 122
 	      <:{ if (has_translations()) {  
123 123
                     my @lngs = list_translations();
124 124
    		    print $lngs[0];
125 125
 		  }
126 126
               }:>
127
-	   </button>
127
+	   </div>
128 128
            <div class="dropdown-content">
129 129
 	     <:{
130 130
                #import "perl-globals.wmi";
Browse code

Fix dropdown padding and language nav

hiromipaw authored on17/11/2017 14:37:54
Showing1 changed files
... ...
@@ -118,13 +118,13 @@ docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$dir/$lang/$base.wml),
118 118
      # LANGUAGE SWITCH 
119 119
       <li>
120 120
          <div class="dropdown">
121
-           <div class="dropbtn">
121
+           <button class="dropbtn">
122 122
 	      <:{ if (has_translations()) {  
123 123
                     my @lngs = list_translations();
124 124
    		    print $lngs[0];
125 125
 		  }
126 126
               }:>
127
-	   </div>
127
+	   </button>
128 128
            <div class="dropdown-content">
129 129
 	     <:{
130 130
                #import "perl-globals.wmi";
Browse code

Use languages dropdown and fix css

hiromipaw authored on17/11/2017 14:21:58
Showing1 changed files
... ...
@@ -118,18 +118,36 @@ docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$dir/$lang/$base.wml),
118 118
      # LANGUAGE SWITCH 
119 119
       <li>
120 120
          <div class="dropdown">
121
-           #<div class="dropbtn">
121
+           <div class="dropbtn">
122 122
 	      <:{ if (has_translations()) {  
123 123
                     my @lngs = list_translations();
124 124
    		    print $lngs[0];
125 125
 		  }
126 126
               }:>
127
-	   #</div>
128
-           # <div class="dropdown-content">
129
-           #   <: if (has_translations()) {  :>
130
-           #      <: print list_translations() :>
131
-           #   <: }; :>
132
-           # </div>
127
+	   </div>
128
+           <div class="dropdown-content">
129
+	     <:{
130
+               #import "perl-globals.wmi";
131
+                use Cwd;
132
+               use Cwd 'abs_path';
133
+               use File::Spec;
134
+               my $urlbase = File::Spec->abs2rel(getcwd(),abs_path("$(DOCROOT)"));
135
+               my $LANGUAGES;
136
+               my $page = $WML_SRC_FILENAME;
137
+               opendir(DIR, getcwd()) or die $!;
138
+               # take a look and see what language support we have
139
+               while (my $file = readdir(DIR)) {
140
+                 if (-d $file) {
141
+                   if (-e "$file/$page") {
142
+                     my $url = $WML_SRC_BASENAME.'.html.'.$file;
143
+                     print '<a href="'.$url.'" >'.$LANGUAGES{$file}.'</a>'."\n" unless not defined $LANGUAGES{$file};
144
+                   }
145
+                 }
146
+               }
147
+               closedir(DIR);
148
+             }:>
149
+             
150
+           </div>
133 151
          </div> 
134 152
        </li>
135 153
        #
Browse code

Update to dropdown for single language

hiromipaw authored on17/11/2017 13:00:10
Showing1 changed files
... ...
@@ -5,6 +5,7 @@
5 5
 #use "links.wmi"
6 6
 #use "versions.wmi"
7 7
 #use "navigation.wmi"
8
+#use "functions.wmi"
8 9
 
9 10
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
10 11
 <html>
... ...
@@ -117,36 +118,18 @@ docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$dir/$lang/$base.wml),
117 118
      # LANGUAGE SWITCH 
118 119
       <li>
119 120
          <div class="dropdown">
120
-           <button class="dropbtn">Languages</button>
121
-           <div class="dropdown-content">
122
-            
123
-         # this is a cgi trampoline to bounce us to the right page
124
-         # alternately, if the client supports javascript we can redirect that way
125
-         # noscript does not block onclick but clients may have disabled javascript completely
126
-         #
127
-         # for this to work we need to know the relative path from the document root
128
-         # to the current directory that wml is in.
129
-           <:{
130
-             #import "perl-globals.wmi";
131
-             use Cwd;
132
-             use Cwd 'abs_path';
133
-             use File::Spec;
134
-             my $urlbase = File::Spec->abs2rel(getcwd(),abs_path("$(DOCROOT)"));
135
-             my $LANGUAGES;
136
-             my $page = $WML_SRC_FILENAME;
137
-             opendir(DIR, getcwd()) or die $!;
138
-             # take a look and see what language support we have
139
-             while (my $file = readdir(DIR)) {
140
-                 if (-d $file) {
141
-                     if (-e "$file/$page") {
142
-                         my $url = $WML_SRC_BASENAME.'.html.'.$file;
143
-                         print '<a href="'.$url.'" >'.$LANGUAGES{$file}.'</a>'."\n" unless not defined $LANGUAGES{$file};
144
-                     }
145
-                 }
146
-             }
147
-             closedir(DIR);
148
-           }:>
149
-            </div>
121
+           #<div class="dropbtn">
122
+	      <:{ if (has_translations()) {  
123
+                    my @lngs = list_translations();
124
+   		    print $lngs[0];
125
+		  }
126
+              }:>
127
+	   #</div>
128
+           # <div class="dropdown-content">
129
+           #   <: if (has_translations()) {  :>
130
+           #      <: print list_translations() :>
131
+           #   <: }; :>
132
+           # </div>
150 133
          </div> 
151 134
        </li>
152 135
        #
Browse code

Modify languag switch to use css only

hiromipaw authored on17/11/2017 12:23:40
Showing1 changed files
... ...
@@ -114,16 +114,18 @@ docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$dir/$lang/$base.wml),
114 114
               }
115 115
             }
116 116
         }:>
117
-     # LANGUAGE SWITCH CGI
117
+     # LANGUAGE SWITCH 
118 118
       <li>
119
+         <div class="dropdown">
120
+           <button class="dropbtn">Languages</button>
121
+           <div class="dropdown-content">
122
+            
119 123
          # this is a cgi trampoline to bounce us to the right page
120 124
          # alternately, if the client supports javascript we can redirect that way
121 125
          # noscript does not block onclick but clients may have disabled javascript completely
122 126
          #
123 127
          # for this to work we need to know the relative path from the document root
124 128
          # to the current directory that wml is in.
125
-         <form action="$(DOCROOT)/cgi-bin/languageswitch.cgi">
126
-           <select name="Language" id="lang">
127 129
            <:{
128 130
              #import "perl-globals.wmi";
129 131
              use Cwd;
... ...
@@ -137,17 +139,15 @@ docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$dir/$lang/$base.wml),
137 139
              while (my $file = readdir(DIR)) {
138 140
                  if (-d $file) {
139 141
                      if (-e "$file/$page") {
140
-                         my $url = $urlbase.'/'.$WML_SRC_BASENAME.'.html.'.$file;
141
-                         my $url2js = $WML_SRC_BASENAME.'.html.'.$file;
142
-                         print '<option value="'.$url.'" onclick="window.location=\''.$url2js.'\'">'.$LANGUAGES{$file}.'</option>'."\n" unless not defined $LANGUAGES{$file};
142
+                         my $url = $WML_SRC_BASENAME.'.html.'.$file;
143
+                         print '<a href="'.$url.'" >'.$LANGUAGES{$file}.'</a>'."\n" unless not defined $LANGUAGES{$file};
143 144
                      }
144 145
                  }
145 146
              }
146 147
              closedir(DIR);
147 148
            }:>
148
-           </select>
149
-           <input class="go" type="submit" name="submit" value="Go">
150
-         </form>
149
+            </div>
150
+         </div> 
151 151
        </li>
152 152
        #
153 153
       </ul>
Browse code

Move language switch to the top

hiromipaw authored on16/11/2017 21:03:12
Showing1 changed files
... ...
@@ -114,7 +114,44 @@ docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$dir/$lang/$base.wml),
114 114
               }
115 115
             }
116 116
         }:>
117
-        </ul>
117
+     # LANGUAGE SWITCH CGI
118
+      <li>
119
+         # this is a cgi trampoline to bounce us to the right page
120
+         # alternately, if the client supports javascript we can redirect that way
121
+         # noscript does not block onclick but clients may have disabled javascript completely
122
+         #
123
+         # for this to work we need to know the relative path from the document root
124
+         # to the current directory that wml is in.
125
+         <form action="$(DOCROOT)/cgi-bin/languageswitch.cgi">
126
+           <select name="Language" id="lang">
127
+           <:{
128
+             #import "perl-globals.wmi";
129
+             use Cwd;
130
+             use Cwd 'abs_path';
131
+             use File::Spec;
132
+             my $urlbase = File::Spec->abs2rel(getcwd(),abs_path("$(DOCROOT)"));
133
+             my $LANGUAGES;
134
+             my $page = $WML_SRC_FILENAME;
135
+             opendir(DIR, getcwd()) or die $!;
136
+             # take a look and see what language support we have
137
+             while (my $file = readdir(DIR)) {
138
+                 if (-d $file) {
139
+                     if (-e "$file/$page") {
140
+                         my $url = $urlbase.'/'.$WML_SRC_BASENAME.'.html.'.$file;
141
+                         my $url2js = $WML_SRC_BASENAME.'.html.'.$file;
142
+                         print '<option value="'.$url.'" onclick="window.location=\''.$url2js.'\'">'.$LANGUAGES{$file}.'</option>'."\n" unless not defined $LANGUAGES{$file};
143
+                     }
144
+                 }
145
+             }
146
+             closedir(DIR);
147
+           }:>
148
+           </select>
149
+           <input class="go" type="submit" name="submit" value="Go">
150
+         </form>
151
+       </li>
152
+       #
153
+      </ul>
154
+    
118 155
       </div>
119 156
       <!-- END NAV -->
120 157
      # end navigation generation
Browse code

Remove another unused script tag

hiromipaw authored on08/09/2017 17:47:20
Showing1 changed files
... ...
@@ -29,7 +29,6 @@
29 29
   <link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/ie6.min.css">
30 30
   <![endif]-->
31 31
 
32
-#  <script language="javascript" type="text/javascript" src="$(DOCROOT)/global.js"></script>
33 32
   # end WML to generate css/js paths
34 33
 
35 34
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Browse code

Don't use minified version of js/dlpage01.js for now

js/dlpage01.js has been modified, so js/dlpage01.min.js should be
updated. However I don't know how to generate this file, so let's not
use the minified version for now.

Nicolas Vigier authored on27/07/2017 20:14:54
Showing1 changed files
... ...
@@ -47,7 +47,7 @@
47 47
   <script type="text/javascript" src="../js/jquery.ba-bbq.min.js">
48 48
 /*  Source: https://raw.github.com/cowboy/jquery-bbq/v1.2.1/jquery.ba-bbq.js */
49 49
   </script>
50
-  <script type="text/javascript" src="../js/dlpage01.min.js">
50
+  <script type="text/javascript" src="../js/dlpage01.js">
51 51
 # /* Displays detected section */
52 52
   </script>
53 53
   <script async type="text/javascript" src="../js/jquery.accordion.min.js">
Browse code

Allow having different Tor Browser versions for each platform

We remove the version-torbrowserbundledir and version-torbrowserbundlebetadir
variables and update all download links to use the same version number
in the directory and the filename.

Nicolas Vigier authored on27/07/2017 20:11:17
Showing1 changed files
... ...
@@ -58,8 +58,7 @@
58 58
 </head>
59 59
 <body class="onload">
60 60
     <span class="hidden" id="version-data">
61
-        { "torbrowserbundledir" : "<version-torbrowserbundledir>",
62
-          "torbrowserbundle" : "<version-torbrowserbundle>",
61
+        { "torbrowserbundle" : "<version-torbrowserbundle>",
63 62
           "torbrowserbundleosx64" : "<version-torbrowserbundleosx64>",
64 63
           "torbrowserbundlelinux32" : "<version-torbrowserbundlelinux32>",
65 64
           "torbrowserbundlelinux64" : "<version-torbrowserbundlelinux64>"  }
Browse code

Minify JS and CSS

hiromipaw authored on03/07/2017 09:05:56
Showing1 changed files
... ...
@@ -16,17 +16,17 @@
16 16
 
17 17
   # begin WML to generate css/js paths
18 18
   <ifneq "$(STYLESHEET)" "" "<link rel="stylesheet" type="text/css" href="$(DOCROOT)/$(STYLESHEET)">">
19
-  <ifeq "$(STYLESHEET)" "" "<link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/master.css">">
19
+  <ifeq "$(STYLESHEET)" "" "<link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/master.min.css">">
20 20
 
21
-  #<link href="css/master.css" rel="stylesheet" type="text/css">
21
+  #<link href="css/master.min.css" rel="stylesheet" type="text/css">
22 22
   <!--[if lte IE 8]>
23
-  <link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/ie8-and-down.css">
23
+  <link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/ie8-and-down.min.css">
24 24
   <![endif]-->
25 25
   <!--[if lte IE 7]>
26
-  <link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/ie7-and-down.css">
26
+  <link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/ie7-and-down.min.css">
27 27
   <![endif]-->
28 28
   <!--[if IE 6]>
29
-  <link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/ie6.css">
29
+  <link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/ie6.min.css">
30 30
   <![endif]-->
31 31
 
32 32
 #  <script language="javascript" type="text/javascript" src="$(DOCROOT)/global.js"></script>
... ...
@@ -43,11 +43,11 @@
43 43
    Source: http://www.stoimen.com/blog/2009/07/16/jquery-browser-and-os-detection-plugin/
44 44
    License: Public Domain (http://www.stoimen.com/blog/2009/07/16/jquery-browser-and-os-detection-plugin/#comment-12498) */
45 45
   </script>
46
-  <script type="text/javascript" src="../js/jquery-migrate-1.0.0.js"></script>
46
+  <script type="text/javascript" src="../js/jquery-migrate-1.0.0.min.js"></script>
47 47
   <script type="text/javascript" src="../js/jquery.ba-bbq.min.js">
48 48
 /*  Source: https://raw.github.com/cowboy/jquery-bbq/v1.2.1/jquery.ba-bbq.js */
49 49
   </script>
50
-  <script type="text/javascript" src="../js/dlpage01.js">
50
+  <script type="text/javascript" src="../js/dlpage01.min.js">
51 51
 # /* Displays detected section */
52 52
   </script>
53 53
   <script async type="text/javascript" src="../js/jquery.accordion.min.js">
Browse code

Fix src unsafe error

hiromipaw authored on16/06/2017 12:58:39
Showing1 changed files
... ...
@@ -56,7 +56,7 @@
56 56
    License: Public Domain (http://www.stemkoski.com/stupid-simple-jquery-accordion-menu/#comment-32882) */
57 57
   </script>
58 58
 </head>
59
-<body onload="resetAll()" onunload="">
59
+<body class="onload">
60 60
     <span class="hidden" id="version-data">
61 61
         { "torbrowserbundledir" : "<version-torbrowserbundledir>",
62 62
           "torbrowserbundle" : "<version-torbrowserbundle>",
Browse code

Move jquery-migrate before ba-bbq

hiromipaw authored on16/06/2017 12:48:05
Showing1 changed files
... ...
@@ -43,10 +43,10 @@
43 43
    Source: http://www.stoimen.com/blog/2009/07/16/jquery-browser-and-os-detection-plugin/
44 44
    License: Public Domain (http://www.stoimen.com/blog/2009/07/16/jquery-browser-and-os-detection-plugin/#comment-12498) */
45 45
   </script>
46
+  <script type="text/javascript" src="../js/jquery-migrate-1.0.0.js"></script>
46 47
   <script type="text/javascript" src="../js/jquery.ba-bbq.min.js">
47 48
 /*  Source: https://raw.github.com/cowboy/jquery-bbq/v1.2.1/jquery.ba-bbq.js */
48 49
   </script>
49
-  <script type="text/javascript" src="../js/jquery-migrate-1.0.0.js"></script>
50 50
   <script type="text/javascript" src="../js/dlpage01.js">
51 51
 # /* Displays detected section */
52 52
   </script>
Browse code

Add support for old jquery functions

hiromipaw authored on16/06/2017 11:57:59
Showing1 changed files
... ...
@@ -14,7 +14,7 @@
14 14
   <ifneq "$(REDIRECT)" "" "<meta http-equiv="refresh" content="0;url=$(DOCROOT)/$(REDIRECT)">">
15 15
   <ifneq "$(REDIRECT_GLOBAL)" "" "<meta http-equiv="refresh" content="0;url=$(REDIRECT_GLOBAL)">">
16 16
 
17
-  # begin WML to generate css/js paths 
17
+  # begin WML to generate css/js paths
18 18
   <ifneq "$(STYLESHEET)" "" "<link rel="stylesheet" type="text/css" href="$(DOCROOT)/$(STYLESHEET)">">
19 19
   <ifeq "$(STYLESHEET)" "" "<link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/master.css">">
20 20
 
... ...
@@ -30,7 +30,7 @@
30 30
   <![endif]-->
31 31
 
32 32
 #  <script language="javascript" type="text/javascript" src="$(DOCROOT)/global.js"></script>
33
-  # end WML to generate css/js paths 
33
+  # end WML to generate css/js paths
34 34
 
35 35
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
36 36
   <meta name="author" content="The Tor Project, Inc.">
... ...
@@ -46,6 +46,7 @@
46 46
   <script type="text/javascript" src="../js/jquery.ba-bbq.min.js">
47 47
 /*  Source: https://raw.github.com/cowboy/jquery-bbq/v1.2.1/jquery.ba-bbq.js */
48 48
   </script>
49
+  <script type="text/javascript" src="../js/jquery-migrate-1.0.0.js"></script>
49 50
   <script type="text/javascript" src="../js/dlpage01.js">
50 51
 # /* Displays detected section */
51 52
   </script>
... ...
@@ -84,9 +85,9 @@
84 85
             my $lang = "$(LANG)";
85 86
 
86 87
             for my $key (@keys) {
87
-              my ($dir, $base) = $key =~ m,^(?:(.*)/)?(.*?)$,;  
88
+              my ($dir, $base) = $key =~ m,^(?:(.*)/)?(.*?)$,;
88 89
 
89
-              # in directory of active link, set class active 
90
+              # in directory of active link, set class active
90 91
               my $class;
91 92
               if ((defined $dir) and ($WML_SRC_DIRNAME =~/$dir/) or ($WML_SRC_BASENAME eq $base)) {
92 93
                 $class = 'class="active"';
... ...
@@ -95,12 +96,12 @@
95 96
               }
96 97
 
97 98
 	            $dir = '.' unless defined $dir;
98
-                
99
+
99 100
               # translated version
100 101
               if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
101 102
                   printf '<li><a '.$class.' href="%s">%s</a></li>'."\n",
102 103
                          stripDotSlashs("$(DOCROOT)/$dir/$base.html.$(LANG)"),$navigation{$key};
103
-              } 
104
+              }
104 105
               # english version
105 106
               elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
106 107
               	printf '<li><a '.$class.' href="%s">%s</a></li>'."\n",
... ...
@@ -129,14 +130,14 @@ docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$dir/$lang/$base.wml),
129 130
               my $val = shift @calltoaction;
130 131
               push @keys, $key;
131 132
               $calltoaction{$key} = $val;
132
-            } 
133
+            }
133 134
 
134 135
             my $page = $WML_SRC_BASENAME;
135 136
             my $lang = "$(LANG)";
136 137
             for my $key (@keys) {
137
-              my ($dir, $base) = $key =~ m,^(?:(.*)/)?(.*?)$,;  
138
+              my ($dir, $base) = $key =~ m,^(?:(.*)/)?(.*?)$,;
138 139
 
139
-              # in directory, set active 
140
+              # in directory, set active
140 141
               my $class;
141 142
               if ((defined $dir) and ($WML_SRC_DIRNAME =~/$dir/) or ($WML_SRC_BASENAME eq $base)) {
142 143
               #if ($WML_SRC_BASENAME eq $base) {
... ...
@@ -150,7 +151,7 @@ docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$dir/$lang/$base.wml),
150 151
               if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
151 152
                   printf '<li class="donate"><a '.$class.' href="%s">%s</a></li>'."\n",
152 153
                          stripDotSlashs("$(DOCROOT)/$dir/$base.html.$(LANG)"),$calltoaction{$key};
153
-              } 
154
+              }
154 155
               # default to english version
155 156
               elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
156 157
               	printf '<li class="donate"><a '.$class.' href="%s">%s</a></li>'."\n",
... ...
@@ -158,7 +159,7 @@ docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$dir/$lang/$base.wml),
158 159
               } else {
159 160
                 warn "$WML_SRC_FILENAME has a [page $key] (parses to docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$dir/$lang/$base.wml), but that doesn't exist.";
160 161
               }
161
-            }    
162
+            }
162 163
           }:>
163 164
         </ul>
164 165
       </div>
Browse code

Bug 22357: Move download lang drop-down code to external .js file

Arthur Edelstein authored on24/05/2017 08:21:38
Showing1 changed files
... ...
@@ -54,44 +54,15 @@
54 54
    Source: http://www.stemkoski.com/stupid-simple-jquery-accordion-menu/
55 55
    License: Public Domain (http://www.stemkoski.com/stupid-simple-jquery-accordion-menu/#comment-32882) */
56 56
   </script>
57
-  <script async type="text/javascript">
58
-# /* switches package links depending on selection */
59
-  function updateLang() {
60
-    var caller = $( this );
61
-    var pkg = caller.attr('id');
62
-    var lang = caller.val();
63
-    var wintbb = '../dist/torbrowser/<version-torbrowserbundledir>/torbrowser-install-<version-torbrowserbundle>_'+lang+'.exe';
64
-    var osxtbb = '../dist/torbrowser/<version-torbrowserbundledir>/TorBrowser-<version-torbrowserbundleosx64>-osx64_'+lang+'.dmg';
65
-    var osxtbb64 = '../dist/torbrowser/<version-torbrowserbundledir>/TorBrowser-<version-torbrowserbundleosx64>-osx64_'+lang+'.dmg';
66
-    var lintbb32 = '../dist/torbrowser/<version-torbrowserbundledir>/tor-browser-linux32-<version-torbrowserbundlelinux32>_'+lang+'.tar.xz';
67
-    var lintbb64 = '../dist/torbrowser/<version-torbrowserbundledir>/tor-browser-linux64-<version-torbrowserbundlelinux64>_'+lang+'.tar.xz';
68
-    if(pkg == 'win-tbb'){
69
-      $('.'+pkg).replaceWith('<a class="button win-tbb" href="'+wintbb+'"><span class="strong">Download</span><span class="normal"><button-win-tbb32></span></a>');
70
-      $('.'+pkg+'-sig').replaceWith('<a class="win-tbb-sig" href="'+wintbb+'.asc">sig</a>');
71
-    }else if(pkg == 'osx-tbb'){
72
-      $('.'+pkg).replaceWith('<a class="button osx-tbb" href="'+osxtbb+'"><span class="strong">Download</span><span class="normal"><button-osx-tbb32></span></a>');
73
-      $('.'+pkg+'-sig').replaceWith('<a class="osx-tbb-sig" href="'+osxtbb+'.asc">sig</a>');
74
-    }else if(pkg == 'osx-tbb64'){
75
-      $('.'+pkg).replaceWith('<a class="button osx-tbb64" href="'+osxtbb64+'"><span class="strong">Download</span><span class="normal"><button-osx-tbb64></span></a>');
76
-      $('.'+pkg+'-sig').replaceWith('<a class="osx-tbb64-sig" href="'+osxtbb64+'.asc">sig</a>');
77
-    }else if(pkg == 'lin-tbb32'){
78
-      $('.'+pkg).replaceWith('<a class="button lin-tbb32" href="'+lintbb32+'"><span class="strong">Download</span><span class="normal"><button-lin-tbb32></span></a>');
79
-      $('.'+pkg+'-sig').replaceWith('<a class="lin-tbb32-sig" href="'+lintbb32+'.asc">sig</a>');
80
-    }else if(pkg == 'lin-tbb64'){
81
-      $('.'+pkg).replaceWith('<a class="button lin-tbb64" href="'+lintbb64+'"><span class="strong">Download</span><span class="normal"><button-lin-tbb64></span></a>');
82
-      $('.'+pkg+'-sig').replaceWith('<a class="lin-tbb64-sig" href="'+lintbb64+'.asc">sig</a>');
83
-    }
84
-  }
85
-
86
-  $(function(){
87
-    $('.lang').ready(updateLang);
88
-    $('.lang').change(updateLang);
89
-    /* Only show language selector if javascript is enabled */
90
-    $('.lang').css('display', 'block');
91
-  });
92
-  </script>
93 57
 </head>
94 58
 <body onload="resetAll()" onunload="">
59
+    <span class="hidden" id="version-data">
60
+        { "torbrowserbundledir" : "<version-torbrowserbundledir>",
61
+          "torbrowserbundle" : "<version-torbrowserbundle>",
62
+          "torbrowserbundleosx64" : "<version-torbrowserbundleosx64>",
63
+          "torbrowserbundlelinux32" : "<version-torbrowserbundlelinux32>",
64
+          "torbrowserbundlelinux64" : "<version-torbrowserbundlelinux64>"  }
65
+    </span>
95 66
 <div id="wrap">
96 67
   <div id="header">
97 68
     <h1 id="logo"><a href="<page index>">Tor</a></h1>
Browse code

Update dowload links

The download links to the OSX bundles (now 64bit), the Tor expert
bundle (0.2.6.7 is the new stable version) and the alpha bundles (now
4.5) are updated.

Georg Koppen authored on28/04/2015 12:53:42
Showing1 changed files
... ...
@@ -61,8 +61,8 @@
61 61
     var pkg = caller.attr('id');
62 62
     var lang = caller.val();
63 63
     var wintbb = '../dist/torbrowser/<version-torbrowserbundledir>/torbrowser-install-<version-torbrowserbundle>_'+lang+'.exe';
64
-    var osxtbb = '../dist/torbrowser/<version-torbrowserbundledir>/TorBrowser-<version-torbrowserbundleosx32>-osx32_'+lang+'.dmg';
65
-    var osxtbb64 = '../dist/torbrowser/<version-torbrowserbundledir>/TorBrowser-<version-torbrowserbundleosx32>-osx64_'+lang+'.dmg';
64
+    var osxtbb = '../dist/torbrowser/<version-torbrowserbundledir>/TorBrowser-<version-torbrowserbundleosx64>-osx64_'+lang+'.dmg';
65
+    var osxtbb64 = '../dist/torbrowser/<version-torbrowserbundledir>/TorBrowser-<version-torbrowserbundleosx64>-osx64_'+lang+'.dmg';
66 66
     var lintbb32 = '../dist/torbrowser/<version-torbrowserbundledir>/tor-browser-linux32-<version-torbrowserbundlelinux32>_'+lang+'.tar.xz';
67 67
     var lintbb64 = '../dist/torbrowser/<version-torbrowserbundledir>/tor-browser-linux64-<version-torbrowserbundlelinux64>_'+lang+'.tar.xz';
68 68
     if(pkg == 'win-tbb'){
Browse code

and fix it in a fifth place (the language dropdown is javascript based)

Roger Dingledine authored on30/04/2014 03:05:24
Showing1 changed files
... ...
@@ -61,8 +61,8 @@
61 61
     var pkg = caller.attr('id');
62 62
     var lang = caller.val();
63 63
     var wintbb = '../dist/torbrowser/<version-torbrowserbundledir>/torbrowser-install-<version-torbrowserbundle>_'+lang+'.exe';
64
-    var osxtbb = '../dist/torbrowser/<version-torbrowserbundledir>/TorBrowserBundle-<version-torbrowserbundleosx32>-osx32_'+lang+'.zip';
65
-    var osxtbb64 = '../dist/torbrowser/<version-torbrowserbundledir>/TorBrowserBundle-<version-torbrowserbundleosx32>-osx64_'+lang+'.zip';
64
+    var osxtbb = '../dist/torbrowser/<version-torbrowserbundledir>/TorBrowser-<version-torbrowserbundleosx32>-osx32_'+lang+'.dmg';
65
+    var osxtbb64 = '../dist/torbrowser/<version-torbrowserbundledir>/TorBrowser-<version-torbrowserbundleosx32>-osx64_'+lang+'.dmg';
66 66
     var lintbb32 = '../dist/torbrowser/<version-torbrowserbundledir>/tor-browser-linux32-<version-torbrowserbundlelinux32>_'+lang+'.tar.xz';
67 67
     var lintbb64 = '../dist/torbrowser/<version-torbrowserbundledir>/tor-browser-linux64-<version-torbrowserbundlelinux64>_'+lang+'.tar.xz';
68 68
     if(pkg == 'win-tbb'){
Browse code

fix a couple more .gz->.xz

Erinn Clark authored on19/12/2013 06:00:05
Showing1 changed files
... ...
@@ -63,8 +63,8 @@
63 63
     var wintbb = '../dist/torbrowser/<version-torbrowserbundledir>/torbrowser-install-<version-torbrowserbundle>_'+lang+'.exe';
64 64
     var osxtbb = '../dist/torbrowser/<version-torbrowserbundledir>/TorBrowserBundle-<version-torbrowserbundleosx32>-osx32_'+lang+'.zip';
65 65
     var osxtbb64 = '../dist/torbrowser/<version-torbrowserbundledir>/TorBrowserBundle-<version-torbrowserbundleosx32>-osx64_'+lang+'.zip';
66
-    var lintbb32 = '../dist/torbrowser/<version-torbrowserbundledir>/tor-browser-linux32-<version-torbrowserbundlelinux32>_'+lang+'.tar.gz';
67
-    var lintbb64 = '../dist/torbrowser/<version-torbrowserbundledir>/tor-browser-linux64-<version-torbrowserbundlelinux64>_'+lang+'.tar.gz';
66
+    var lintbb32 = '../dist/torbrowser/<version-torbrowserbundledir>/tor-browser-linux32-<version-torbrowserbundlelinux32>_'+lang+'.tar.xz';
67
+    var lintbb64 = '../dist/torbrowser/<version-torbrowserbundledir>/tor-browser-linux64-<version-torbrowserbundlelinux64>_'+lang+'.tar.xz';
68 68
     if(pkg == 'win-tbb'){
69 69
       $('.'+pkg).replaceWith('<a class="button win-tbb" href="'+wintbb+'"><span class="strong">Download</span><span class="normal"><button-win-tbb32></span></a>');
70 70
       $('.'+pkg+'-sig').replaceWith('<a class="win-tbb-sig" href="'+wintbb+'.asc">sig</a>');
Browse code

fix the easy download page javascript to point at the right tbbs in the right directory

Erinn Clark authored on19/12/2013 05:56:21
Showing1 changed files
... ...
@@ -60,11 +60,11 @@
60 60
     var caller = $( this );
61 61
     var pkg = caller.attr('id');
62 62
     var lang = caller.val();
63
-    var wintbb = '../dist/torbrowser/tor-browser-<version-torbrowserbundle>_'+lang+'.exe';
64
-    var osxtbb = '../dist/torbrowser/osx/TorBrowser-<version-torbrowserbundleosx32>-osx-i386-'+lang+'.zip';
65
-    var osxtbb64 = '../dist/torbrowser/osx/TorBrowser-<version-torbrowserbundleosx64>-osx-x86_64-'+lang+'.zip';
66
-    var lintbb32 = '../dist/torbrowser/linux/tor-browser-gnu-linux-i686-<version-torbrowserbundlelinux32>-dev-'+lang+'.tar.gz';
67
-    var lintbb64 = '../dist/torbrowser/linux/tor-browser-gnu-linux-x86_64-<version-torbrowserbundlelinux64>-dev-'+lang+'.tar.gz';
63
+    var wintbb = '../dist/torbrowser/<version-torbrowserbundledir>/torbrowser-install-<version-torbrowserbundle>_'+lang+'.exe';
64
+    var osxtbb = '../dist/torbrowser/<version-torbrowserbundledir>/TorBrowserBundle-<version-torbrowserbundleosx32>-osx32_'+lang+'.zip';
65
+    var osxtbb64 = '../dist/torbrowser/<version-torbrowserbundledir>/TorBrowserBundle-<version-torbrowserbundleosx32>-osx64_'+lang+'.zip';
66
+    var lintbb32 = '../dist/torbrowser/<version-torbrowserbundledir>/tor-browser-linux32-<version-torbrowserbundlelinux32>_'+lang+'.tar.gz';
67
+    var lintbb64 = '../dist/torbrowser/<version-torbrowserbundledir>/tor-browser-linux64-<version-torbrowserbundlelinux64>_'+lang+'.tar.gz';
68 68
     if(pkg == 'win-tbb'){
69 69
       $('.'+pkg).replaceWith('<a class="button win-tbb" href="'+wintbb+'"><span class="strong">Download</span><span class="normal"><button-win-tbb32></span></a>');
70 70
       $('.'+pkg+'-sig').replaceWith('<a class="win-tbb-sig" href="'+wintbb+'.asc">sig</a>');
Browse code

patch from jmtodaro for everything in ticket 4590.

Andrew Lewman authored on25/04/2012 06:41:44
Showing1 changed files
... ...
@@ -43,6 +43,9 @@
43 43
    Source: http://www.stoimen.com/blog/2009/07/16/jquery-browser-and-os-detection-plugin/
44 44
    License: Public Domain (http://www.stoimen.com/blog/2009/07/16/jquery-browser-and-os-detection-plugin/#comment-12498) */
45 45
   </script>
46
+  <script type="text/javascript" src="../js/jquery.ba-bbq.min.js">
47
+/*  Source: https://raw.github.com/cowboy/jquery-bbq/v1.2.1/jquery.ba-bbq.js */
48
+  </script>
46 49
   <script type="text/javascript" src="../js/dlpage01.js">
47 50
 # /* Displays detected section */
48 51
   </script>
... ...
@@ -65,31 +68,18 @@
65 68
     if(pkg == 'win-tbb'){
66 69
       $('.'+pkg).replaceWith('<a class="button win-tbb" href="'+wintbb+'"><span class="strong">Download</span><span class="normal"><button-win-tbb32></span></a>');
67 70
       $('.'+pkg+'-sig').replaceWith('<a class="win-tbb-sig" href="'+wintbb+'.asc">sig</a>');
68
-      $('.mac-alt').replaceWith('<a class="mac-alt" href="'+osxtbb+'">Mac</a>');
69
-      $('.lin-alt').replaceWith('<a class="lin-alt" href="'+lintbb32+'">Linux</a>');
70
-      $('.lin-alt64').replaceWith('<a class="lin-alt64" href="'+lintbb64+'">Linux 64-bit</a>');
71 71
     }else if(pkg == 'osx-tbb'){
72 72
       $('.'+pkg).replaceWith('<a class="button osx-tbb" href="'+osxtbb+'"><span class="strong">Download</span><span class="normal"><button-osx-tbb32></span></a>');
73 73
       $('.'+pkg+'-sig').replaceWith('<a class="osx-tbb-sig" href="'+osxtbb+'.asc">sig</a>');
74
-      $('.win-alt').replaceWith('<a class="lin-win" href="'+wintbb+'">Windows</a>');
75
-      $('.lin-alt').replaceWith('<a class="lin-alt" href="'+lintbb32+'">Linux</a>');
76
-      $('.lin-alt64').replaceWith('<a class="lin-alt64" href="'+lintbb64+'">Linux 64-bit</a>');
77 74
     }else if(pkg == 'osx-tbb64'){
78 75
       $('.'+pkg).replaceWith('<a class="button osx-tbb64" href="'+osxtbb64+'"><span class="strong">Download</span><span class="normal"><button-osx-tbb64></span></a>');
79 76
       $('.'+pkg+'-sig').replaceWith('<a class="osx-tbb64-sig" href="'+osxtbb64+'.asc">sig</a>');
80
-      $('.win-alt64').replaceWith('<a class="win-alt64" href="'+wintbb+'">Windows</a>');
81
-      $('.lin-alt').replaceWith('<a class="lin-alt" href="'+lintbb32+'">Linux</a>');
82
-      $('.lin-alt64').replaceWith('<a class="lin-alt64" href="'+lintbb64+'">Linux 64-bit</a>');
83 77
     }else if(pkg == 'lin-tbb32'){
84 78
       $('.'+pkg).replaceWith('<a class="button lin-tbb32" href="'+lintbb32+'"><span class="strong">Download</span><span class="normal"><button-lin-tbb32></span></a>');
85 79
       $('.'+pkg+'-sig').replaceWith('<a class="lin-tbb32-sig" href="'+lintbb32+'.asc">sig</a>');
86
-      $('.mac-alt').replaceWith('<a class="lin-mac" href="'+osxtbb+'">Mac</a>');
87
-      $('.win-alt').replaceWith('<a class="lin-win" href="'+wintbb+'">Windows</a>');
88 80
     }else if(pkg == 'lin-tbb64'){
89 81
       $('.'+pkg).replaceWith('<a class="button lin-tbb64" href="'+lintbb64+'"><span class="strong">Download</span><span class="normal"><button-lin-tbb64></span></a>');
90 82
       $('.'+pkg+'-sig').replaceWith('<a class="lin-tbb64-sig" href="'+lintbb64+'.asc">sig</a>');
91
-      $('.mac-alt64').replaceWith('<a class="mac-alt64" href="'+osxtbb64+'">Mac</a>');
92
-      $('.win-alt64').replaceWith('<a class="win-alt64" href="'+wintbb+'">Windows</a>');
93 83
     }
94 84
   }
95 85
 
Browse code

patch from jeremy to fix the mac tbb link issues.

Andrew Lewman authored on20/03/2012 03:03:30
Showing1 changed files
... ...
@@ -58,8 +58,8 @@
58 58
     var pkg = caller.attr('id');
59 59
     var lang = caller.val();
60 60
     var wintbb = '../dist/torbrowser/tor-browser-<version-torbrowserbundle>_'+lang+'.exe';
61
-    var osxtbb = '../dist/torbrowser/osx/TorBrowser-<version-torbrowserbundleosx32>-dev-osx-i386-'+lang+'.zip';
62
-    var osxtbb64 = '../dist/torbrowser/osx/TorBrowser-<version-torbrowserbundleosx64>-dev-osx-x86_64-'+lang+'.zip';
61
+    var osxtbb = '../dist/torbrowser/osx/TorBrowser-<version-torbrowserbundleosx32>-osx-i386-'+lang+'.zip';
62
+    var osxtbb64 = '../dist/torbrowser/osx/TorBrowser-<version-torbrowserbundleosx64>-osx-x86_64-'+lang+'.zip';
63 63
     var lintbb32 = '../dist/torbrowser/linux/tor-browser-gnu-linux-i686-<version-torbrowserbundlelinux32>-dev-'+lang+'.tar.gz';
64 64
     var lintbb64 = '../dist/torbrowser/linux/tor-browser-gnu-linux-x86_64-<version-torbrowserbundlelinux64>-dev-'+lang+'.tar.gz';
65 65
     if(pkg == 'win-tbb'){
Browse code

Remove the ANNOUNCE_RSS hack as per ticket 4951

Sebastian Hahn authored on25/01/2012 00:54:07
Showing1 changed files
... ...
@@ -13,8 +13,6 @@
13 13
   <link rel="shortcut icon" type="image/x-icon" href="$(IMGROOT)/favicon.ico">
14 14
   <ifneq "$(REDIRECT)" "" "<meta http-equiv="refresh" content="0;url=$(DOCROOT)/$(REDIRECT)">">
15 15
   <ifneq "$(REDIRECT_GLOBAL)" "" "<meta http-equiv="refresh" content="0;url=$(REDIRECT_GLOBAL)">">
16
-  <ifeq "$(ANNOUNCE_RSS)" "yes" "<link rel="alternate" title="Tor Project OR-announce" href="http://rss.gmane.org/gmane.network.onion-routing.announce"
17
-type="application/rss+xml">">
18 16
 
19 17
   # begin WML to generate css/js paths 
20 18
   <ifneq "$(STYLESHEET)" "" "<link rel="stylesheet" type="text/css" href="$(DOCROOT)/$(STYLESHEET)">">
Browse code

in the download-easy javascript magic, when the user chooses a different language for a different OS, update the 64-bit linux download link too.

Roger Dingledine authored on14/11/2011 22:54:03
Showing1 changed files
... ...
@@ -69,16 +69,19 @@ type="application/rss+xml">">
69 69
       $('.'+pkg+'-sig').replaceWith('<a class="win-tbb-sig" href="'+wintbb+'.asc">sig</a>');
70 70
       $('.mac-alt').replaceWith('<a class="mac-alt" href="'+osxtbb+'">Mac</a>');
71 71
       $('.lin-alt').replaceWith('<a class="lin-alt" href="'+lintbb32+'">Linux</a>');
72
+      $('.lin-alt64').replaceWith('<a class="lin-alt64" href="'+lintbb64+'">Linux 64-bit</a>');
72 73
     }else if(pkg == 'osx-tbb'){
73 74
       $('.'+pkg).replaceWith('<a class="button osx-tbb" href="'+osxtbb+'"><span class="strong">Download</span><span class="normal"><button-osx-tbb32></span></a>');
74 75
       $('.'+pkg+'-sig').replaceWith('<a class="osx-tbb-sig" href="'+osxtbb+'.asc">sig</a>');
75 76
       $('.win-alt').replaceWith('<a class="lin-win" href="'+wintbb+'">Windows</a>');
76 77
       $('.lin-alt').replaceWith('<a class="lin-alt" href="'+lintbb32+'">Linux</a>');
78
+      $('.lin-alt64').replaceWith('<a class="lin-alt64" href="'+lintbb64+'">Linux 64-bit</a>');
77 79
     }else if(pkg == 'osx-tbb64'){
78 80
       $('.'+pkg).replaceWith('<a class="button osx-tbb64" href="'+osxtbb64+'"><span class="strong">Download</span><span class="normal"><button-osx-tbb64></span></a>');
79 81
       $('.'+pkg+'-sig').replaceWith('<a class="osx-tbb64-sig" href="'+osxtbb64+'.asc">sig</a>');
80 82
       $('.win-alt64').replaceWith('<a class="win-alt64" href="'+wintbb+'">Windows</a>');
81
-      $('.lin-alt64').replaceWith('<a class="lin-alt64" href="'+lintbb64+'">Linux</a>');
83
+      $('.lin-alt').replaceWith('<a class="lin-alt" href="'+lintbb32+'">Linux</a>');
84
+      $('.lin-alt64').replaceWith('<a class="lin-alt64" href="'+lintbb64+'">Linux 64-bit</a>');
82 85
     }else if(pkg == 'lin-tbb32'){
83 86
       $('.'+pkg).replaceWith('<a class="button lin-tbb32" href="'+lintbb32+'"><span class="strong">Download</span><span class="normal"><button-lin-tbb32></span></a>');
84 87
       $('.'+pkg+'-sig').replaceWith('<a class="lin-tbb32-sig" href="'+lintbb32+'.asc">sig</a>');
Browse code

break version-torbrowserbundleosx into 32 and 64, so in the future helix can version them separately if she needs to

Roger Dingledine authored on13/11/2011 01:36:26
Showing1 changed files
... ...
@@ -60,8 +60,8 @@ type="application/rss+xml">">
60 60
     var pkg = caller.attr('id');
61 61
     var lang = caller.val();
62 62
     var wintbb = '../dist/torbrowser/tor-browser-<version-torbrowserbundle>_'+lang+'.exe';
63
-    var osxtbb = '../dist/torbrowser/osx/TorBrowser-<version-torbrowserbundleosx>-dev-osx-i386-'+lang+'.zip';
64
-    var osxtbb64 = '../dist/torbrowser/osx/TorBrowser-<version-torbrowserbundleosx>-dev-osx-x86_64-'+lang+'.zip';
63
+    var osxtbb = '../dist/torbrowser/osx/TorBrowser-<version-torbrowserbundleosx32>-dev-osx-i386-'+lang+'.zip';
64
+    var osxtbb64 = '../dist/torbrowser/osx/TorBrowser-<version-torbrowserbundleosx64>-dev-osx-x86_64-'+lang+'.zip';
65 65
     var lintbb32 = '../dist/torbrowser/linux/tor-browser-gnu-linux-i686-<version-torbrowserbundlelinux32>-dev-'+lang+'.tar.gz';
66 66
     var lintbb64 = '../dist/torbrowser/linux/tor-browser-gnu-linux-x86_64-<version-torbrowserbundlelinux64>-dev-'+lang+'.tar.gz';
67 67
     if(pkg == 'win-tbb'){
Browse code

update download-easy to handle 32/64bit choices from ticket 4231.

Andrew Lewman authored on27/10/2011 20:36:51
Showing1 changed files
... ...
@@ -77,6 +77,8 @@ type="application/rss+xml">">
77 77
     }else if(pkg == 'osx-tbb64'){
78 78
       $('.'+pkg).replaceWith('<a class="button osx-tbb64" href="'+osxtbb64+'"><span class="strong">Download</span><span class="normal"><button-osx-tbb64></span></a>');
79 79
       $('.'+pkg+'-sig').replaceWith('<a class="osx-tbb64-sig" href="'+osxtbb64+'.asc">sig</a>');
80
+      $('.win-alt64').replaceWith('<a class="win-alt64" href="'+wintbb+'">Windows</a>');
81
+      $('.lin-alt64').replaceWith('<a class="lin-alt64" href="'+lintbb64+'">Linux</a>');
80 82
     }else if(pkg == 'lin-tbb32'){
81 83
       $('.'+pkg).replaceWith('<a class="button lin-tbb32" href="'+lintbb32+'"><span class="strong">Download</span><span class="normal"><button-lin-tbb32></span></a>');
82 84
       $('.'+pkg+'-sig').replaceWith('<a class="lin-tbb32-sig" href="'+lintbb32+'.asc">sig</a>');
... ...
@@ -85,6 +87,8 @@ type="application/rss+xml">">
85 87
     }else if(pkg == 'lin-tbb64'){
86 88
       $('.'+pkg).replaceWith('<a class="button lin-tbb64" href="'+lintbb64+'"><span class="strong">Download</span><span class="normal"><button-lin-tbb64></span></a>');
87 89
       $('.'+pkg+'-sig').replaceWith('<a class="lin-tbb64-sig" href="'+lintbb64+'.asc">sig</a>');
90
+      $('.mac-alt64').replaceWith('<a class="mac-alt64" href="'+osxtbb64+'">Mac</a>');
91
+      $('.win-alt64').replaceWith('<a class="win-alt64" href="'+wintbb+'">Windows</a>');
88 92
     }
89 93
   }
90 94
 
Browse code

and we have a new download-easy page from ticket 3926.

Andrew Lewman authored on28/09/2011 14:48:57
Showing1 changed files
... ...
@@ -67,15 +67,21 @@ type="application/rss+xml">">
67 67
     if(pkg == 'win-tbb'){
68 68
       $('.'+pkg).replaceWith('<a class="button win-tbb" href="'+wintbb+'"><span class="strong">Download</span><span class="normal"><button-win-tbb32></span></a>');
69 69
       $('.'+pkg+'-sig').replaceWith('<a class="win-tbb-sig" href="'+wintbb+'.asc">sig</a>');
70
+      $('.mac-alt').replaceWith('<a class="mac-alt" href="'+osxtbb+'">Mac</a>');
71
+      $('.lin-alt').replaceWith('<a class="lin-alt" href="'+lintbb32+'">Linux</a>');
70 72
     }else if(pkg == 'osx-tbb'){
71 73
       $('.'+pkg).replaceWith('<a class="button osx-tbb" href="'+osxtbb+'"><span class="strong">Download</span><span class="normal"><button-osx-tbb32></span></a>');
72 74
       $('.'+pkg+'-sig').replaceWith('<a class="osx-tbb-sig" href="'+osxtbb+'.asc">sig</a>');
75
+      $('.win-alt').replaceWith('<a class="lin-win" href="'+wintbb+'">Windows</a>');
76
+      $('.lin-alt').replaceWith('<a class="lin-alt" href="'+lintbb32+'">Linux</a>');
73 77
     }else if(pkg == 'osx-tbb64'){
74 78
       $('.'+pkg).replaceWith('<a class="button osx-tbb64" href="'+osxtbb64+'"><span class="strong">Download</span><span class="normal"><button-osx-tbb64></span></a>');
75 79
       $('.'+pkg+'-sig').replaceWith('<a class="osx-tbb64-sig" href="'+osxtbb64+'.asc">sig</a>');
76 80
     }else if(pkg == 'lin-tbb32'){
77 81
       $('.'+pkg).replaceWith('<a class="button lin-tbb32" href="'+lintbb32+'"><span class="strong">Download</span><span class="normal"><button-lin-tbb32></span></a>');
78 82
       $('.'+pkg+'-sig').replaceWith('<a class="lin-tbb32-sig" href="'+lintbb32+'.asc">sig</a>');
83
+      $('.mac-alt').replaceWith('<a class="lin-mac" href="'+osxtbb+'">Mac</a>');
84
+      $('.win-alt').replaceWith('<a class="lin-win" href="'+wintbb+'">Windows</a>');
79 85
     }else if(pkg == 'lin-tbb64'){
80 86
       $('.'+pkg).replaceWith('<a class="button lin-tbb64" href="'+lintbb64+'"><span class="strong">Download</span><span class="normal"><button-lin-tbb64></span></a>');
81 87
       $('.'+pkg+'-sig').replaceWith('<a class="lin-tbb64-sig" href="'+lintbb64+'.asc">sig</a>');
Browse code

apply jeremy's patch for osx tbb and language issues.

Andrew Lewman authored on06/09/2011 20:49:32
Showing1 changed files
... ...
@@ -61,19 +61,23 @@ type="application/rss+xml">">
61 61
     var lang = caller.val();
62 62
     var wintbb = '../dist/torbrowser/tor-browser-<version-torbrowserbundle>_'+lang+'.exe';
63 63
     var osxtbb = '../dist/torbrowser/osx/TorBrowser-<version-torbrowserbundleosx>-dev-osx-i386-'+lang+'.zip';
64
+    var osxtbb64 = '../dist/torbrowser/osx/TorBrowser-<version-torbrowserbundleosx>-dev-osx-x86_64-'+lang+'.zip';
64 65
     var lintbb32 = '../dist/torbrowser/linux/tor-browser-gnu-linux-i686-<version-torbrowserbundlelinux32>-dev-'+lang+'.tar.gz';
65 66
     var lintbb64 = '../dist/torbrowser/linux/tor-browser-gnu-linux-x86_64-<version-torbrowserbundlelinux64>-dev-'+lang+'.tar.gz';
66 67
     if(pkg == 'win-tbb'){
67
-      $('.'+pkg).replaceWith('<a class="button win-tbb" href="'+wintbb+'"><span class="strong">Download</span><span class="normal">Tor Browser Bundle</span></a>');
68
+      $('.'+pkg).replaceWith('<a class="button win-tbb" href="'+wintbb+'"><span class="strong">Download</span><span class="normal"><button-win-tbb32></span></a>');
68 69
       $('.'+pkg+'-sig').replaceWith('<a class="win-tbb-sig" href="'+wintbb+'.asc">sig</a>');
69 70
     }else if(pkg == 'osx-tbb'){
70
-      $('.'+pkg).replaceWith('<a class="button osx-tbb" href="'+osxtbb+'"><span class="strong">Download</span><span class="normal">Tor Browser Bundle (Beta)</span></a>');
71
+      $('.'+pkg).replaceWith('<a class="button osx-tbb" href="'+osxtbb+'"><span class="strong">Download</span><span class="normal"><button-osx-tbb32></span></a>');
71 72
       $('.'+pkg+'-sig').replaceWith('<a class="osx-tbb-sig" href="'+osxtbb+'.asc">sig</a>');
73
+    }else if(pkg == 'osx-tbb64'){
74
+      $('.'+pkg).replaceWith('<a class="button osx-tbb64" href="'+osxtbb64+'"><span class="strong">Download</span><span class="normal"><button-osx-tbb64></span></a>');
75
+      $('.'+pkg+'-sig').replaceWith('<a class="osx-tbb64-sig" href="'+osxtbb64+'.asc">sig</a>');
72 76
     }else if(pkg == 'lin-tbb32'){
73
-      $('.'+pkg).replaceWith('<a class="button lin-tbb32" href="'+lintbb32+'"><span class="strong">Download</span><span class="normal">i686 / 32-bit (Beta)</span></a>');
77
+      $('.'+pkg).replaceWith('<a class="button lin-tbb32" href="'+lintbb32+'"><span class="strong">Download</span><span class="normal"><button-lin-tbb32></span></a>');
74 78
       $('.'+pkg+'-sig').replaceWith('<a class="lin-tbb32-sig" href="'+lintbb32+'.asc">sig</a>');
75 79
     }else if(pkg == 'lin-tbb64'){
76
-      $('.'+pkg).replaceWith('<a class="button lin-tbb64" href="'+lintbb64+'"><span class="strong">Download</span><span class="normal">x86_64 / 64-bit (Beta)</span></a>');
80
+      $('.'+pkg).replaceWith('<a class="button lin-tbb64" href="'+lintbb64+'"><span class="strong">Download</span><span class="normal"><button-lin-tbb64></span></a>');
77 81
       $('.'+pkg+'-sig').replaceWith('<a class="lin-tbb64-sig" href="'+lintbb64+'.asc">sig</a>');
78 82
     }
79 83
   }
... ...
@@ -85,35 +89,6 @@ type="application/rss+xml">">
85 89
     $('.lang').css('display', 'block');
86 90
   });
87 91
   </script>
88
-  <script async type="text/javascript">
89
-  function displayVals() {
90
-    var t3 = $("#t3").val();
91
-    var amount = $("#amount").val();
92
-    if(t3 != 0){
93
-      $('#a3').val(amount);
94
-      $('#p3').val(1);
95
-      $('#cmd').val('_xclick-subscriptions');
96
-      $('#item_name').val('Tor Project Membership');
97
-      $('#ppinfo').replaceWith('<h6 id="ppinfo"><small>(Requires a PayPal Account)</small></h6>');
98
-    }else{
99
-      $('#a3').val(0);
100
-      $('#p3').val(0);
101
-      $('#cmd').val('_donations');
102
-      $('#item_name').val('Donation to the Tor Project');
103
-      $('#ppinfo').replaceWith('<h6 id="ppinfo" style="height:0px;"></h6>');
104
-    }
105
-    if( !t3 ) {
106
-      $('#cmd').val('_donations');
107
-      $('#item_name').val('Donation to the Tor Project');
108
-      $('#ppinfo').replaceWith('<h6 id="ppinfo" style="height:0px;"></h6>');
109
-    }
110
-  }
111
-  $(function(){
112
-    $("#amount").change(displayVals);
113
-    $("#t3").change(displayVals);
114
-    displayVals();
115
-  });
116
-  </script>
117 92
 </head>
118 93
 <body onload="resetAll()" onunload="">
119 94
 <div id="wrap">
Browse code

move the wmi file to the include/ directory

Roger Dingledine authored on30/08/2011 01:07:48
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,223 @@
1
+#! /usr/bin/wml
2
+<: use strict; :>
3
+<: use warnings; :>
4
+#use "perl-globals.wmi"
5
+#use "links.wmi"
6
+#use "versions.wmi"
7
+#use "navigation.wmi"
8
+
9
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
10
+<html>
11
+<head>
12
+  <title>$(TITLE)</title>
13
+  <link rel="shortcut icon" type="image/x-icon" href="$(IMGROOT)/favicon.ico">
14
+  <ifneq "$(REDIRECT)" "" "<meta http-equiv="refresh" content="0;url=$(DOCROOT)/$(REDIRECT)">">
15
+  <ifneq "$(REDIRECT_GLOBAL)" "" "<meta http-equiv="refresh" content="0;url=$(REDIRECT_GLOBAL)">">
16
+  <ifeq "$(ANNOUNCE_RSS)" "yes" "<link rel="alternate" title="Tor Project OR-announce" href="http://rss.gmane.org/gmane.network.onion-routing.announce"
17
+type="application/rss+xml">">
18
+
19
+  # begin WML to generate css/js paths 
20
+  <ifneq "$(STYLESHEET)" "" "<link rel="stylesheet" type="text/css" href="$(DOCROOT)/$(STYLESHEET)">">
21
+  <ifeq "$(STYLESHEET)" "" "<link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/master.css">">
22
+
23
+  #<link href="css/master.css" rel="stylesheet" type="text/css">
24
+  <!--[if lte IE 8]>
25
+  <link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/ie8-and-down.css">
26
+  <![endif]-->
27
+  <!--[if lte IE 7]>
28
+  <link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/ie7-and-down.css">
29
+  <![endif]-->
30
+  <!--[if IE 6]>
31
+  <link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/ie6.css">
32
+  <![endif]-->
33
+
34
+#  <script language="javascript" type="text/javascript" src="$(DOCROOT)/global.js"></script>
35
+  # end WML to generate css/js paths 
36
+
37
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
38
+  <meta name="author" content="The Tor Project, Inc.">
39
+  <meta name="keywords" content="anonymity online, tor, tor project, censorship circumvention, traffic analysis, anonymous communications research">
40
+  <script type="text/javascript" src="../js/jquery.min.js">
41
+# /* jQuery */
42
+  </script>
43
+  <script type="text/javascript" src="../js/jquery.client.min.js">
44
+/* "jQuery Browser And OS Detection Plugin" by Stoimen
45
+   Source: http://www.stoimen.com/blog/2009/07/16/jquery-browser-and-os-detection-plugin/
46
+   License: Public Domain (http://www.stoimen.com/blog/2009/07/16/jquery-browser-and-os-detection-plugin/#comment-12498) */
47
+  </script>
48
+  <script type="text/javascript" src="../js/dlpage01.js">
49
+# /* Displays detected section */
50
+  </script>
51
+  <script async type="text/javascript" src="../js/jquery.accordion.min.js">
52
+/* Modified version of "Stupid Simple jQuery Accordian Menu" originally developed by Ryan Stemkoski
53
+   Source: http://www.stemkoski.com/stupid-simple-jquery-accordion-menu/
54
+   License: Public Domain (http://www.stemkoski.com/stupid-simple-jquery-accordion-menu/#comment-32882) */
55
+  </script>
56
+  <script async type="text/javascript">
57
+# /* switches package links depending on selection */
58
+  function updateLang() {
59
+    var caller = $( this );
60
+    var pkg = caller.attr('id');
61
+    var lang = caller.val();
62
+    var wintbb = '../dist/torbrowser/tor-browser-<version-torbrowserbundle>_'+lang+'.exe';
63
+    var osxtbb = '../dist/torbrowser/osx/TorBrowser-<version-torbrowserbundleosx>-dev-osx-i386-'+lang+'.zip';
64
+    var lintbb32 = '../dist/torbrowser/linux/tor-browser-gnu-linux-i686-<version-torbrowserbundlelinux32>-dev-'+lang+'.tar.gz';
65
+    var lintbb64 = '../dist/torbrowser/linux/tor-browser-gnu-linux-x86_64-<version-torbrowserbundlelinux64>-dev-'+lang+'.tar.gz';
66
+    if(pkg == 'win-tbb'){
67
+      $('.'+pkg).replaceWith('<a class="button win-tbb" href="'+wintbb+'"><span class="strong">Download</span><span class="normal">Tor Browser Bundle</span></a>');
68
+      $('.'+pkg+'-sig').replaceWith('<a class="win-tbb-sig" href="'+wintbb+'.asc">sig</a>');
69
+    }else if(pkg == 'osx-tbb'){
70
+      $('.'+pkg).replaceWith('<a class="button osx-tbb" href="'+osxtbb+'"><span class="strong">Download</span><span class="normal">Tor Browser Bundle (Beta)</span></a>');
71
+      $('.'+pkg+'-sig').replaceWith('<a class="osx-tbb-sig" href="'+osxtbb+'.asc">sig</a>');
72
+    }else if(pkg == 'lin-tbb32'){
73
+      $('.'+pkg).replaceWith('<a class="button lin-tbb32" href="'+lintbb32+'"><span class="strong">Download</span><span class="normal">i686 / 32-bit (Beta)</span></a>');
74
+      $('.'+pkg+'-sig').replaceWith('<a class="lin-tbb32-sig" href="'+lintbb32+'.asc">sig</a>');
75
+    }else if(pkg == 'lin-tbb64'){
76
+      $('.'+pkg).replaceWith('<a class="button lin-tbb64" href="'+lintbb64+'"><span class="strong">Download</span><span class="normal">x86_64 / 64-bit (Beta)</span></a>');
77
+      $('.'+pkg+'-sig').replaceWith('<a class="lin-tbb64-sig" href="'+lintbb64+'.asc">sig</a>');
78
+    }
79
+  }
80
+
81
+  $(function(){
82
+    $('.lang').ready(updateLang);
83
+    $('.lang').change(updateLang);
84
+    /* Only show language selector if javascript is enabled */
85
+    $('.lang').css('display', 'block');
86
+  });
87
+  </script>
88
+  <script async type="text/javascript">
89
+  function displayVals() {
90
+    var t3 = $("#t3").val();
91
+    var amount = $("#amount").val();
92
+    if(t3 != 0){
93
+      $('#a3').val(amount);
94
+      $('#p3').val(1);
95
+      $('#cmd').val('_xclick-subscriptions');
96
+      $('#item_name').val('Tor Project Membership');
97
+      $('#ppinfo').replaceWith('<h6 id="ppinfo"><small>(Requires a PayPal Account)</small></h6>');
98
+    }else{
99
+      $('#a3').val(0);
100
+      $('#p3').val(0);
101
+      $('#cmd').val('_donations');
102
+      $('#item_name').val('Donation to the Tor Project');
103
+      $('#ppinfo').replaceWith('<h6 id="ppinfo" style="height:0px;"></h6>');
104
+    }
105
+    if( !t3 ) {
106
+      $('#cmd').val('_donations');
107
+      $('#item_name').val('Donation to the Tor Project');
108
+      $('#ppinfo').replaceWith('<h6 id="ppinfo" style="height:0px;"></h6>');
109
+    }
110
+  }
111
+  $(function(){
112
+    $("#amount").change(displayVals);
113
+    $("#t3").change(displayVals);
114
+    displayVals();
115
+  });
116
+  </script>
117
+</head>
118
+<body onload="resetAll()" onunload="">
119
+<div id="wrap">
120
+  <div id="header">
121
+    <h1 id="logo"><a href="<page index>">Tor</a></h1>
122
+      # navigation menu generation
123
+      <div id="nav">
124
+        <ul>
125
+        <:{
126
+            # create a hash and maintain order of keys
127
+            my %navigation;
128
+            my @keys;
129
+            while (@navigation) {
130
+              my $key = shift @navigation;
131
+              my $val = shift @navigation;
132
+              push @keys, $key;
133
+              $navigation{$key} = $val;
134
+            }
135
+
136
+            my $page = $WML_SRC_BASENAME;
137
+            my $lang = "$(LANG)";
138
+
139
+            for my $key (@keys) {
140
+              my ($dir, $base) = $key =~ m,^(?:(.*)/)?(.*?)$,;  
141
+
142
+              # in directory of active link, set class active 
143
+              my $class;
144
+              if ((defined $dir) and ($WML_SRC_DIRNAME =~/$dir/) or ($WML_SRC_BASENAME eq $base)) {
145
+                $class = 'class="active"';
146
+              } else {
147
+                $class = '';
148
+              }
149
+
150
+	            $dir = '.' unless defined $dir;
151
+                
152
+              # translated version
153
+              if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
154
+                  printf '<li><a '.$class.' href="%s">%s</a></li>'."\n",
155
+                         stripDotSlashs("$(DOCROOT)/$dir/$base.html.$(LANG)"),$navigation{$key};
156
+              } 
157
+              # english version
158
+              elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
159
+              	printf '<li><a '.$class.' href="%s">%s</a></li>'."\n",
160
+                  stripDotSlashs("$(DOCROOT)/$dir/$base.html"), $navigation{$key};
161
+              }
162
+              # full url
163
+              elsif ($key =~/^http/) {
164
+                printf '<li><a href="%s">%s</a></li>'."\n", $key, $navigation{$key};
165
+              } else {
166
+                warn "$WML_SRC_FILENAME has a [page $key] (parses to
167
+docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$dir/$lang/$base.wml), but that doesn't exist.";
168
+              }
169
+            }
170
+        }:>
171
+        </ul>
172
+      </div>
173
+      <!-- END NAV -->
174
+     # end navigation generation
175
+      <div id="calltoaction">
176
+        <ul>
177
+          <:{
178
+            my %calltoaction;
179
+            my @keys;
180
+            while (@calltoaction) {
181
+              my $key = shift @calltoaction;
182
+              my $val = shift @calltoaction;
183
+              push @keys, $key;
184
+              $calltoaction{$key} = $val;
185
+            } 
186
+
187
+            my $page = $WML_SRC_BASENAME;
188
+            my $lang = "$(LANG)";
189
+            for my $key (@keys) {
190
+              my ($dir, $base) = $key =~ m,^(?:(.*)/)?(.*?)$,;  
191
+
192
+              # in directory, set active 
193
+              my $class;
194
+              if ((defined $dir) and ($WML_SRC_DIRNAME =~/$dir/) or ($WML_SRC_BASENAME eq $base)) {
195
+              #if ($WML_SRC_BASENAME eq $base) {
196
+                $class = 'class="active"';
197
+              } else {
198
+                $class = '';
199
+              }
200
+
201
+	          $dir = '.' unless defined $dir;
202
+              # try to use a translated version
203
+              if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
204
+                  printf '<li class="donate"><a '.$class.' href="%s">%s</a></li>'."\n",
205
+                         stripDotSlashs("$(DOCROOT)/$dir/$base.html.$(LANG)"),$calltoaction{$key};
206
+              } 
207
+              # default to english version
208
+              elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
209
+              	printf '<li class="donate"><a '.$class.' href="%s">%s</a></li>'."\n",
210
+                  stripDotSlashs("$(DOCROOT)/$dir/$base.html"), $calltoaction{$key};
211
+              } else {
212
+                warn "$WML_SRC_FILENAME has a [page $key] (parses to docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$dir/$lang/$base.wml), but that doesn't exist.";
213
+              }
214
+            }    
215
+          }:>
216
+        </ul>
217
+      </div>
218
+      <!-- END CALLTOACTION -->
219
+  </div>
220
+  <!-- END HEADER -->
221
+
222
+#<ifneq "$(REDIRECT)" "" "Redirecting to <a href="$(DOCROOT)/$(REDIRECT)">$(DOCROOT)/$(REDIRECT)</a>.">
223
+#<ifneq "$(REDIRECT_GLOBAL)" "" "Redirecting to <a href="$(REDIRECT_GLOBAL)">$(REDIRECT_GLOBAL)</a>.">