e72ad6bf1b0537acfea83c8c2d67b0f92725e581
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) 
Andrew Lewman patch from jmtodaro for eve...

Andrew Lewman authored 12 years ago

39) $(document).ready(function () {
40) 
41)     $('.jump').click(function(event){
42)       //prevent the default action for the click event
43)       //event.preventDefault();
44) 
45)       //get the full url - like mysitecom/index.htm#home
46)       var full_url = this.href;
47) 
48)       //split the url by # and get the anchor target name - home in mysitecom/index.htm#home
49)       var parts = full_url.split("#");
50)       var trgt = parts[1];
51) 
52)       //get the top offset of the target anchor
53)       var target_offset = $("#"+trgt).offset();
54)       var target_top = target_offset.top;
55) 
56)       //goto that anchor by setting the body scroll top to anchor top
57) //      $('html, body').animate({scrollTop:target_top}, 1000);
58)     });
59) 
60)       
61)     // Bind an event to window.onhashchange
62)     $(window).bind( 'hashchange', function(e) {
63) 
64)       // Get the hash (fragment) as a string, with any leading # removed.
65)       var url = $.param.fragment();
66) 
67)       // Toggle the '.easy' divs to off
Donncha O'Cearbhaill Display Orbot on Tor downlo...

Donncha O'Cearbhaill authored 8 years ago

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

Andrew Lewman authored 12 years ago

69) 
70) 	  $('.easy').css('display', 'none');
71)       }
72)       
73)       if(url == 'windows'){
74) 	$('.easy.windows').css('display', 'block');
75)       } else if(url == 'mac'){
76) 	$('.easy.mac').css('display', 'block');
77)       } else if(url == 'linux'){
78) 	$('.easy.linux').css('display', 'block');
Donncha O'Cearbhaill Display Orbot on Tor downlo...

Donncha O'Cearbhaill authored 8 years ago

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

Andrew Lewman authored 12 years ago

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

Andrew Lewman authored 12 years ago

82) 	  $('.easy').css('display', 'none');