1/** 2 * Custom hamburger menu for Cassiopeia sidebar 3 */ 4document.addEventListener('DOMContentLoaded', function() { 5 const sidebar = document.querySelector('.container-sidebar-left'); 6 7 if (!sidebar) return; // No sidebar, no hamburger needed 8 9 // Find the existing server-rendered hamburger button (from index.php) 10 const hamburger = document.querySelector('.navbar-toggler'); 11 12 if (!hamburger) return; // No button found, nothing to do 13 14 // Toggle sidebar on click 15 hamburger.addEventListener('click', function() { 16 sidebar.classList.toggle('show'); 17 hamburger.classList.toggle('active'); 18 hamburger.setAttribute('aria-expanded', 19 hamburger.classList.contains('active') ? 'true' : 'false'); 20 document.body.classList.toggle('sidebar-open'); 21 }); 22 23 // Close sidebar when clicking outside 24 document.addEventListener('click', function(e) { 25 if (sidebar.classList.contains('show') && 26 !sidebar.contains(e.target) && 27 !hamburger.contains(e.target)) { 28 sidebar.classList.remove('show'); 29 hamburger.classList.remove('active'); 30 hamburger.setAttribute('aria-expanded', 'false'); 31 document.body.classList.remove('sidebar-open'); 32 } 33 }); 34 35 // Keep nav pills hidden on all screen sizes 36 function handleNavResponsive() { 37 const navPills = document.querySelector('.container-nav .nav-pills'); 38 if (!navPills) return; 39 navPills.style.setProperty('display', 'none', 'important'); 40 } 41 42 // Run on load and resize 43 handleNavResponsive(); 44 window.addEventListener('resize', handleNavResponsive); 45}); 46 47document.addEventListener('DOMContentLoaded', () => { 48 49 document.querySelectorAll('.collapsible').forEach(button => { 50 51 button.addEventListener('click', () => { 52 53 button.classList.toggle('clicked'); 54 55 const content = button.nextElementSibling; 56 57 content.style.maxHeight = 58 content.style.maxHeight 59 ? null 60 : `${content.scrollHeight}px`; 61 62 }); 63 64 }); 65 66}); 67 68//SVG map 69(function($) 70 { 71 $(document).ready(function() { 72 $("path").hover(function(e) { 73 $('#info-box').css('display','block'); 74 $('#info-box').html($(this).data('info')); 75 }); 76 77 $("path").mouseleave(function(e) { 78 $('#info-box').css('display','none'); 79 80 }); 81 }); 82 83 $(window).on("load resize", function() { 84 var ios = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; 85 86 if(ios || $( window ).width() < 768) { 87 $(document).mousemove(function() { 88 $('#info-box').css('position','relative'); 89 $('#info-box').css('background-color', '#fff'); 90 $('#info-box').css('color', '#0083cb'); 91 92 }) 93 } 94 else { 95 $(document).mousemove(function(e) { 96 $('#info-box').css('top',e.pageY-$('#info-box').height()-30); 97 $('#info-box').css('left',e.pageX-($('#info-box').width())/2); 98 $('#info-box').css('position', 'absolute'); 99 $('#info-box').css('max-width', '280px'); 100 $('#info-box').css('color', '#fff'); 101 $('#info-box').css('background-color', '#0083cb'); 102 $('#info-box').css('border-radius', '5px'); 103 }).mouseover(); 104 } 105 106 107}) 108})(jQuery); 109 110//SVG container height fix 111(function($) 112 { 113 $(document).ready(function() { 114 $(window).on('resize', function() { 115 var svgContainer = $('#svg-container'); 116 var width = svgContainer.width(); 117 118 svgContainer.css('height', width*0.5223958333333333); 119 }) 120 121 }) 122} 123)(jQuery); 124
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.