1jQuery(document).ready(function() { 2 3 4 5 // iterate through all elements with the nxs-advertentie class 6 jQuery('.nxs-advertentie').each(function() { 7 // collect the info needed to place the advertisement 8 var id = jQuery(this).attr('id'); 9 var type = jQuery(this).attr('data-advertentie-type'); 10 var zoneid = jQuery(this).attr('data-advertentie-zoneid'); 11 var zoneid_man = jQuery(this).attr('data-advertentie-zoneid-man'); 12 var ins = jQuery(this).attr('data-advertentie-ins'); 13 var url = jQuery(this).attr('data-advertentie-url'); 14 var callback = jQuery(this).attr('data-advertentie-callback'); 15 var show = false; 16 var windowWidth = jQuery(window).width(); 17 // determine wether it is needed to show the banner 18 if (type == 'nxs-advertentie-mainsponsor') { 19 var bannerhtml = '<div class="slc-mainsponsor right-top fade-in">' + $('.slc-mainsponsor').html() + '</div>'; 20 if ( windowWidth > 767 && windowWidth <= 1024) { 21 $('.slc-mainsponsor').remove(); 22 $('#nxs-content').prepend(bannerhtml); 23 show = true; 24 } 25 else if( windowWidth > 1024 ) { 26 if (!$("body").hasClass("logged-in")) { 27 $('.slc-mainsponsor').remove(); 28 if ($('#nxs-header .carrousel-custom').length > 0) { 29 //if ($("#nxs-header .carrousel-custom div:nth-child(2)").attr('style').indexOf('height') !== -1) { 30 $("#nxs-header .carrousel-custom").closest(".nxs-row ").addClass("carrousel-shrink"); 31 $('#nxs-header .carrousel-shrink').prepend(bannerhtml); 32 show = true; 33 } 34 else { 35 $('#nxs-content').prepend(bannerhtml); 36 show = true; 37 } 38 } 39 } 40 } 41 else if (type == 'nxs-advertentie-billboard-top') { 42 if (windowWidth >= 1025) { show = true; } 43 } 44 else if (type == 'nxs-advertentie-billboard-bottom') { 45 show = false; 46 } 47 else if (type == 'nxs-advertentie-mobile-rectangle') { 48 if (windowWidth <= 767) { show = true; } 49 } 50 else if (type == 'nxs-advertentie-skyscraper-fullwidth') { 51 if (windowWidth >= 1780) { show = true; } 52 } 53 else if (type == 'nxs-advertentie-fixed-sidebar') { 54 // if (windowWidth > 1024 && jQuery("#" + id).width() >= 336) { show = true; } 55 if (windowWidth >= 1200 && jQuery("#" + id).closest(".nxs-advertentie-fixed-sidebar").width() >= 336) { show = true; } 56 else { jQuery("#" + id).closest(".slc-halfpage").removeClass("slc-halfpage");} 57 } 58 else if(type == 'nxs-advertentie-fixed-sidebar-mobile') { 59 if( windowWidth <= 767 ) { show = true; } 60 } 61 else if (type == 'nxs-advertentie-widget') { 62 if (windowWidth >= 1200 && jQuery("#" + id).closest(".nxs-widget").width() >= 336) { show = true; } 63 else { jQuery("#" + id).closest(".slc-halfpage").removeClass("slc-halfpage"); } 64 } 65 else if(type == 'nxs-advertentie-widget-mobile') { 66 if( windowWidth <= 767 ) { show = true; } 67 } 68 else if (type == 'nxs-advertentie-splash') { 69 if (windowWidth >= 1025) { show = true; } 70 } 71 // show banner 72 if (show) { 73 74 var ins_tag = jQuery("<ins>", { 75 'data-revive-zoneid': zoneid, 76 'data-revive-id': ins, 77 'data-revive-source': zoneid_man, 78 }); 79 80 if (callback != undefined) { jQuery("#" + id).replaceWith(ins_tag).promise().done(window[callback]()); } // nodig voor de splashpage 81 else { 82 if(type == 'nxs-advertentie-fixed-sidebar'){ 83 postscribe("#" + id, '<script src=https://service.sportsads.nl/adserver/revive-adserver/www/delivery/ajs.php?zoneid=' + zoneid + '&source=knvb|spclubtest><\/script>', { 84 done: function() { 85 if($("#" + id).height() > 10){ 86 $('.nxs-advertentie-fixed-sidebar').addClass('nxs-advertentie-fixed-sidebar-filler'); 87 } 88 } 89 }); 90 } else { 91 postscribe("#" + id, '<script src=https://service.sportsads.nl/adserver/revive-adserver/www/delivery/ajs.php?zoneid=' + zoneid + '&source=knvb|spclubtest><\/script>'); 92 } 93 94 if(type == 'nxs-advertentie-splash'){ 95 jQuery('#shadowbox-close').click(function(){ 96 jQuery('#shadowbox').addClass(' hidden'); 97 }); 98 // close overlay when esc key is pressed on the keyboard 99 jQuery(document).keyup(function(e) { 100 if (e.keyCode == 27) { jQuery('#shadowbox').addClass(' hidden'); } 101 }); 102 // close overlay if the overlay itself is clicked 103 jQuery('#shadowbox-wrap').click(function(){ 104 jQuery('#shadowbox').addClass(' hidden'); 105 }); 106 } 107 } 108 } 109 }); 110});
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.