77f0064b2b80a5fc9464c8a20b03bf8faf95f14e
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 11 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)         }:>
download/en/dlhead.wmi 117)         </ul>
download/en/dlhead.wmi 118)       </div>
download/en/dlhead.wmi 119)       <!-- END NAV -->
download/en/dlhead.wmi 120)      # end navigation generation
download/en/dlhead.wmi 121)       <div id="calltoaction">
download/en/dlhead.wmi 122)         <ul>
download/en/dlhead.wmi 123)           <:{
download/en/dlhead.wmi 124)             my %calltoaction;
download/en/dlhead.wmi 125)             my @keys;
download/en/dlhead.wmi 126)             while (@calltoaction) {
download/en/dlhead.wmi 127)               my $key = shift @calltoaction;
download/en/dlhead.wmi 128)               my $val = shift @calltoaction;
download/en/dlhead.wmi 129)               push @keys, $key;
download/en/dlhead.wmi 130)               $calltoaction{$key} = $val;
hiromipaw Add support for old jquery...

hiromipaw authored 6 years ago

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

Andrew Lewman authored 12 years ago

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

hiromipaw authored 6 years ago

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

Andrew Lewman authored 12 years ago

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

hiromipaw authored 6 years ago

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

Andrew Lewman authored 12 years ago

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

hiromipaw authored 6 years ago

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

Andrew Lewman authored 12 years ago

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

hiromipaw authored 6 years ago

include/dlhead.wmi     160)             }