9ecbc33244bc0cb3d51a351d1f09f98f4cff5752
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>
hiromipaw Minify JS and CSS

hiromipaw authored 7 years ago

include/dlhead.wmi      50)   <script type="text/javascript" src="../js/dlpage01.min.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">
include/dlhead.wmi      61)         { "torbrowserbundledir" : "<version-torbrowserbundledir>",
include/dlhead.wmi      62)           "torbrowserbundle" : "<version-torbrowserbundle>",
include/dlhead.wmi      63)           "torbrowserbundleosx64" : "<version-torbrowserbundleosx64>",
include/dlhead.wmi      64)           "torbrowserbundlelinux32" : "<version-torbrowserbundlelinux32>",
include/dlhead.wmi      65)           "torbrowserbundlelinux64" : "<version-torbrowserbundlelinux64>"  }
include/dlhead.wmi      66)     </span>
Andrew Lewman add dlhead for the download...

Andrew Lewman authored 13 years ago

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

hiromipaw authored 7 years ago

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

Andrew Lewman authored 13 years ago

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

hiromipaw authored 7 years ago

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

hiromipaw authored 7 years ago

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

Andrew Lewman authored 13 years ago

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

hiromipaw authored 7 years ago

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

Andrew Lewman authored 13 years ago

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

hiromipaw authored 7 years ago

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

Andrew Lewman authored 13 years ago

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

hiromipaw authored 7 years ago

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

Andrew Lewman authored 13 years ago

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

hiromipaw authored 7 years ago

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

Andrew Lewman authored 13 years ago

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

hiromipaw authored 7 years ago

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

Andrew Lewman authored 13 years ago

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

hiromipaw authored 7 years ago

include/dlhead.wmi     162)             }