1function getParameterByName(name, url) { 2 if (!url) url = window.location.href; 3 name = name.replace(/[\[\]]/g, "\\$&"); 4 var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), 5 results = regex.exec(url); 6 if (!results) return null; 7 if (!results[2]) return ''; 8 return decodeURIComponent(results[2].replace(/\+/g, " ")); 9} 10 11function calculateHeaderHeight() { 12 headerHeight = jQuery("#wpadminbar").outerHeight() + 10; 13} 14 15function scrollToTarget($target, duration, padding, callback) { 16 var destination, distance; 17 duration = duration || 1000; 18 padding = padding || 0; 19 if ($target.length) { 20 calculateHeaderHeight(); 21 destination = $target.offset().top - headerHeight - padding; 22 distance = destination - jQuery(document).scrollTop(); 23 jQuery('html,body').animate({ 24 scrollTop: destination 25 }, duration, function() { 26 calculateHeaderHeight(); 27 var newDest = $target.offset().top - headerHeight - padding, 28 newDist = newDest - destination, 29 newDuration = Math.abs(newDist / distance) * duration; 30 if (Math.abs(newDist) >= 1) { 31 jQuery('html,body').animate({ 32 scrollTop: newDest 33 }, newDuration, function() { 34 if (callback) { 35 callback(); 36 } 37 }); 38 } else { 39 if (callback) { 40 callback(); 41 } 42 } 43 }); 44 return false; 45 } 46}; 47 48jQuery('a.smooth, .smooth a').on('click', function() { 49 jQuery(this).blur(); 50 var target = jQuery(this.hash); 51 target = target.length ? target : jQuery('a[name=' + this.hash.slice(1) +']'); 52 return scrollToTarget(target); 53}); 54 55jQuery(function($) { 56 function scaleHeroes() { 57 var width = $(window).width(); 58 $('.hero[data-sizes]').each(function() { 59 var old = cur = parseInt($(this).data('current-size'), 10), w, sizes = $(this).data('sizes'); 60 for (w in sizes) { 61 w = parseInt(w, 10); 62 if (w > cur && cur < width + 100) { 63 cur = w; 64 } 65 } 66 if (cur !== old) { 67 $(this).data('current-size', cur); 68 $(this).css('background-image', "url('"+sizes[cur]+"')"); 69 } 70 }); 71 } 72 scaleHeroes(); 73 $(window).on('resize', scaleHeroes); 74}); 75 76jQuery(function($) { 77 // Mobile toggle navigation 78 $('#masthead .toggle').on('click',function() { 79 $('#masthead').toggleClass('expanded'); 80 $('#masthead .navigation').addClass('animated fadeIn'); 81 }); 82 83 $('.menu-container .menu-toggle').on('click', function() { 84 if ($('.menu-container.toggled').length) { 85 $('body').css('overflow', 'hidden').css('position', 'fixed').css('width', '100%'); 86 } else { 87 $('body').css('overflow', 'auto').css('position', 'static').css('width', 'inherit'); 88 } 89 }); 90 91 $('.menu-item-has-children').append(' <i class="fa fa-angle-down expando"></i>'); 92 93 $('li.menu-item .expando').on('click', function(e) { 94 e.preventDefault(); 95 e.stopPropagation(); 96 var t = $(this).parent(); 97 if (t.hasClass('expanded')) { 98 t.removeClass('expanded'); 99 t.find('>.expando.fa').removeClass('fa-angle-up').addClass('fa-angle-down'); 100 } else { 101 t.addClass('expanded'); 102 t.find('>.expando.fa').removeClass('fa-angle-down').addClass('fa-angle-up'); 103 } 104 return false; 105 }); 106 /* 107 $('header .search').on('click', function() { 108 $(this).blur(); 109 if ($('#search').hasClass('toggled')) { 110 $('#search').removeClass('toggled'); 111 } else { 112 if (navigator.userAgent.match(/iPad/i) != null) { 113 scrollToTarget($('body'), 200, 0, function() { 114 $('#search').addClass('toggled'); 115 }); 116 } else { 117 $('#search').addClass('toggled'); 118 $('#search input').focus(); 119 } 120 } 121 return false; 122 }); 123 */ 124 125 $('.columns-accordion').on('click', '.show-all', function() { 126 var $this = $(this); 127 window.accordionScrolling = false; 128 $this.parents('.columns-accordion').find('.acc-open:visible').click(); 129 $this.removeClass('show-all').addClass('hide-all').text('Luk alle'); 130 $('html,body').animate({ 131 scrollTop: $this.parents('.columns-accordion').find('.acc-header').first().offset().top - $("#wpadminbar").outerHeight() - 100 132 }, 500); 133 window.accordionScrolling = true; 134 }); 135 $('.columns-accordion').on('click', '.hide-all', function() { 136 $(this).parents('.columns-accordion').find('.acc-close:visible').click(); 137 $(this).removeClass('hide-all').addClass('show-all').text('Se alle'); 138 }); 139 140 $('.vidensbank select, .aktiviteter select').on('change', function() { 141 var url = window.location.href, 142 val = $(this).val(), 143 name = $(this).attr('name'); 144 if (window.location.search.length === 0) { 145 url = url + '?'+name+'='+val; 146 } else if (window.location.search.indexOf(name) > 0) { 147 url = url.replace(new RegExp(name + '=[^&]*'), name + '='+val); 148 } else { 149 url = url + '&' + name + '='+val; 150 } 151 window.location.href = url; 152 }); 153 154 svg4everybody(); 155 156 $('.tab-panel').tabPanel($); 157});
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.