1 2function setRightToMenuBlock (cont) { 3 let wrapWidth = $('.maincolHeaderContainerMenu').width(); 4 if (typeof cont.position() !== 'undefined') { 5 if (cont.position().left+cont.width() > wrapWidth) { 6 cont.css('right', '-20px'); 7 } 8 } 9} 10 11$(document).ready(function () { 12 setTimeout(function () { 13 setRightToMenuBlock( 14 $('.maincolHeaderContainerMenu__list__item-parent:hover .maincolHeaderContainerMenu__list__item__sublist') 15 ); 16 }, 1000) 17 18 $('.maincolHeaderContainerMenu__list__item-parent').on('mouseenter', function () { 19 setRightToMenuBlock( 20 $(this).find('.maincolHeaderContainerMenu__list__item__sublist') 21 ); 22 }); 23}); 24$(window).on('load', function () { 25 setRightToMenuBlock( 26 $('.maincolHeaderContainerMenu__list__item-parent:hover .maincolHeaderContainerMenu__list__item__sublist') 27 ); 28}); 29 30$(document).ready(function () { 31 $('.maincolHeaderContainerMenu__list__item__link-changeimg').on('mouseenter', function () { 32 var $parentItem = $(this).closest('.maincolHeaderContainerMenu__list__item-parent'); 33 34 $parentItem.find('.maincolHeaderContainerMenu__list__item__sublist__img').each(function () { 35 var imgUrl = $(this).css('background-image').replace(/url\((['"])?(.*?)\1\)/gi, '$2').split(',')[0]; 36 37 if (!$(this).parent('.maincolHeaderContainerMenu__list__item__sublist__img-block').find('link[href="'+imgUrl+'"]').length) { 38 var preloadLink = document.createElement('link'); 39 preloadLink.href = imgUrl; 40 preloadLink.rel = 'preload'; 41 preloadLink.as = 'image'; 42 43 $(this).parent('.maincolHeaderContainerMenu__list__item__sublist__img-block').append(preloadLink); 44 } 45 }); 46 }); 47});
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.