'; // Add textoverlay inside reddit emded div jQuery('.wp-block-embed-reddit').each(function(index,element) { if (element.closest(".wp-block-embed-reddit")?.querySelectorAll('.external-embed-wrapper')?.length === 0) { jQuery(element).prepend(redditTextOverlay); } }); } setTimeout(redditDisplayTextoverlay, 0); } }); jQuery(document).on("click",".consent-button",function() { var buttonElement = event.target; var embedType = jQuery(buttonElement).data('type'); if(embedType === 'reddit') { /* * Find all reddit iframes and * add a src attribute with the value from data-src */ jQuery('.wp-block-embed-reddit iframe').each(function(index,element) { jQuery(element).attr('src', jQuery(element).attr('data-src')); jQuery(element).css({'z-index': 'initial', 'display': 'initial'}); }); } /* * Now the embedded content should be loading * so we can hide all text-overlays with this data-type */ jQuery('.embed-consent-notice[data-type="'+ embedType +'"]').hide(); });
`, cio: `

🚀 The new CIO.com hybrid search: 🔍 Explore CIO content smarter, faster and AI powered. ✨

`, nww: `

🚀 The new NetworkWorld.com hybrid search: 🔍 Explore NetworkWorld content smarter, faster and AI powered. ✨

`, cw: `

🚀 The new Computerworld.com hybrid search: 🔍 Explore Computerworld content smarter, faster and AI powered. ✨

` }; const sharedStyles = ` `; const publisher = foundry_get_publisher(); const htmlContent = contentSwitch[publisher]; if (!htmlContent || !document.body) return; document.body.insertAdjacentHTML("afterbegin", htmlContent + sharedStyles); const bar = document.querySelector(".section-block--announcementbar"); if (bar) { requestAnimationFrame(() => { bar.classList.add("section-block--announcementbar--visible"); }); } const btn = document.querySelector(".section-block--announcementbar .reset-button"); const searchIcon = document.querySelector('.header__icon-button[data-menu-trigger="search"] svg'); const searchTrigger = document.querySelector('[data-menu-trigger="search"]'); if (searchIcon) { searchIcon.innerHTML = ''; } if (btn && searchTrigger) { btn.addEventListener("click", () => searchTrigger.click()); } console.log("[MISO SCRIPT] Conditions met, initializing Miso search announcements."); }; initMisoSearchAnnouncements(); }); document.addEventListener('consentManagerReady', () => { const hasConsentYouTube = consentManager.checkConsentByVendors([ 'YouTube', 'YT' ]); if (hasConsentYouTube.some(vendor => vendor['Has Consent'] === false)) { console.log('[YOUTUBE SCRIPT] Consent not given for YouTube.'); } else { console.log('[YOUTUBE SCRIPT] Consent given for YouTube. Loading script...'); } }); document.addEventListener('consentManagerReady', () => { const hasConsentGAM = consentManager.checkConsentByVendors([ 'Google Ad Manager', 'GAM' ]); if (hasConsentGAM.some(vendor => vendor['Has Consent'] === false)) { console.log('[GAM SCRIPT] Consent not given for GAM.'); } else { console.log('[GAM SCRIPT] Consent given for GAM. Loading script...'); } }); document.addEventListener('consentManagerReady', () => { const hasConsentGoogleFonts = consentManager.checkConsentByVendors([ 'Google Fonts', 'Google Web Fonts' ]); if (hasConsentGoogleFonts.some(vendor => vendor['Has Consent'] === false)) { console.log('[GOOGLE FONTS SCRIPT] Consent not given for Google Fonts.'); } else { console.log('[GOOGLE FONTS SCRIPT] Consent given for Google Fonts. Loading script...'); } }); document.addEventListener('consentManagerReady', () => { const hasConsentAdobeTypekit = consentManager.checkConsentByVendors([ 'Adobe Typekit' ]); if (hasConsentAdobeTypekit.every(vendor => vendor['Has Consent'] === true)) { if (foundry_is_edition('kr')) { const link = document.createElement('link'); link.rel = 'stylesheet'; link.href = 'https://use.typekit.net/ysx4dcu.css'; document.head.appendChild(link); } } }); document.addEventListener('consentManagerReady', () => { const vendors = ['Subscribers']; const hasConsentSubscribers = consentManager.checkConsentByVendors(vendors); if (hasConsentSubscribers.some(vendor => vendor['Has Consent'] === false)) { return; } else { if (foundry_is_language('en')) { console.log('Language is English'); // subscribers english .. } if (foundry_is_edition('kr')) { console.log('Edition is Korean'); // subscribers in korean .. } if (foundry_is_edition('ja')) { console.log('Edition is Japanese'); // subscribers in japanese .. } } });