1(function($) { 2 3 $(document).ready(function(){ 4 $(window).on('resize', resizeLoad); 5 resizeLoad(); 6 }); 7 8 function resizeLoad() { 9 if($(window).width() > 1365.98){ 10 11 let MutationObserver = window.MutationObserver || window.WebKitMutationObserver; 12 13 14 let observer = new MutationObserver(function(mutations, observer) { 15 // fired when a mutation occurs 16 let heightTopBanner = $('#adnz_wideboard_1').height(); 17 changeHeightTopbanner(heightTopBanner); 18 }); 19 20 let adsTopBanner = document.getElementById('adnz_wideboard_1'); 21 if(adsTopBanner){ 22 observer.observe(adsTopBanner, { 23 childList: true, 24 subtree: true, 25 attributes: true, 26 }); 27 } 28 29 30 // observer.observe(document.getElementById('adnz_halfpage_2'), { 31 // subtree: true, 32 // childList: true, 33 // }); 34 35 function changeHeightTopbanner(heightTopBanner) { 36 let mtRightbanner = heightTopBanner + 215; 37 if(heightTopBanner !== 0){ 38 $('#adnz_halfpage_1').css({ 39 top: mtRightbanner + 'px', 40 }); 41 } 42 let windowHeight = $(window).height(); 43 $(window).scroll(function () { 44 45 let scrollTop = $(window).scrollTop(); 46 $('#adnz_halfpage_1').css('top', mtRightbanner + 'px'); 47 if(windowHeight > 951){ 48 if (scrollTop < heightTopBanner) { 49 50 $('#adnz_halfpage_1').css({ 51 top: mtRightbanner + 'px', 52 }); 53 54 55 } else { 56 $('#adnz_halfpage_1').css({ 57 top: '215px', 58 }); 59 60 } 61 }else{ 62 if(scrollTop + windowHeight > $(document).height() - 100){ 63 $('#adnz_halfpage_1').css({ 64 top: 'auto', 65 bottom: '200px' 66 }); 67 }else if (scrollTop < heightTopBanner) { 68 $('#adnz_halfpage_1').css({ 69 top: mtRightbanner + 'px', 70 }); 71 } else { 72 $('#adnz_halfpage_1').css({ 73 top: '215px', 74 }); 75 } 76 } 77 78 }); 79 setTimeout(function(){ 80 $('#adnz_halfpage_1').css('visibility', 'visible'); 81 }, 2000); 82 } 83 let heightTopBannerReady = 0; 84 if(adsTopBanner){ 85 heightTopBannerReady = $('#adnz_wideboard_1').height(); 86 } 87 changeHeightTopbanner(heightTopBannerReady); 88 } 89 } 90})( 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.