1/** 2 * HGR Essentials: Front End 3 */ 4( function( $ ) { 5 "use strict"; 6 7 // lock scroll position, but retain settings for later 8 var scrollPosition = [ 9 self.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft, 10 self.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop 11 ]; 12 13 14 $('.fssearch a').click(function(event) { 15 event.preventDefault(); 16 17 var html = $('html'); // it would make more sense to apply this to body, but IE7 won't have that 18 html.data('scroll-position', scrollPosition); 19 html.data('previous-overflow', html.css('overflow')); 20 html.css('overflow', 'hidden'); 21 22 $('#fssearch_container').fadeIn('fast').removeClass('hidden').addClass('is-visible'); 23 $('.fssearch_input').focus(); 24 25 return false; 26 }); 27 28 //close the testimonials modal page 29 $('#fssearch_container .close-btn').click(function(event) { 30 event.preventDefault(); 31 $('#fssearch_container').fadeOut('fast').removeClass('is-visible').addClass('hidden'); 32 $('.fssearch_input').attr('value',''); 33 // un-lock scroll position 34 var html = $('html'); 35 var scrollPosition = html.data('scroll-position'); 36 html.css('overflow', html.data('previous-overflow')); 37 }); 38 39 $(document).keyup(function(event){ 40 //check if user has pressed 'Esc' 41 if(event.which=='27'){ 42 // un-lock scroll position 43 var html = $('html'); 44 var scrollPosition = html.data('scroll-position'); 45 html.css('overflow', html.data('previous-overflow')); 46 $('#fssearch_container').fadeOut('fast').removeClass('is-visible').addClass('hidden'); 47 $('.fssearch_input').attr('value',''); 48 } 49 }); 50 51} )( jQuery );
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.