89d70c9a131d619e2df72eb2d44de07b9c9292a1
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 13 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 7 years ago

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

Andrew Lewman authored 13 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 7 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 13 years ago

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

hiromipaw authored 7 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 13 years ago

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

hiromipaw authored 7 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 13 years ago

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

hiromipaw authored 7 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 13 years ago

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

hiromipaw authored 7 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 13 years ago

download/en/dlhead.wmi  30)   <![endif]-->
download/en/dlhead.wmi  31) 
download/en/dlhead.wmi  32) #  <script language="javascript" type="text/javascript" src="$(DOCROOT)/global.js"></script>
hiromipaw Add support for old jquery...

hiromipaw authored 7 years ago

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

Andrew Lewman authored 13 years ago

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

hiromipaw authored 7 years ago

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

Nicolas Vigier authored 7 years ago

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

Andrew Lewman authored 13 years ago

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

hiromipaw authored 7 years ago

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

Arthur Edelstein authored 7 years ago

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

Nicolas Vigier authored 7 years ago

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

Arthur Edelstein authored 7 years ago

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

Andrew Lewman authored 13 years ago

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

hiromipaw authored 7 years ago

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

Andrew Lewman authored 13 years ago

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

hiromipaw authored 7 years ago

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

Andrew Lewman authored 13 years ago

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

hiromipaw authored 7 years ago

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

Andrew Lewman authored 13 years ago

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

hiromipaw authored 7 years ago

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

Andrew Lewman authored 13 years ago

download/en/dlhead.wmi 104)               # english version
download/en/dlhead.wmi 105)               elsif (-e "$(DOCROOT)/$dir/en/$base.wml") {
download/en/dlhead.wmi 106)               	printf '<li><a '.$class.' href="%s">%s</a></li>'."\n",
download/en/dlhead.wmi 107)                   stripDotSlashs("$(DOCROOT)/$dir/$base.html"), $navigation{$key};
download/en/dlhead.wmi 108)               }
download/en/dlhead.wmi 109)               # full url
download/en/dlhead.wmi 110)               elsif ($key =~/^http/) {
download/en/dlhead.wmi 111)                 printf '<li><a href="%s">%s</a></li>'."\n", $key, $navigation{$key};
download/en/dlhead.wmi 112)               } else {
download/en/dlhead.wmi 113)                 warn "$WML_SRC_FILENAME has a [page $key] (parses to
download/en/dlhead.wmi 114) docdir: $(DOCROOT)/; dir: $dir; base: $base -> $(DOCROOT)/$dir/$lang/$base.wml), but that doesn't exist.";
download/en/dlhead.wmi 115)               }
download/en/dlhead.wmi 116)             }
download/en/dlhead.wmi 117)         }:>
download/en/dlhead.wmi 118)         </ul>
download/en/dlhead.wmi 119)       </div>
download/en/dlhead.wmi 120)       <!-- END NAV -->
download/en/dlhead.wmi 121)      # end navigation generation
download/en/dlhead.wmi 122)       <div id="calltoaction">
download/en/dlhead.wmi 123)         <ul>
download/en/dlhead.wmi 124)           <:{
download/en/dlhead.wmi 125)             my %calltoaction;
download/en/dlhead.wmi 126)             my @keys;
download/en/dlhead.wmi 127)             while (@calltoaction) {
download/en/dlhead.wmi 128)               my $key = shift @calltoaction;
download/en/dlhead.wmi 129)               my $val = shift @calltoaction;
download/en/dlhead.wmi 130)               push @keys, $key;
download/en/dlhead.wmi 131)               $calltoaction{$key} = $val;
hiromipaw Add support for old jquery...

hiromipaw authored 7 years ago

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

Andrew Lewman authored 13 years ago

download/en/dlhead.wmi 133) 
download/en/dlhead.wmi 134)             my $page = $WML_SRC_BASENAME;
download/en/dlhead.wmi 135)             my $lang = "$(LANG)";
download/en/dlhead.wmi 136)             for my $key (@keys) {
hiromipaw Add support for old jquery...

hiromipaw authored 7 years ago

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

Andrew Lewman authored 13 years ago

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

hiromipaw authored 7 years ago

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

Andrew Lewman authored 13 years ago

download/en/dlhead.wmi 140)               my $class;
download/en/dlhead.wmi 141)               if ((defined $dir) and ($WML_SRC_DIRNAME =~/$dir/) or ($WML_SRC_BASENAME eq $base)) {
download/en/dlhead.wmi 142)               #if ($WML_SRC_BASENAME eq $base) {
download/en/dlhead.wmi 143)                 $class = 'class="active"';
download/en/dlhead.wmi 144)               } else {
download/en/dlhead.wmi 145)                 $class = '';
download/en/dlhead.wmi 146)               }
download/en/dlhead.wmi 147) 
download/en/dlhead.wmi 148) 	          $dir = '.' unless defined $dir;
download/en/dlhead.wmi 149)               # try to use a translated version
download/en/dlhead.wmi 150)               if (-e "$(DOCROOT)/$dir/$lang/$base.wml") {
download/en/dlhead.wmi 151)                   printf '<li class="donate"><a '.$class.' href="%s">%s</a></li>'."\n",
download/en/dlhead.wmi 152)                          stripDotSlashs("$(DOCROOT)/$dir/$base.html.$(LANG)"),$calltoaction{$key};
hiromipaw Add support for old jquery...

hiromipaw authored 7 years ago

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

Andrew Lewman authored 13 years ago

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

hiromipaw authored 7 years ago

include/dlhead.wmi     161)             }