Browse code

patch from jmtodaro for everything in ticket 4590.

Andrew Lewman authored on25/04/2012 06:41:44
Showing5 changed files
... ...
@@ -658,7 +658,7 @@ table tr img {
658 658
   }
659 659
 
660 660
 .easy .package h2 {
661
-  font-size: 28px;
661
+  font-size: 24px;
662 662
   font-weight: normal;
663 663
   padding-top: 10px;
664 664
   padding-bottom: 5px;
... ...
@@ -33,7 +33,7 @@ you are used to. Please read the <a href="#warning">full list of warnings</a> fo
33 33
 <!-- START DOWNLOADS -->
34 34
 <!-- START DOWNLOADS -->
35 35
 <!-- START WINDOWS -->
36
-      <div class="easy windows">
36
+      <div id="windows" class="easy windows">
37 37
 	<div class="package" style="padding-top: 13px; border-top: 0px;">
38 38
 	  <form class="downloads">
39 39
 	    <a class="button win-tbb" href="../dist/torbrowser/tor-browser-<version-torbrowserbundle>_<lang>.exe"><span class="strong">Download</span><span class="normal"><button-win-tbb32></span></a>
... ...
@@ -50,11 +50,11 @@ you are used to. Please read the <a href="#warning">full list of warnings</a> fo
50 50
 	    <em>Version <version-torbrowserbundle> - Windows 7, Vista, and XP</em>
51 51
 	    <p>Everything you need to safely browse the Internet. This package requires no installation. Just extract it and run. <a href="<page projects/torbrowser>">Learn more &raquo;</a></p>
52 52
 	  </div>
53
-	  <p class="alt-dl">Not Using Windows? Download for <a class="mac-alt" href="../dist/torbrowser/osx/TorBrowser-<version-torbrowserbundleosx32>-osx-i386-<lang>.zip">Mac</a>, <a class="lin-alt" href="../dist/torbrowser/linux/tor-browser-gnu-linux-i686-<version-torbrowserbundlelinux32>-dev-<lang>.tar.gz">Linux</a>, or <a class="lin-alt64" href="../dist/torbrowser/linux/tor-browser-gnu-linux-x86_64-<version-torbrowserbundlelinux64>-dev-<lang>.tar.gz">Linux 64-bit</a></p>
53
+	  <p class="alt-dl">Not Using Windows? Download for <a href="#mac">Mac</a> or <a href="#linux">Linux</a></p>
54 54
 	</div>
55 55
       </div>
56 56
 <!-- START MAC -->
57
-      <div class="easy mac">
57
+      <div id="mac" class="easy mac">
58 58
 	<div class="package" style="padding-top: 13px; border-top: 0px;">
59 59
 	  <form class="downloads">
60 60
 	    <a class="button osx-tbb" href="../dist/torbrowser/osx/TorBrowser-<version-torbrowserbundleosx32>-osx-i386-<lang>.zip"><span class="strong">Download</span><span class="normal"><button-osx-tbb32></span></a>
... ...
@@ -71,7 +71,7 @@ you are used to. Please read the <a href="#warning">full list of warnings</a> fo
71 71
 	    <em>Version <version-torbrowserbundleosx32> - OS X</em>
72 72
 	    <p>Everything you need to safely browse the Internet. This package requires no installation. Just extract it and run. <a href="<page projects/torbrowser>">Learn more &raquo;</a></p>
73 73
 	  </div>
74
-	  <p class="alt-dl">Not Using Mac? Download for <a class="win-alt" href="../dist/torbrowser/tor-browser-<version-torbrowserbundle>_<lang>.exe">Windows</a>, <a class="lin-alt" href="../dist/torbrowser/linux/tor-browser-gnu-linux-i686-<version-torbrowserbundlelinux32>-dev-<lang>.tar.gz">Linux</a>, or <a class="lin-alt64" href="../dist/torbrowser/linux/tor-browser-gnu-linux-x86_64-<version-torbrowserbundlelinux64>-dev-<lang>.tar.gz">Linux 64-bit</a></p>
74
+	  <p class="alt-dl">Not Using Mac? Download for <a href="#windows">Windows</a> or <a href="#linux">Linux</a></p>
75 75
 	</div>
76 76
       </div>
77 77
 <!-- START MAC 64-->
... ...
@@ -92,11 +92,11 @@ you are used to. Please read the <a href="#warning">full list of warnings</a> fo
92 92
 	    <em>Version <version-torbrowserbundleosx64> - OS X (64-Bit)</em>
93 93
 	    <p>Everything you need to safely browse the Internet. This package requires no installation. Just extract it and run. <a href="<page projects/torbrowser>">Learn more &raquo;</a></p>
94 94
 	  </div>
95
-	  <p class="alt-dl">Not Using Mac? Download for <a class="win-alt64" href="../dist/torbrowser/tor-browser-<version-torbrowserbundle>_<lang>.exe">Windows</a>, <a class="lin-alt" href="../dist/torbrowser/linux/tor-browser-gnu-linux-i686-<version-torbrowserbundlelinux32>-dev-<lang>.tar.gz">Linux</a>, or <a class="lin-alt64" href="../dist/torbrowser/linux/tor-browser-gnu-linux-x86_64-<version-torbrowserbundlelinux64>-dev-<lang>.tar.gz">Linux 64-bit</a></p>
95
+	  <p class="alt-dl">Not Using Mac? Download for <a href="#windows">Windows</a> or <a href="#linux">Linux</a></p>
96 96
 	</div>
97 97
       </div>
98 98
 <!-- START LINUX -->
99
-      <div class="easy linux">
99
+      <div id="linux" class="easy linux">
100 100
 	<div class="package" style="padding-top: 13px; border-top: 0px;">
101 101
 	  <form class="downloads">
102 102
 	    <a class="button lin-tbb32" href="../dist/torbrowser/linux/tor-browser-gnu-linux-i686-<version-torbrowserbundlelinux32>-dev-<lang>.tar.gz"><span class="strong">Download</span><span class="normal"><button-lin-tbb32></span></a>
... ...
@@ -113,7 +113,7 @@ you are used to. Please read the <a href="#warning">full list of warnings</a> fo
113 113
 	    <em>Version <version-torbrowserbundlelinux32> - Linux, Unix, BSD</em>
114 114
 	    <p>Everything you need to safely browse the Internet. This package requires no installation. Just extract it and run. <a href="<page projects/torbrowser>">Learn more &raquo;</a></p>
115 115
 	  </div>
116
-	  <p class="alt-dl">Not Using Linux? Download for <a class="mac-alt" href="../dist/torbrowser/osx/TorBrowser-<version-torbrowserbundleosx32>-osx-i386-<lang>.zip">Mac</a> or <a class="win-alt" href="../dist/torbrowser/tor-browser-<version-torbrowserbundle>_<lang>.exe">Windows</a></p>
116
+	  <p class="alt-dl">Not Using Linux? Download for <a href="#mac">Mac</a> or <a href="#windows">Windows</a></p>
117 117
 	</div>
118 118
       </div>
119 119
 <!-- START LINUX 64-Bit -->
... ...
@@ -134,7 +134,7 @@ you are used to. Please read the <a href="#warning">full list of warnings</a> fo
134 134
 	    <em>Version <version-torbrowserbundlelinux32> - Linux, Unix, BSD (64-Bit)</em>
135 135
 	    <p>Everything you need to safely browse the Internet. This package requires no installation. Just extract it and run. <a href="<page projects/torbrowser>">Learn more &raquo;</a></p>
136 136
 	  </div>
137
-	  <p class="alt-dl">Not Using Linux? Download for <a class="mac-alt64" href="../dist/torbrowser/osx/TorBrowser-<version-torbrowserbundleosx64>-osx-x86_64-<lang>.zip">Mac</a> or <a class="win-alt64" href="../dist/torbrowser/tor-browser-<version-torbrowserbundle>_<lang>.exe">Windows</a></p>
137
+	  <p class="alt-dl">Not Using Linux? Download for <a href="#mac">Mac</a> or <a href="#windows">Windows</a></p>
138 138
 	</div>
139 139
       </div>
140 140
       <p class="all-dl">Looking For Something Else? <a href="<page download/download>">View All Downloads</a></p>
... ...
@@ -297,6 +297,16 @@ the issues</a>.</p>
297 297
       <p><a href="<page donate/donate>">Other donation options...</a></p>
298 298
 </form>
299 299
 <!-- END DONATION WIDGET -->
300
+<div class="img-shadow sidenav-ez">
301
+<div class="sidenav-sub">
302
+<ul>
303
+<li class="dropdown"><a href="#windows">Microsoft Windows</a></li>
304
+<li class="dropdown"><a href="#mac">Apple OS X</a></li>
305
+<li class="dropdown"><a href="#linux">Linux/Unix</a></li>
306
+<li class="dropdown"><a href="../download/download.html.en">All Downloads</a></li>
307
+</ul>
308
+</div>
309
+</div>
300 310
 <!-- START INFO -->
301 311
 <div class="img-shadow">
302 312
 <div class="sidenav-sub">
... ...
@@ -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
 
... ...
@@ -34,3 +34,53 @@ function resetAll() {
34 34
   }
35 35
 }
36 36
 
37
+$(document).ready(function () {
38
+
39
+    $('.jump').click(function(event){
40
+      //prevent the default action for the click event
41
+      //event.preventDefault();
42
+
43
+      //get the full url - like mysitecom/index.htm#home
44
+      var full_url = this.href;
45
+
46
+      //split the url by # and get the anchor target name - home in mysitecom/index.htm#home
47
+      var parts = full_url.split("#");
48
+      var trgt = parts[1];
49
+
50
+      //get the top offset of the target anchor
51
+      var target_offset = $("#"+trgt).offset();
52
+      var target_top = target_offset.top;
53
+
54
+      //goto that anchor by setting the body scroll top to anchor top
55
+//      $('html, body').animate({scrollTop:target_top}, 1000);
56
+    });
57
+
58
+      
59
+    // Bind an event to window.onhashchange
60
+    $(window).bind( 'hashchange', function(e) {
61
+
62
+      // Get the hash (fragment) as a string, with any leading # removed.
63
+      var url = $.param.fragment();
64
+
65
+      // Toggle the '.easy' divs to off
66
+      if(url == 'windows'|url == 'mac'|url == 'linux'){
67
+
68
+	  $('.easy').css('display', 'none');
69
+      }
70
+      
71
+      if(url == 'windows'){
72
+	$('.easy.windows').css('display', 'block');
73
+      } else if(url == 'mac'){
74
+	$('.easy.mac').css('display', 'block');
75
+      } else if(url == 'linux'){
76
+	$('.easy.linux').css('display', 'block');
77
+      } else {
78
+	  $(function(){OScheck();});
79
+      }
80
+    });
81
+    
82
+    // Since the event is only triggered when the hash changes, we need to trigger
83
+    // the event now, to handle the hash the page may have loaded with.
84
+    $(window).trigger( 'hashchange' );
85
+
86
+});
37 87
new file mode 100644
... ...
@@ -0,0 +1,18 @@
1
+/*
2
+ * jQuery BBQ: Back Button & Query Library - v1.2.1 - 2/17/2010
3
+ * http://benalman.com/projects/jquery-bbq-plugin/
4
+ * 
5
+ * Copyright (c) 2010 "Cowboy" Ben Alman
6
+ * Dual licensed under the MIT and GPL licenses.
7
+ * http://benalman.com/about/license/
8
+ */
9
+(function($,p){var i,m=Array.prototype.slice,r=decodeURIComponent,a=$.param,c,l,v,b=$.bbq=$.bbq||{},q,u,j,e=$.event.special,d="hashchange",A="querystring",D="fragment",y="elemUrlAttr",g="location",k="href",t="src",x=/^.*\?|#.*$/g,w=/^.*\#/,h,C={};function E(F){return typeof F==="string"}function B(G){var F=m.call(arguments,1);return function(){return G.apply(this,F.concat(m.call(arguments)))}}function n(F){return F.replace(/^[^#]*#?(.*)$/,"$1")}function o(F){return F.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(H,M,F,I,G){var O,L,K,N,J;if(I!==i){K=F.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||"";if(G===2&&E(I)){L=I.replace(H?w:x,"")}else{N=l(K[2]);I=E(I)?l[H?D:A](I):I;L=G===2?I:G===1?$.extend({},I,N):$.extend({},N,I);L=a(L);if(H){L=L.replace(h,r)}}O=K[1]+(H?"#":L||!K[1]?"?":"")+L+J}else{O=M(F!==i?F:p[g][k])}return O}a[A]=B(f,0,o);a[D]=c=B(f,1,n);c.noEscape=function(G){G=G||"";var F=$.map(G.split(""),encodeURIComponent);h=new RegExp(F.join("|"),"g")};c.noEscape(",/");$.deparam=l=function(I,F){var H={},G={"true":!0,"false":!1,"null":null};$.each(I.replace(/\+/g," ").split("&"),function(L,Q){var K=Q.split("="),P=r(K[0]),J,O=H,M=0,R=P.split("]["),N=R.length-1;if(/\[/.test(R[0])&&/\]$/.test(R[N])){R[N]=R[N].replace(/\]$/,"");R=R.shift().split("[").concat(R);N=R.length-1}else{N=0}if(K.length===2){J=r(K[1]);if(F){J=J&&!isNaN(J)?+J:J==="undefined"?i:G[J]!==i?G[J]:J}if(N){for(;M<=N;M++){P=R[M]===""?O.length:R[M];O=O[P]=M<N?O[P]||(R[M+1]&&isNaN(R[M+1])?{}:[]):J}}else{if($.isArray(H[P])){H[P].push(J)}else{if(H[P]!==i){H[P]=[H[P],J]}else{H[P]=J}}}}else{if(P){H[P]=F?i:""}}});return H};function z(H,F,G){if(F===i||typeof F==="boolean"){G=F;F=a[H?D:A]()}else{F=E(F)?F.replace(H?w:x,""):F}return l(F,G)}l[A]=B(z,0);l[D]=v=B(z,1);$[y]||($[y]=function(F){return $.extend(C,F)})({a:k,base:k,iframe:t,img:t,input:t,form:"action",link:k,script:t});j=$[y];function s(I,G,H,F){if(!E(H)&&typeof H!=="object"){F=H;H=G;G=i}return this.each(function(){var L=$(this),J=G||j()[(this.nodeName||"").toLowerCase()]||"",K=J&&L.attr(J)||"";L.attr(J,a[I](K,H,F))})}$.fn[A]=B(s,A);$.fn[D]=B(s,D);b.pushState=q=function(I,F){if(E(I)&&/^#/.test(I)&&F===i){F=2}var H=I!==i,G=c(p[g][k],H?I:{},H?F:2);p[g][k]=G+(/#/.test(G)?"":"#")};b.getState=u=function(F,G){return F===i||typeof F==="boolean"?v(F):v(G)[F]};b.removeState=function(F){var G={};if(F!==i){G=u();$.each($.isArray(F)?F:arguments,function(I,H){delete G[H]})}q(G,2)};e[d]=$.extend(e[d],{add:function(F){var H;function G(J){var I=J[D]=c();J.getState=function(K,L){return K===i||typeof K==="boolean"?l(I,K):l(I,L)[K]};H.apply(this,arguments)}if($.isFunction(F)){H=F;return G}else{H=F.handler;F.handler=G}}})})(jQuery,this);
10
+/*
11
+ * jQuery hashchange event - v1.2 - 2/11/2010
12
+ * http://benalman.com/projects/jquery-hashchange-plugin/
13
+ * 
14
+ * Copyright (c) 2010 "Cowboy" Ben Alman
15
+ * Dual licensed under the MIT and GPL licenses.
16
+ * http://benalman.com/about/license/
17
+ */
18
+(function($,i,b){var j,k=$.event.special,c="location",d="hashchange",l="href",f=$.browser,g=document.documentMode,h=f.msie&&(g===b||g<8),e="on"+d in i&&!h;function a(m){m=m||i[c][l];return m.replace(/^[^#]*#?(.*)$/,"$1")}$[d+"Delay"]=100;k[d]=$.extend(k[d],{setup:function(){if(e){return false}$(j.start)},teardown:function(){if(e){return false}$(j.stop)}});j=(function(){var m={},r,n,o,q;function p(){o=q=function(s){return s};if(h){n=$('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow;q=function(){return a(n.document[c][l])};o=function(u,s){if(u!==s){var t=n.document;t.open().close();t[c].hash="#"+u}};o(a())}}m.start=function(){if(r){return}var t=a();o||p();(function s(){var v=a(),u=q(t);if(v!==t){o(t=v,u);$(i).trigger(d)}else{if(u!==t){i[c][l]=i[c][l].replace(/#.*/,"")+"#"+u}}r=setTimeout(s,$[d+"Delay"])})()};m.stop=function(){if(!n){r&&clearTimeout(r);r=0}};return m})()})(jQuery,this);
0 19
\ No newline at end of file