1document.addEventListener("DOMContentLoaded", () => { 2 document.querySelectorAll('a[href^="https://kfzjobs."]').forEach(link => { 3 link.setAttribute("target", "_blank"); 4 link.setAttribute("rel", "noopener noreferrer"); 5 }); 6}); 7 8 9(function($, window) { 10 var adjustAnchor = function() { 11 12 var $anchor = $(':target'), fixedElementHeight = 300; 13 14 if ($anchor.length > 0) { 15 $('html, body') 16 .stop() 17 .animate({ 18 scrollTop: $anchor.offset().top - fixedElementHeight 19 }, 200); 20 } 21 }; 22 23 $(window).on('hashchange load', function() { 24 adjustAnchor(); 25 }); 26 27})(jQuery, window); 28 29(function($) { 30 31 "use strict"; 32 33 //clickable header "logo" 34 const header_section = document.getElementById('header-section'); 35 36 if(header_section != null){ 37 header_section.addEventListener('click', (e) => { 38 const clientRect = e.currentTarget.getBoundingClientRect(); 39 if (e.pageX < 300) { 40 console.log('Clicked logo space'); 41 const logo_wrappers = document.querySelectorAll('.logo-wrapper'); 42 logo_wrappers.forEach((logo_wrapper) => { 43 console.log('logo wrapper found: '+logo_wrapper.getAttribute('href')); 44 if(logo_wrapper.getAttribute('href') != null) window.location = logo_wrapper.getAttribute('href'); 45 return; 46 }); 47 } else { 48 console.log('Clicked right rest'); 49 } 50 }); 51 } 52 53 function checkStickyButtons(){ 54 $('.tsmd-fixed-buttons.fixed-top').each(function(){ 55 if(window.scrollY > 550) { 56 const $header = $(document).find('.bde-header-builder:first-child'); 57 58 const margin_top = parseInt($header.css("marginTop").replace('px', '')); 59 const needed_height = $header.height() + margin_top; 60 61 $(this).css('margin-top',needed_height); 62 63 $(this).fadeIn(); 64 }else{ 65 $(this).fadeOut(); 66 } 67 68 }) 69 } 70 71 //first check 72 checkStickyButtons(); 73 checkOffsetShortInfo(); 74 75 var hashAlreadyShown = false; 76 77 //show up nav-tab content on VDP 78 if ($('#vdpTab.nav-tabs').length > 0) { // if #vdpTab.nav-tabs exists 79 var $tabs = $('#vdpTab.nav-tabs'); 80 var hashtag = window.location.hash; 81 console.log(hashtag); 82 if (hashtag!='') { 83 $tabs.find('li > a.nav-link').removeClass('active'); 84 $tabs.find('li a[data-bs-target="'+hashtag+'"]').addClass('active'); 85 $('#vdpTabContent > div').removeClass('show active'); 86 $(hashtag).addClass('show active'); 87 hashAlreadyShown = true; 88 89 /*if(window.innerWidth < 768){ 90 $('html, body').stop().animate({ 91 scrollTop:$(hashtag).offset().top - 400 92 },'fast'); 93 }*/ 94 } 95 } 96 97 //tab bar links for offers page 98 $('.tab_buttons').find('a.button:first').addClass('active'); 99 var $tab_btns = $('.tab_buttons').find('a.button:first'); 100 var $tab_btns_href = $('.tab_buttons').find('a.button:first').map( function() { 101 return $(this).attr('href'); 102 }).get(); 103 104 function showTabById(id){ 105 console.log(id); 106 if(id == '' || id == undefined) return; 107 108 if(id === '#all'){ 109 $('.tab_section, .column_offer, .photo_section').fadeIn(); 110 return; 111 } 112 $('.tab_section, .column_offer, .photo_section').hide(); 113 $(id).fadeIn(); 114 115 if(window.innerWidth < 768){ 116 if(id != '#ls_used' && id != '#ls_new'){ 117 $('html, body').animate({ 118 scrollTop:$(id).offset().top - 100 119 },'slow'); 120 } 121 } 122 } 123 124 var hash = window.top.location.hash.substr(1); 125 if(!hashAlreadyShown){ 126 if(hash !== '' && hash !== 'anfrage' && hash !== 'team'){ 127 var $tab_btn = $tab_btns.filter(function(index){ 128 return $(this).attr('href') == '#'+hash; 129 }); 130 $tab_btns.removeClass('active'); 131 $tab_btn.addClass('active'); 132 showTabById('#'+hash); 133 }else{ 134 showTabById($tab_btns_href[0]); 135 } 136 } 137 138 $('form.tsmd-filter-form').each(function(){ 139 function livecountinput($form) { 140 let $selects = $form.find('select'); 141 142 let length = $selects.filter(function(index){ 143 return ($(this).val() !== '_ALL' && parseInt($(this).val()) !== 0) 144 }).length; 145
146 console.log('live input: '+length); 147 148 $form.closest('.tsmd-filter').find('.livecount').text('('+length+')'); 149 //let count = document.getElementById('count'); 150 //count.innerHTML = length 151 }; 152 livecountinput($(this)); 153 154 $(this).find('select').on('change.tsmd',function(){ 155 livecountinput($(this).closest('form')); 156 }); 157 }); 158 159 160 $('.tab_buttons').find('a.button').on('click.gfxe.loadtab',function(e){ 161 e.preventDefault(); 162 $tab_btns.removeClass('active'); 163 $(this).addClass('active'); 164 165 showTabById($(this).attr('href')); 166 }); 167 168 function checkOffset() { 169 var $stickyElement = $('.offerside.ts-sticky').first(); 170 //console.log($stickyElement); 171 var $stickyParent = $stickyElement.parent(); 172 //console.log($stickyParent.offset().top); 173 174 if ($stickyElement.length){ 175 if(window.scrollY > 400) { 176 $stickyElement.addClass('scrolled-over'); 177 }else{ 178 $stickyElement.removeClass('scrolled-over'); 179 } 180 if ($stickyElement.offset().top + $stickyElement.height() >= $('#breakdance-footer').offset().top - 10) { 181 $stickyElement.removeClass('fixed'); 182 $stickyElement.addClass('absolute'); 183 console.log('content height: '+parseInt($('#Content').height())); 184 console.log('footer height: '+parseInt($('#mfn-footer-template').height())); 185 console.log('parent top: '+$stickyParent.offset().top); 186 $stickyElement.css('top',parseInt($('#Content').height()) - $stickyParent.offset().top - $stickyElement.height() ); 187 } 188 if ($(document).scrollTop() + window.innerHeight < $('#breakdance-footer').offset().top + $stickyElement.height() + 60) { 189 $stickyElement.removeClass('absolute'); 190 $stickyElement.addClass('fixed'); // restore when you scroll up 191 $stickyElement.css('top','unset'); 192 $stickyElement.css('bottom','unset'); 193 } 194 } 195 } 196 197 function checkOffsetShortInfo() { 198 var $stickyElement = $('.short-info.ts-sticky').first(); 199 var $stickyParent = $stickyElement.parent(); 200 201 /*console.log('scroll Y: ' + window.scrollY); 202 console.log('content height: '+parseInt($('#Content').height())); 203 console.log('request height: '+parseInt($('#tsmd-request-detail').height())); 204 console.log('footer height: '+parseInt($('#mfn-footer-template').height())); 205 console.log('header height: '+parseInt($('#mfn-header-template').height())); 206 207 */ 208 209 /* 210 console.log('real scroll: '+current_real_scroll_position); 211 console.log('bottom space: '+bottom_space_position); 212 */ 213 214 if ($stickyElement.length){ 215 var current_real_scroll_position = window.scrollY ;//+ $stickyParent.offset().top + (parseInt($stickyElement.outerHeight()) ); 216 var bottom_space_position = parseInt($('#breakdance-main').outerHeight()) - $stickyParent.offset().top - parseInt($('#anfrage').outerHeight()) - parseInt($stickyElement.outerHeight()); 217 218 //console.log('window scroll: '+window.scrollY); 219 //console.log('sticky parent top: '+$stickyParent.offset().top); 220 //console.log('sticky element height: '+parseInt($stickyElement.outerHeight())); 221 //console.log(parseInt($stickyElement.outerHeight()) + $stickyParent.offset().top); 222 //console.log('current_real_scroll_position: '+current_real_scroll_position); 223 //console.log('bottom_space_position: '+bottom_space_position); 224 225 if(window.scrollY > 600) { 226 $stickyElement.addClass('scrolled-over'); 227 }else{ 228 $stickyElement.removeClass('scrolled-over'); 229 } 230 231 var top_value = parseInt($('#breakdance-main').outerHeight()) - parseInt($('#anfrage').outerHeight()) - $stickyParent.offset().top - parseInt($stickyElement.outerHeight()); 232 233 if (current_real_scroll_position >= bottom_space_position) { 234 $stickyElement.removeClass('fixed'); 235 $stickyElement.addClass('absolute'); 236 $stickyElement.css('top', top_value); 237 } 238 if (current_real_scroll_position < bottom_space_position) { 239 $stickyElement.removeClass('absolute'); 240 $stickyElement.addClass('fixed'); // restore when you scroll up 241 $stickyElement.css('top','unset'); 242 $stickyElement.css('bottom','unset'); 243 } 244 } 245 } 246 247 $('.used-car-link').on('click.gfxe.firstlink',function(){ 248 window.location.href = $(this).find('a:first-child').attr('href'); 249 }) 250 251 $(document).scroll(function() { 252 checkOffset(); 253 checkOffsetShortInfo(); 254 checkStickyButtons(); 255 }); 256 257})(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.