1var $ = jQuery.noConflict(); 2 3$(window).load(function(){ 4 if($('body').is('.page-template-page-downloads')){ 5 // Get CSS ready 6 $('div.halfbanner').css('padding-bottom','0'); 7 $('div.halfbanner img.main').css('max-width','100%'); 8 9 10 // Go to the correct section and tab 11 var showTab = function() { 12 var tabId = window.location.hash; 13 var linuxId = '#' + $('#desktop a:eq(4)').attr('id'); 14 var windowsId = '#' + $('#desktop a:eq(0)').attr('id'); 15 var macosId = '#' + $('#desktop a:eq(3)').attr('id'); 16 var androidId = '#' + $('#mobile a:eq(0)').attr('id'); 17 var iosId = '#' + $('#mobile a:eq(1)').attr('id'); 18 if (tabId == '#linux') { $('html, body').animate({scrollTop: $('#desktop').offset().top}, 10); $(linuxId).tab('show'); } 19 if (tabId == '#windows') { $('html, body').animate({scrollTop: $('#desktop').offset().top}, 10); $(windowsId).tab('show'); } 20 if (tabId == '#macos') { $('html, body').animate({scrollTop: $('#desktop').offset().top}, 10); $(macosId).tab('show'); } 21 if (tabId == '#android') { $('html, body').animate({scrollTop: $('#mobile').offset().top}, 10); $(androidId).tab('show'); } 22 if (tabId == '#ios') { $('html, body').animate({scrollTop: $('#mobile').offset().top}, 10); $(iosId).tab('show'); } 23 if (tabId == '#desktop' && /windows/.test(useros) ) { $(windowsId).tab('show'); } 24 if (tabId == '#desktop' && /os x/.test(useros) ) { $(macosId).tab('show'); } 25 if (tabId == '#desktop' && /linux/.test(useros) ) { $(linuxId).tab('show'); } 26 }; 27 28 var showButton = function(text, href, image) { 29 var button = $('<a class="btn btn-ghost white" href="' + href + '">
29' + text + '</a>').hide(); 30 $('div.caption').append(button); 31 if (image == 'desktop') 32 { $('#dlimg2').show(); } 33 else 34 { $('#dlimg1').show(); } 35 button.slideDown('fast'); 36 } 37 38 var useros = platform.os.family.toLowerCase(); 39 switch (true) { 40 case /windows/.test(useros): showButton(download_texts.download_windows, '#windows', 'desktop'); break; 41 case /os x/.test(useros): showButton(download_texts.download_macos, '#macos', 'desktop'); break; 42 case /android/.test(useros): showButton(download_texts.download_android, '#android', 'mobile'); break; 43 case /ios/.test(useros): showButton(download_texts.download_ios, '#ios', 'mobile'); break; 44 case /linux/.test(useros): showButton(download_texts.download_linux, '#linux', 'desktop'); break; 45 case /ubuntu/.test(useros): showButton(download_texts.download_linux, '#linux', 'desktop'); break; 46 case /debian/.test(useros): showButton(download_texts.download_linux, '#linux', 'desktop'); break; 47 case /fedora/.test(useros): showButton(download_texts.download_linux, '#linux', 'desktop'); break; 48 case /red hat/.test(useros): showButton(download_texts.download_linux, '#linux', 'desktop'); break; 49 case /suse/.test(useros): showButton(download_texts.download_linux, '#linux', 'desktop'); break; 50 default: break; 51 } 52 53 if (window.location.hash) { 54 showTab(); 55 } 56 57 // If hash changes, show correct tab 58 $(window).on('hashchange', function() { 59 showTab(); 60 }) 61 62 $('div.caption > a').click(function() { 63 showTab(); 64 }) 65 } 66})
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.