89c6c05a362cd9e3c2b09305404081338dad5fc6
Andrew Lewman new download page layout fr...

Andrew Lewman authored 12 years ago

1) $(function(){
2)   /* If javascript is enabled this hides all sections by default */
Andrew Lewman and we have a new download-...

Andrew Lewman authored 12 years ago

3)   $(".easy").css('display', 'none');
Andrew Lewman new download page layout fr...

Andrew Lewman authored 12 years ago

4)   /* Only show language selector if javascript is enabled */
5)   $('.lang').css('display', 'block');
Andrew Lewman and we have a new download-...

Andrew Lewman authored 12 years ago

6)   $('.lang-alt').css('display', 'none');
7)   $('.expander').css('display', 'block');
8)   $('.sidenav').css('display', 'none');
Andrew Lewman new download page layout fr...

Andrew Lewman authored 12 years ago

9) });
10) 
11) /* Uses result of jquery.client to open the relevant section */
12) function OScheck() {
13)   var clientos = $.client.os;
14)   if(clientos == "Linux"){
Andrew Lewman and we have a new download-...

Andrew Lewman authored 12 years ago

15)     $('.easy.linux').css('display', 'block');
Andrew Lewman new download page layout fr...

Andrew Lewman authored 12 years ago

16)   }else if(clientos == "Windows"){
Andrew Lewman and we have a new download-...

Andrew Lewman authored 12 years ago

17)     $('.easy.windows').css('display', 'block');
Andrew Lewman new download page layout fr...

Andrew Lewman authored 12 years ago

18)   }else if(clientos == "Mac"){
Andrew Lewman and we have a new download-...

Andrew Lewman authored 12 years ago

19)     $('.easy.mac').css('display', 'block');
Donncha O'Cearbhaill Display Orbot on Tor downlo...

Donncha O'Cearbhaill authored 8 years ago

20)   }else if(clientos == "Android"){
21)     $('.easy.android').css('display', 'block');
Andrew Lewman and we have a new download-...

Andrew Lewman authored 12 years ago

22)   }else{
23)     $('.easy').css('display', 'block');
Andrew Lewman new download page layout fr...

Andrew Lewman authored 12 years ago

24)   }
25) }
26)   $(function(){
27)   OScheck();
28) });
29) 
30) /* Reset language default - needed in the event of returning to the page via back button */
31) function resetAll() {
32)   var f = document.forms;
33)   var last = f.length - 1;
34)   for (var i = 0; i < last; i++) {
35)     f[i].reset();
36)   }
37) }
Andrew Lewman and we have a new download-...

Andrew Lewman authored 12 years ago

38) 
Arthur Edelstein Bug 22357: Move download la...

Arthur Edelstein authored 6 years ago

39) /* switches package links depending on selection */
40) function updateLang() {
41)   var caller = $( this );
42)   var pkg = caller.attr('id');
43)   var lang = caller.val();
44)   var versions = JSON.parse($("#version-data").text());
Nicolas Vigier Allow having different Tor...

Nicolas Vigier authored 6 years ago

45)   var rootDir = '../dist/torbrowser/' + '/';
Arthur Edelstein Bug 22357: Move download la...

Arthur Edelstein authored 6 years ago

46)   var bundles = {
Nicolas Vigier Allow having different Tor...

Nicolas Vigier authored 6 years ago

47)     'win-tbb' : rootDir + versions.torbrowserbundle + '/torbrowser-install-' + versions.torbrowserbundle + '_' + lang + '.exe',
48)     'osx-tbb' : rootDir + versions.torbrowserbundleosx64 + '/TorBrowser-' + versions.torbrowserbundleosx64 + '-osx64_' + lang +'.dmg',
49)     'osx-tbb64' : rootDir + versions.torbrowserbundleosx64 + '/TorBrowser-' + versions.torbrowserbundleosx64 + '-osx64_' + lang + '.dmg',
50)     'lin-tbb32' : rootDir + versions.torbrowserbundlelinux32 + '/tor-browser-linux32-' + versions.torbrowserbundlelinux32 + '_' + lang + '.tar.xz',
51)     'lin-tbb64' : rootDir + versions.torbrowserbundlelinux64 + '/tor-browser-linux64-' + versions.torbrowserbundlelinux64 + '_' + lang + '.tar.xz'
Arthur Edelstein Bug 22357: Move download la...

Arthur Edelstein authored 6 years ago

52)   };
53) 
54)   $('.'+pkg).attr("href", bundles[pkg]);
55)   $('.'+pkg+'-sig').attr("href", bundles[pkg] + '.asc');
56) }
57) 
58) $(function(){
59)   $('.lang').ready(updateLang);
60)   $('.lang').change(updateLang);
61)   /* Only show language selector if javascript is enabled */
62)   $('.lang').css('display', 'block');
63) });
64) 
Andrew Lewman patch from jmtodaro for eve...

Andrew Lewman authored 12 years ago

65) $(document).ready(function () {
hiromipaw Fix small typo

hiromipaw authored 6 years ago

66)     $('.onload').ready(resetAll);
67) 
Andrew Lewman patch from jmtodaro for eve...

Andrew Lewman authored 12 years ago

68)     $('.jump').click(function(event){
69)       //prevent the default action for the click event
70)       //event.preventDefault();
71) 
72)       //get the full url - like mysitecom/index.htm#home
73)       var full_url = this.href;
74) 
75)       //split the url by # and get the anchor target name - home in mysitecom/index.htm#home
76)       var parts = full_url.split("#");
77)       var trgt = parts[1];
78) 
79)       //get the top offset of the target anchor
80)       var target_offset = $("#"+trgt).offset();
81)       var target_top = target_offset.top;
82) 
83)       //goto that anchor by setting the body scroll top to anchor top
84) //      $('html, body').animate({scrollTop:target_top}, 1000);
85)     });
86) 
hiromipaw Fix src unsafe error

hiromipaw authored 6 years ago

87) 
Andrew Lewman patch from jmtodaro for eve...

Andrew Lewman authored 12 years ago

88)     // Bind an event to window.onhashchange
89)     $(window).bind( 'hashchange', function(e) {
90) 
91)       // Get the hash (fragment) as a string, with any leading # removed.
92)       var url = $.param.fragment();
93) 
94)       // Toggle the '.easy' divs to off
Donncha O'Cearbhaill Display Orbot on Tor downlo...

Donncha O'Cearbhaill authored 8 years ago

95)       if(url == 'windows'|url == 'mac'|url == 'linux'|url == 'android'){
Andrew Lewman patch from jmtodaro for eve...

Andrew Lewman authored 12 years ago

96) 
97) 	  $('.easy').css('display', 'none');
98)       }
hiromipaw Fix src unsafe error

hiromipaw authored 6 years ago

99) 
Andrew Lewman patch from jmtodaro for eve...

Andrew Lewman authored 12 years ago

100)       if(url == 'windows'){
101) 	$('.easy.windows').css('display', 'block');
102)       } else if(url == 'mac'){
103) 	$('.easy.mac').css('display', 'block');
104)       } else if(url == 'linux'){
105) 	$('.easy.linux').css('display', 'block');
Donncha O'Cearbhaill Display Orbot on Tor downlo...

Donncha O'Cearbhaill authored 8 years ago

106)       } else if(url == 'android'){
107)   $('.easy.android').css('display', 'block');
Andrew Lewman patch from jmtodaro for eve...

Andrew Lewman authored 12 years ago

108)       } else {
Andrew Lewman patch to dlpage01 javascript.

Andrew Lewman authored 12 years ago

109) 	  $('.easy').css('display', 'none');
Andrew Lewman patch from jmtodaro for eve...

Andrew Lewman authored 12 years ago

110) 	  $(function(){OScheck();});
111)       }
112)     });
hiromipaw Fix src unsafe error

hiromipaw authored 6 years ago

113)