76864aa15a22081deb995e9f4109a3bd360700cb
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi   1) #! /usr/bin/wml
download/en/dlhead.wmi   2) <: use strict; :>
download/en/dlhead.wmi   3) <: use warnings; :>
download/en/dlhead.wmi   4) #use "perl-globals.wmi"
download/en/dlhead.wmi   5) #use "links.wmi"
download/en/dlhead.wmi   6) #use "versions.wmi"
download/en/dlhead.wmi   7) #use "navigation.wmi"
download/en/dlhead.wmi   8) 
download/en/dlhead.wmi   9) <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
download/en/dlhead.wmi  10) <html>
download/en/dlhead.wmi  11) <head>
download/en/dlhead.wmi  12)   <title>$(TITLE)</title>
download/en/dlhead.wmi  13)   <link rel="shortcut icon" type="image/x-icon" href="$(IMGROOT)/favicon.ico">
download/en/dlhead.wmi  14)   <ifneq "$(REDIRECT)" "" "<meta http-equiv="refresh" content="0;url=$(DOCROOT)/$(REDIRECT)">">
download/en/dlhead.wmi  15)   <ifneq "$(REDIRECT_GLOBAL)" "" "<meta http-equiv="refresh" content="0;url=$(REDIRECT_GLOBAL)">">
download/en/dlhead.wmi  16) 
hiromipaw Add support for old jquery...

hiromipaw authored 6 years ago

include/dlhead.wmi      17)   # begin WML to generate css/js paths
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi  18)   <ifneq "$(STYLESHEET)" "" "<link rel="stylesheet" type="text/css" href="$(DOCROOT)/$(STYLESHEET)">">
hiromipaw Minify JS and CSS

hiromipaw authored 6 years ago

include/dlhead.wmi      19)   <ifeq "$(STYLESHEET)" "" "<link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/master.min.css">">
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi  20) 
hiromipaw Minify JS and CSS

hiromipaw authored 6 years ago

include/dlhead.wmi      21)   #<link href="css/master.min.css" rel="stylesheet" type="text/css">
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi  22)   <!--[if lte IE 8]>
hiromipaw Minify JS and CSS

hiromipaw authored 6 years ago

include/dlhead.wmi      23)   <link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/ie8-and-down.min.css">
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi  24)   <![endif]-->
download/en/dlhead.wmi  25)   <!--[if lte IE 7]>
hiromipaw Minify JS and CSS

hiromipaw authored 6 years ago

include/dlhead.wmi      26)   <link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/ie7-and-down.min.css">
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi  27)   <![endif]-->
download/en/dlhead.wmi  28)   <!--[if IE 6]>
hiromipaw Minify JS and CSS

hiromipaw authored 6 years ago

include/dlhead.wmi      29)   <link rel="stylesheet" type="text/css" href="$(DOCROOT)/css/ie6.min.css">
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi  30)   <![endif]-->
download/en/dlhead.wmi  31) 
hiromipaw Add support for old jquery...

hiromipaw authored 6 years ago

include/dlhead.wmi      32)   # end WML to generate css/js paths
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi  33) 
download/en/dlhead.wmi  34)   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
download/en/dlhead.wmi  35)   <meta name="author" content="The Tor Project, Inc.">
download/en/dlhead.wmi  36)   <meta name="keywords" content="anonymity online, tor, tor project, censorship circumvention, traffic analysis, anonymous communications research">
download/en/dlhead.wmi  37)   <script type="text/javascript" src="../js/jquery.min.js">
download/en/dlhead.wmi  38) # /* jQuery */
download/en/dlhead.wmi  39)   </script>
download/en/dlhead.wmi  40)   <script type="text/javascript" src="../js/jquery.client.min.js">
download/en/dlhead.wmi  41) /* "jQuery Browser And OS Detection Plugin" by Stoimen
download/en/dlhead.wmi  42)    Source: http://www.stoimen.com/blog/2009/07/16/jquery-browser-and-os-detection-plugin/
download/en/dlhead.wmi  43)    License: Public Domain (http://www.stoimen.com/blog/2009/07/16/jquery-browser-and-os-detection-plugin/#comment-12498) */
download/en/dlhead.wmi  44)   </script>
hiromipaw Minify JS and CSS

hiromipaw authored 6 years ago

include/dlhead.wmi      45)   <script type="text/javascript" src="../js/jquery-migrate-1.0.0.min.js"></script>
Andrew Lewman patch from jmtodaro for eve...

Andrew Lewman authored 12 years ago

include/dlhead.wmi      46)   <script type="text/javascript" src="../js/jquery.ba-bbq.min.js">
include/dlhead.wmi      47) /*  Source: https://raw.github.com/cowboy/jquery-bbq/v1.2.1/jquery.ba-bbq.js */
include/dlhead.wmi      48)   </script>
Nicolas Vigier Don't use minified version...

Nicolas Vigier authored 6 years ago

include/dlhead.wmi      49)   <script type="text/javascript" src="../js/dlpage01.js">
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi  50) # /* Displays detected section */
download/en/dlhead.wmi  51)   </script>
download/en/dlhead.wmi  52)   <script async type="text/javascript" src="../js/jquery.accordion.min.js">
download/en/dlhead.wmi  53) /* Modified version of "Stupid Simple jQuery Accordian Menu" originally developed by Ryan Stemkoski
download/en/dlhead.wmi  54)    Source: http://www.stemkoski.com/stupid-simple-jquery-accordion-menu/
download/en/dlhead.wmi  55)    License: Public Domain (http://www.stemkoski.com/stupid-simple-jquery-accordion-menu/#comment-32882) */
download/en/dlhead.wmi  56)   </script>
download/en/dlhead.wmi  57) </head>
hiromipaw Fix src unsafe error

hiromipaw authored 6 years ago

include/dlhead.wmi      58) <body class="onload">
Arthur Edelstein Bug 22357: Move download la...

Arthur Edelstein authored 6 years ago

include/dlhead.wmi      59)     <span class="hidden" id="version-data">
Nicolas Vigier Allow having different Tor...

Nicolas Vigier authored 6 years ago

include/dlhead.wmi      60)         { "torbrowserbundle" : "<version-torbrowserbundle>",
Arthur Edelstein Bug 22357: Move download la...

Arthur Edelstein authored 6 years ago

include/dlhead.wmi      61)           "torbrowserbundleosx64" : "<version-torbrowserbundleosx64>",
include/dlhead.wmi      62)           "torbrowserbundlelinux32" : "<version-torbrowserbundlelinux32>",
include/dlhead.wmi      63)           "torbrowserbundlelinux64" : "<version-torbrowserbundlelinux64>"  }
include/dlhead.wmi      64)     </span>
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi  65) <div id="wrap">
download/en/dlhead.wmi  66)   <div id="header">
download/en/dlhead.wmi  67)     <h1 id="logo"><a href="<page index>">Tor</a></h1>
download/en/dlhead.wmi  68)       # navigation menu generation
download/en/dlhead.wmi  69)       <div id="nav">
download/en/dlhead.wmi  70)         <ul>
download/en/dlhead.wmi  71)         <:{
download/en/dlhead.wmi  72)             # create a hash and maintain order of keys
download/en/dlhead.wmi  73)             my %navigation;
download/en/dlhead.wmi  74)             my @keys;
download/en/dlhead.wmi  75)             while (@navigation) {
download/en/dlhead.wmi  76)               my $key = shift @navigation;
download/en/dlhead.wmi  77)               my $val = shift @navigation;
download/en/dlhead.wmi  78)               push @keys, $key;
download/en/dlhead.wmi  79)               $navigation{$key} = $val;
download/en/dlhead.wmi  80)             }
download/en/dlhead.wmi  81) 
download/en/dlhead.wmi  82)             my $page = $WML_SRC_BASENAME;
download/en/dlhead.wmi  83)             my $lang = "$(LANG)";
download/en/dlhead.wmi  84) 
download/en/dlhead.wmi  85)             for my $key (@keys) {
hiromipaw Add support for old jquery...

hiromipaw authored 6 years ago

include/dlhead.wmi      86)               my ($dir, $base) = $key =~ m,^(?:(.*)/)?(.*?)$,;
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi  87) 
hiromipaw Add support for old jquery...

hiromipaw authored 6 years ago

include/dlhead.wmi      88)               # in directory of active link, set class active
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi  89)               my $class;
download/en/dlhead.wmi  90)               if ((defined $dir) and ($WML_SRC_DIRNAME =~/$dir/) or ($WML_SRC_BASENAME eq $base)) {
download/en/dlhead.wmi  91)                 $class = 'class="active"';
download/en/dlhead.wmi  92)               } else {
download/en/dlhead.wmi  93)                 $class = '';
download/en/dlhead.wmi  94)               }
download/en/dlhead.wmi  95) 
download/en/dlhead.wmi  96) 	            $dir = '.' unless defined $dir;
hiromipaw Add support for old jquery...

hiromipaw authored 6 years ago

include/dlhead.wmi      97) 
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi  98)               # translated version
download/en/dlhead.wmi  99)               if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
download/en/dlhead.wmi 100)                   printf '<li><a '.$class.' href="%s">%s</a></li>'."\n",
download/en/dlhead.wmi 101)                          stripDotSlashs("$(DOCROOT)/$dir/$base.html.$(LANG)"),$navigation{$key};
hiromipaw Add support for old jquery...

hiromipaw authored 6 years ago

include/dlhead.wmi     102)               }
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi 103)               # english version
download/en/dlhead.wmi 104)               elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
download/en/dlhead.wmi 105)               	printf '<li><a '.$class.' href="%s">%s</a></li>'."\n",
download/en/dlhead.wmi 106)                   stripDotSlashs("$(DOCROOT)/$dir/$base.html"), $navigation{$key};
download/en/dlhead.wmi 107)               }
download/en/dlhead.wmi 108)               # full url
download/en/dlhead.wmi 109)               elsif ($key =~/^http/) {
download/en/dlhead.wmi 110)                 printf '<li><a href="%s">%s</a></li>'."\n", $key, $navigation{$key};
download/en/dlhead.wmi 111)               } else {
download/en/dlhead.wmi 112)                 warn "$WML_SRC_FILENAME has a [page $key] (parses to
download/en/dlhead.wmi 113) docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$dir/$lang/$base.wml), but that doesn't exist.";
download/en/dlhead.wmi 114)               }
download/en/dlhead.wmi 115)             }
download/en/dlhead.wmi 116)         }:>
hiromipaw Modify languag switch to us...

hiromipaw authored 6 years ago

include/dlhead.wmi     117)      # LANGUAGE SWITCH 
hiromipaw Move language switch to the...

hiromipaw authored 6 years ago

include/dlhead.wmi     118)       <li>
hiromipaw Modify languag switch to us...

hiromipaw authored 6 years ago

include/dlhead.wmi     119)          <div class="dropdown">
include/dlhead.wmi     120)            <button class="dropbtn">Languages</button>
include/dlhead.wmi     121)            <div class="dropdown-content">
include/dlhead.wmi     122)             
hiromipaw Move language switch to the...

hiromipaw authored 6 years ago

include/dlhead.wmi     123)          # this is a cgi trampoline to bounce us to the right page
include/dlhead.wmi     124)          # alternately, if the client supports javascript we can redirect that way
include/dlhead.wmi     125)          # noscript does not block onclick but clients may have disabled javascript completely
include/dlhead.wmi     126)          #
include/dlhead.wmi     127)          # for this to work we need to know the relative path from the document root
include/dlhead.wmi     128)          # to the current directory that wml is in.
include/dlhead.wmi     129)            <:{
include/dlhead.wmi     130)              #import "perl-globals.wmi";
include/dlhead.wmi     131)              use Cwd;
include/dlhead.wmi     132)              use Cwd 'abs_path';
include/dlhead.wmi     133)              use File::Spec;
include/dlhead.wmi     134)              my $urlbase = File::Spec->abs2rel(getcwd(),abs_path("$(DOCROOT)"));
include/dlhead.wmi     135)              my $LANGUAGES;
include/dlhead.wmi     136)              my $page = $WML_SRC_FILENAME;
include/dlhead.wmi     137)              opendir(DIR, getcwd()) or die $!;
include/dlhead.wmi     138)              # take a look and see what language support we have
include/dlhead.wmi     139)              while (my $file = readdir(DIR)) {
include/dlhead.wmi     140)                  if (-d $file) {
include/dlhead.wmi     141)                      if (-e "$file/$page") {
hiromipaw Modify languag switch to us...

hiromipaw authored 6 years ago

include/dlhead.wmi     142)                          my $url = $WML_SRC_BASENAME.'.html.'.$file;
include/dlhead.wmi     143)                          print '<a href="'.$url.'" >'.$LANGUAGES{$file}.'</a>'."\n" unless not defined $LANGUAGES{$file};
hiromipaw Move language switch to the...

hiromipaw authored 6 years ago

include/dlhead.wmi     144)                      }
include/dlhead.wmi     145)                  }
include/dlhead.wmi     146)              }
include/dlhead.wmi     147)              closedir(DIR);
include/dlhead.wmi     148)            }:>
hiromipaw Modify languag switch to us...

hiromipaw authored 6 years ago

include/dlhead.wmi     149)             </div>
include/dlhead.wmi     150)          </div> 
hiromipaw Move language switch to the...

hiromipaw authored 6 years ago

include/dlhead.wmi     151)        </li>
include/dlhead.wmi     152)        #
include/dlhead.wmi     153)       </ul>
include/dlhead.wmi     154)     
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi 155)       </div>
download/en/dlhead.wmi 156)       <!-- END NAV -->
download/en/dlhead.wmi 157)      # end navigation generation
download/en/dlhead.wmi 158)       <div id="calltoaction">
download/en/dlhead.wmi 159)         <ul>
download/en/dlhead.wmi 160)           <:{
download/en/dlhead.wmi 161)             my %calltoaction;
download/en/dlhead.wmi 162)             my @keys;
download/en/dlhead.wmi 163)             while (@calltoaction) {
download/en/dlhead.wmi 164)               my $key = shift @calltoaction;
download/en/dlhead.wmi 165)               my $val = shift @calltoaction;
download/en/dlhead.wmi 166)               push @keys, $key;
download/en/dlhead.wmi 167)               $calltoaction{$key} = $val;
hiromipaw Add support for old jquery...

hiromipaw authored 6 years ago

include/dlhead.wmi     168)             }
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi 169) 
download/en/dlhead.wmi 170)             my $page = $WML_SRC_BASENAME;
download/en/dlhead.wmi 171)             my $lang = "$(LANG)";
download/en/dlhead.wmi 172)             for my $key (@keys) {
hiromipaw Add support for old jquery...

hiromipaw authored 6 years ago

include/dlhead.wmi     173)               my ($dir, $base) = $key =~ m,^(?:(.*)/)?(.*?)$,;
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi 174) 
hiromipaw Add support for old jquery...

hiromipaw authored 6 years ago

include/dlhead.wmi     175)               # in directory, set active
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi 176)               my $class;
download/en/dlhead.wmi 177)               if ((defined $dir) and ($WML_SRC_DIRNAME =~/$dir/) or ($WML_SRC_BASENAME eq $base)) {
download/en/dlhead.wmi 178)               #if ($WML_SRC_BASENAME eq $base) {
download/en/dlhead.wmi 179)                 $class = 'class="active"';
download/en/dlhead.wmi 180)               } else {
download/en/dlhead.wmi 181)                 $class = '';
download/en/dlhead.wmi 182)               }
download/en/dlhead.wmi 183) 
download/en/dlhead.wmi 184) 	          $dir = '.' unless defined $dir;
download/en/dlhead.wmi 185)               # try to use a translated version
download/en/dlhead.wmi 186)               if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
download/en/dlhead.wmi 187)                   printf '<li class="donate"><a '.$class.' href="%s">%s</a></li>'."\n",
download/en/dlhead.wmi 188)                          stripDotSlashs("$(DOCROOT)/$dir/$base.html.$(LANG)"),$calltoaction{$key};
hiromipaw Add support for old jquery...

hiromipaw authored 6 years ago

include/dlhead.wmi     189)               }
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 12 years ago

download/en/dlhead.wmi 190)               # default to english version
download/en/dlhead.wmi 191)               elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
download/en/dlhead.wmi 192)               	printf '<li class="donate"><a '.$class.' href="%s">%s</a></li>'."\n",
download/en/dlhead.wmi 193)                   stripDotSlashs("$(DOCROOT)/$dir/$base.html"), $calltoaction{$key};
download/en/dlhead.wmi 194)               } else {
download/en/dlhead.wmi 195)                 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.";
download/en/dlhead.wmi 196)               }
hiromipaw Add support for old jquery...

hiromipaw authored 6 years ago

include/dlhead.wmi     197)             }