daa7484af46799a5d7c85452765519d2da44508b
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 */
traumschule WIP

traumschule authored 5 years ago

3)   $(".easy").css('height', '0px');
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) /* Reset language default - needed in the event of returning to the page via back button */
12) function resetAll() {
13)   var f = document.forms;
14)   var last = f.length - 1;
15)   for (var i = 0; i < last; i++) {
16)     f[i].reset();
17)   }
18) }
Andrew Lewman and we have a new download-...

Andrew Lewman authored 12 years ago

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

Arthur Edelstein authored 6 years ago

20) /* switches package links depending on selection */
21) function updateLang() {
22)   var caller = $( this );
23)   var pkg = caller.attr('id');
24)   var lang = caller.val();
25)   var versions = JSON.parse($("#version-data").text());
Nicolas Vigier Allow having different Tor...

Nicolas Vigier authored 6 years ago

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

Arthur Edelstein authored 6 years ago

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

Nicolas Vigier authored 6 years ago

28)     '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

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

Nicolas Vigier authored 6 years ago

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

34)   };
35) 
36)   $('.'+pkg).attr("href", bundles[pkg]);
37)   $('.'+pkg+'-sig').attr("href", bundles[pkg] + '.asc');
38) }
39) 
40) $(function(){
41)   $('.lang').ready(updateLang);
42)   $('.lang').change(updateLang);
43)   /* Only show language selector if javascript is enabled */
44)   $('.lang').css('display', 'block');
45) });
46) 
Andrew Lewman patch from jmtodaro for eve...

Andrew Lewman authored 12 years ago

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

hiromipaw authored 6 years ago

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

Andrew Lewman authored 12 years ago

50)     $('.jump').click(function(event){
51)       //prevent the default action for the click event
52)       //event.preventDefault();
53) 
54)       //get the full url - like mysitecom/index.htm#home
55)       var full_url = this.href;
56) 
57)       //split the url by # and get the anchor target name - home in mysitecom/index.htm#home
58)       var parts = full_url.split("#");
59)       var trgt = parts[1];
60) 
61)       //get the top offset of the target anchor
62)       var target_offset = $("#"+trgt).offset();
63)       var target_top = target_offset.top;
64) 
65)       //goto that anchor by setting the body scroll top to anchor top
traumschule WIP

traumschule authored 5 years ago

66)       $('html, body').animate({scrollTop:target_top}, 1000);
Andrew Lewman patch from jmtodaro for eve...

Andrew Lewman authored 12 years ago

67)     });
hiromipaw Fix src unsafe error

hiromipaw authored 6 years ago

68)