8c66a002edc4ae89d78b217d1b34399ac591a511
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"){
hiromipaw Remove openbsd from install...

hiromipaw authored 6 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',
Georg Koppen Add Win 64bit bundles to do...

Georg Koppen authored 5 years ago

48)     'win-tbb64' : rootDir + versions.torbrowserbundle + '/torbrowser-install-win64-' + versions.torbrowserbundle + '_' + lang + '.exe',
Nicolas Vigier Allow having different Tor...

Nicolas Vigier authored 6 years ago

49)     'osx-tbb' : rootDir + versions.torbrowserbundleosx64 + '/TorBrowser-' + versions.torbrowserbundleosx64 + '-osx64_' + lang +'.dmg',
50)     'osx-tbb64' : rootDir + versions.torbrowserbundleosx64 + '/TorBrowser-' + versions.torbrowserbundleosx64 + '-osx64_' + lang + '.dmg',
51)     'lin-tbb32' : rootDir + versions.torbrowserbundlelinux32 + '/tor-browser-linux32-' + versions.torbrowserbundlelinux32 + '_' + lang + '.tar.xz',
52)     '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

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

Andrew Lewman authored 12 years ago

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

hiromipaw authored 6 years ago

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

Andrew Lewman authored 12 years ago

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

hiromipaw authored 6 years ago

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

Andrew Lewman authored 12 years ago

89)     // Bind an event to window.onhashchange
90)     $(window).bind( 'hashchange', function(e) {
91) 
92)       // Get the hash (fragment) as a string, with any leading # removed.
93)       var url = $.param.fragment();
94) 
95)       // Toggle the '.easy' divs to off
hiromipaw Remove openbsd from install...

hiromipaw authored 6 years ago

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

Andrew Lewman authored 12 years ago

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

hiromipaw authored 6 years ago

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

Andrew Lewman authored 12 years ago

101)       if(url == 'windows'){
102) 	$('.easy.windows').css('display', 'block');
103)       } else if(url == 'mac'){
104) 	$('.easy.mac').css('display', 'block');
105)       } else if(url == 'linux'){
hiromipaw Remove openbsd from install...

hiromipaw authored 6 years ago

106) 	  $('.easy.linux').css('display', 'block');
107)       } else if(url == 'openbsd'){
108) 	$('.easy.bsd').css('display', 'block');
Donncha O'Cearbhaill Display Orbot on Tor downlo...

Donncha O'Cearbhaill authored 8 years ago

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

Andrew Lewman authored 12 years ago

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

Andrew Lewman authored 12 years ago

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

Andrew Lewman authored 12 years ago

113) 	  $(function(){OScheck();});
114)       }
115)     });
hiromipaw Fix src unsafe error

hiromipaw authored 6 years ago

116)