1(function (Drupal, once) { 2 Drupal.behaviors.rotatingBannerAd = { 3 attach: function (context, settings) { 4 once('rotatingBannerAd', '#banner-adver', context).forEach(function (container) { 5 const ads = [ 6 7 { 8 type: "dcmIframe", 9 id: "ad-dcm-446388855", 10 src: "https://ad.doubleclick.net/ddm/adi/N7417.1867619AACE.COM/B35571570.446388855;sz=728x90;ord=[timestamp];dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=;dc_sdk_apis=[APIFRAMEWORKS];dc_omid_p=[OMIDPARTNER];gpp=${GPP_STRING_755};gpp_sid=${GPP_SID};dc_tdv=1?" 11 } 12 , 13 14 { 15 type: "image", 16 link: "https://thygenext-thyramir.com/?utm_source=AACE&utm_medium=Banner&utm_campaign=ETD&utm_content=THY-0384-00-0926", 17 image: "https://www.aace.com/images/ad/THY-0348-00-0926_Display_Ads_AACE_v1a_26092301.png", 18 id: "ad-thygenext" 19 } 20 21 ]; 22 23 const randomAd = ads[Math.floor(Math.random() * ads.length)]; 24 25 // Create wrapper div for every ad 26 const wrapper = document.createElement('div'); 27 wrapper.id = `wrapper-${randomAd.id}`; 28 wrapper.className = "banner-ad-wrapper"; 29 30 if (randomAd.type === "image") { 31 const anchor = document.createElement('a'); 32 anchor.href = randomAd.link; 33 anchor.id = `gtm-${randomAd.id}-link`; 34 anchor.setAttribute('role', 'link'); 35 anchor.setAttribute('rel', 'sponsored noopener'); 36 anchor.style.display = "inline-block"; 37 38 anchor.addEventListener('click', function (e) { 39 e.preventDefault(); 40 window.open(randomAd.link, '_blank', 'width=1000,height=600'); 41 }); 42 43 const img = document.createElement('img'); 44 img.src = randomAd.image; 45 img.alt = "Sponsored Ad"; 46 img.id = `gtm-${randomAd.id}-image`; 47 img.style.cursor = "pointer"; 48 img.style.width = "100%"; 49 img.style.height = "auto"; 50 img.decoding = "async"; 51 img.loading = "lazy"; 52 53 anchor.appendChild(img); 54 wrapper.appendChild(anchor); 55 container.appendChild(wrapper); 56 } 57 58 else if (randomAd.type === "dcmIframe") { 59 const iframe = document.createElement('iframe'); 60 61 iframe.src = randomAd.src.replace('[timestamp]', Date.now()); 62 iframe.width = "728"; 63 iframe.height = "90"; 64 iframe.marginWidth = "0"; 65 iframe.marginHeight = "0"; 66 iframe.hspace = "0"; 67 iframe.vspace = "0"; 68 iframe.frameBorder = "0"; 69 iframe.scrolling = "no"; 70 iframe.id = `gtm-${randomAd.id}`; 71 iframe.title = "Sponsored Ad"; 72 iframe.style.border = "0"; 73 iframe.style.maxWidth = "100%"; 74 75 wrapper.appendChild(iframe); 76 container.appendChild(wrapper); 77 } 78 79 }); 80 } 81 }; 82})(Drupal, once);
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.