1let searchBar = (function () { 2 const $window = $(window); 3 const $engine = $('#engine'); 4 const $search_bar = $('#search_bar'); 5 const $empty_space = $('#empty_space'); 6 7 let currentTop = $window.scrollTop(); 8 let currentMode = 'top'; 9 let scrollingToDeletedJob = false; 10 11 function switchToTopMode() { 12 currentMode = 'top'; 13 $engine.hide(); 14 //$engine.slideToggle(); 15 $search_bar.removeClass("search-bar--relative"); 16 $search_bar.addClass("search-bar--fixed"); 17 $empty_space.height($search_bar.outerHeight()); 18 } 19 20 function switchToNormalMode() { 21 if (currentMode === 'normal') return; 22 23 // simulate scroll to get the 24 if (window.scrollFlag == undefined) { 25 $('html, body').animate({ scrollTop: 1 }, 0.01); 26 $('html, body').animate({ scrollTop: 0 }, 0.01); 27 28 window.scrollFlag = 1; 29 } 30 31 currentMode = 'normal'; 32 //$engine.show(); 33 $engine.slideToggle("fast", function () { 34 $("#divBannerMigdalLeft").css({ top: 0 }); 35 $("#divBannerMigdalLeft").scrollFollow({ offset: 100 }); 36 }); 37 $search_bar.removeClass("search-bar--fixed"); 38 $search_bar.addClass("search-bar--relative"); 39 $empty_space.height(0); 40 $window.scrollTop(0); 41 } 42 43 function displayDeletedJobs(jobsDistenceFromTop) { 44 scrollingToDeletedJob = true; 45 $window.scrollTop(jobsDistenceFromTop); 46 } 47 48 function switchBetweenNormalAndTopMode() { 49 let newTop = $(this).scrollTop(); 50 51 if (newTop > currentTop) { 52 $('.search-engine-results').css({ 'top': '0px', 'z-index': '150'}); 53 } 54 else { 55 $('.search-engine-results').css({ 'top': '72px', 'z-index': '50' }); 56 } 57 58 if (window.scrollY > 0) { 59 $('#headerMask').css({ 'display': 'block' }); 60 } else { 61 $('#headerMask').css({ 'display': 'none' }); 62 } 63 } 64 65 switchToTopMode(); 66 67 $window.bind('scroll', switchBetweenNormalAndTopMode); 68 69 return { 70 switchToNormalMode: function () { switchToNormalMode.apply({}, arguments); }, 71 displayDeletedJobs: function () { displayDeletedJobs.apply({}, arguments); } 72 } 73})();
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.