!function(){ const au = '/6581/web/postbid/bottom_right/news_info/country_home'; const parts = String(au).split('/'); const slot = parts[4] || ''; const platform = parts[2] || ''; const page = parts[6] || ''; const country = window?.adInfo?.country?.toLowerCase() || undefined; const node = document.currentScript.parentNode; const smallBannerPages = ['tropical']; const isONE = window?.tagEngineDataLayer?.isSPA || false; let filled = false; function injectRemoveAdsPill(adEl, onClick = () => {}) { if (!adEl || !adEl.parentNode) return; // avoid duplicates if (adEl.nextElementSibling?.classList?.contains('aw-ads-pill')) return; let version = 3; let bg = 'var(--button-background)', clr = 'var(--foreground)', bdr = '6px', sun = '#f05514'; if (version === 2){ bg = '#f05514', clr = '#fff', bdr = '6px', sun = '#fff'; } if (!document.getElementById('aw-ads-pill-css')) { const css = document.createElement('style'); css.id = 'aw-ads-pill-css'; css.textContent = ` .aw-ads-pill{display:inline-flex;align-items:center;gap:6px;background:${bg};color:${clr};border:0;border-radius:${bdr};padding:6px 8px;margin-top:16px;cursor:pointer;font-size: .75em;-webkit-tap-highlight-color:transparent;} .aw-ads-pill svg{display:block;}`; document.head.appendChild(css); } let iconSvg = ``; if (version === 3){ iconSvg = ``; } const pill = document.createElement('button'); pill.type = 'button'; pill.className = 'aw-ads-pill'; pill.innerHTML = `${iconSvg}Remove Ads`; pill.addEventListener('click', (e) => { e.preventDefault(); e.stopPropagation(); onClick(); }); adEl.appendChild(pill); } function cleanLanguageCode(langCode) { if (typeof langCode !== "string") return ""; return langCode.trim().slice(0, 2).toLowerCase(); } const lang = cleanLanguageCode(window?.adInfo?.lang) || "en"; function removeBeforeAdContent(){ if (document.querySelector("#adNoBefore")){ return; } const css = '.adNoBefore.ad::before{content:"";border:0;padding:0}'; const docHead = document.head || document.getElementsByTagName("head")[0]; const customStyles = document.createElement("style"); customStyles.id = "adNoBefore"; customStyles.type = "text/css"; if (customStyles.styleSheet) { customStyles.styleSheet.cssText = css; } else { customStyles.appendChild(document.createTextNode(css)); } docHead.appendChild(customStyles); } function cleanSlot(node,nodeToRemove){ const removeNodes = node.querySelectorAll(nodeToRemove); removeNodes.forEach(rNode => { rNode.remove(); }); } function setupUnfilledMonitoring({ node, ins, size }) { let done = false; const timeoutMs = 4000; let mod_DT = false, mod_AWNow = false; const markUnfilled = (reason) => { if (done) return; done = true; if (country === 'us' && platform === 'android' && size === '300x250') { if (!loadDT_ONE(node)){ PremiumPlusUpsell(node, size); //loadAmazon(node); } } else if (isONE && size === '300x250' && country === 'us' ){ PremiumPlusUpsell(node, size); //loadAmazon(node); } else if (isONE){ PremiumPlusUpsell(node, size); } else if (slot === "adhesion" && platform === "mweb"){ try{ window.adsOnPage.get("adhesion").isEmpty = true; window.adhesionController.close(); } catch (e){} } cleanup(); }; const markFilled = (reason) => { if (done) return; done = true; if (size === "300x250"){ injectRemoveAdsPill(node, () => { const ref = node.id || ""; const frm = ref.split("-")[0] || ""; window.location.href = '/account/upsell?promo=removeAdsPill_' + encodeURIComponent(ref) + '&referrer=' + encodeURIComponent(frm); }); } cleanup(); }; let attrObserver, swapObserver, ro, childObs; const watchIns = (el) => { attrObserver = new MutationObserver(() => { const s = el.getAttribute('data-ad-status'); if (s === 'unfilled') markUnfilled('attr'); if (s === 'filled') markFilled('attr'); }); try { attrObserver.observe(el, { attributes: true, attributeFilter: ['data-ad-status'] }); } catch {} const now = el.getAttribute('data-ad-status'); if (now === 'unfilled') return markUnfilled('initial'); if (now === 'filled') return markFilled('initial'); const hookIframe = () => { const iframe = el.querySelector('iframe'); if (!iframe) return; iframe.addEventListener('load', () => { const s = el.getAttribute('data-ad-status'); if (s === 'unfilled') markUnfilled('iframe-load'); else if (s === 'filled') markFilled('iframe-load'); }, { once: true }); }; childObs = new MutationObserver(hookIframe); try { childObs.observe(el, { childList: true, subtree: true }); } catch {} hookIframe(); }; swapObserver = new MutationObserver(() => { const latestIns = node.querySelector('ins.adsbygoogle'); if (latestIns) watchIns(latestIns); }); try { swapObserver.observe(node, { childList: true, subtree: true }); } catch {} const to = setTimeout(() => markUnfilled('timeout'), timeoutMs); function cleanup() { try { attrObserver && attrObserver.disconnect(); } catch {} try { childObs && childObs.disconnect(); } catch {} try { swapObserver && swapObserver.disconnect(); } catch {} try { ro && ro.disconnect(); } catch {} clearTimeout(to); } const initialIns = ins || node.querySelector('ins.adsbygoogle'); if (initialIns) watchIns(initialIns); } function PremiumPlusUpsell(node, size){ let ref = node.id || ""; const frm = ref.split("-")[0] || ""; //get the page so we can send the user back ref = "postbidAppUpsell_"+ref; let sz = "rect"; if (size === '320x50'){ sz = "banner"; } const premiumPlusUpsellVariants = { "en": { "upsell.variant5.content": "Ad-free browsing and perks", "upsell.variant1.content": "Cleaner pages and more features", "upsell.variant2.header": "Go ad-free with Premium+", "upsell.variant4.button": "Try Premium+", "upsell.variant1.header": "Unlock an ad-free experience", "upsell.variant2.content": "Faster pages, extra tools", "upsell.variant3.content": "Deeper insights, extra features", "upsell.variant4.header": "Cleaner, quicker forecast", "upsell.variant5.button": "Explore Premium+", "upsell.variant1.button": "Explore Premium+", "upsell.variant2.button": "Upgrade now", "upsell.variant3.header": "See more, skip ads", "upsell.variant5.header": "Upgrade for uninterrupted weather", "upsell.variant3.button": "Get Premium+", "upsell.variant4.content": "Zero ads, more focus" }, "es": { "upsell.variant5.content": "Navegación sin publicidad y ventajas", "upsell.variant1.content": "Páginas más limpias y más funciones", "upsell.variant2.header": "Vaya sin publicidad con Premium+", "upsell.variant4.button": "Pruebe Premium+", "upsell.variant1.header": "Desbloquea una experiencia sin publicidad", "upsell.variant2.content": "Páginas más rápidas, herramientas adicionales", "upsell.variant3.content": "Información más profunda, funciones adicionales", "upsell.variant4.header": "Pronóstico más limpio y rápido", "upsell.variant5.button": "Explorar Premium+", "upsell.variant1.button": "Explorar Premium+", "upsell.variant2.button": "Actualizar ahora", "upsell.variant3.header": "Ver más, omitir anuncios", "upsell.variant5.header": "Actualización para condiciones climáticas ininterrumpidas", "upsell.variant3.button": "Obtén Premium+", "upsell.variant4.content": "Cero anuncios, más enfoque" }, "fr": { "upsell.variant5.content": "Navigation et avantages sans publicité", "upsell.variant1.content": "Des pages plus propres et plus de fonctionnalités", "upsell.variant2.header": "Passez sans publicité avec Premium+", "upsell.variant4.button": "Essayez Premium+", "upsell.variant1.header": "Profitez d’une expérience sans publicité", "upsell.variant2.content": "Des pages plus rapides, des outils supplémentaires", "upsell.variant3.content": "Des informations plus approfondies, des fonctionnalités supplémentaires", "upsell.variant4.header": "Prévisions plus propres et plus rapides", "upsell.variant5.button": "Explorer Premium+", "upsell.variant1.button": "Explorer Premium+", "upsell.variant2.button": "Mettre à niveau maintenant", "upsell.variant3.header": "Voir plus, ignorer les annonces", "upsell.variant5.header": "Mise à niveau pour des conditions météorologiques ininterrompues", "upsell.variant3.button": "Obtenir Premium+", "upsell.variant4.content": "Zéro publicité, plus de concentration" } }; function getRandomPremiumPlusVariant(lang = "en") { const code = String(lang || "en").toLowerCase(); const normalized = premiumPlusUpsellVariants[code] ? code : "en"; const dict = premiumPlusUpsellVariants[normalized] || {}; const byId = {}; for (const [key, value] of Object.entries(dict)) { const m = key.match(/^upsell\.variant(\d+)\.(header|content|button)$/); if (!m) continue; const id = Number(m[1]); byId[id] = byId[id] || { header: "", content: "", button: "" }; byId[id][m[2]] = value; } // Only keep complete variants and sort by id for stable indexing const variants = Object.entries(byId) .map(([id, v]) => ({ id: Number(id), ...v })) .filter(v => v.header && v.content && v.button) .sort((a, b) => a.id - b.id); if (variants.length === 0) { // Nothing usable for this lang (or even "en") return { lang: normalized, index: -1, variant: null }; } const idx = Math.floor(Math.random() * variants.length); const v = variants[idx]; return { lang: normalized,// "en" or "es" index: idx,// 0..variants.length-1 (stable order by id) variant: {// { header, content, button } header: v.header, content: v.content, button: v.button } }; } let pick = getRandomPremiumPlusVariant(lang); if (!pick.variant) pick = getRandomPremiumPlusVariant("en"); if (!pick.variant) return; // nothing to render safely ref += `_en${pick.index}`; ref = ref.toLowerCase(); let imp = "https://securepubads.g.doubleclick.net/gampad/adx?iu=/6581/DFPTrackingPixel/"+platform+"/postbid_upsell/impressions/"+ref+"&sz=1x1&m=text/javascript&c="+Math.random()+"&t=campaign%3D"+ref; try{ window.pPlusUpsell(node, sz, { header: pick.variant.header, content: pick.variant.content, button: pick.variant.button, href: '/account/upsell?promo=' + encodeURIComponent(ref) + '&referrer=' + encodeURIComponent(frm) }); //call impressions tracker const t = new Image(); t.src = imp; const upcard = node.querySelector(".upcard"); if (upcard){ upcard.addEventListener('click', function(){ const t = new Image(); t.src = imp.replace("impressions","clicks"); }, { passive: true }); } } catch (e){} } async function loadAmazon(node) { if (!node) { return; } const ADUNIT = au; const CLICK_MACRO = "https://adclick.g.doubleclick.net/pcs/click?xai=AKAOjstb86p7zQNQMgK69w_yMYMp6OstBDLCm3sRbHIBfluN7JD5_9Nk7B5BsvDbsvALcf0c0gkC6i-cRwP3fjQGn9Sri5468HlAnadl43Y9bKvb-UlI6ec3unWVWfvyrpS5McuzdxrmmAnVmvc0DFmLY7KDCxemZxLq_fFphxuff8_tvXEWol9rJn3KokP_bfRfZiYJ-BsN2QJyasvjxtoWXheXogOPnvHfk9rFjrYnHU3asnZg-pqhMal8uaM0eOlog-eKvEzADLcjXfMKGL70UMM-Bwr9tO3MsiVcvu3aWHVeFKeOEig7WN903IXRd8dbra3K_M1WgCTmKimkd3EQs1wHRBHdlkKmbOL_vIPSbnAMK5jcvh5na92wHe9cqKct4c48bY9HzJCD9-l4qrc4bjkBGWsJgJTJjEVnfzExG6HbfHUFDAU77iZwl6c&sai=AMfl-YSjTxsn4Z49_s0hD7INqbX9_2Y-IEQDturCFK9OwGj7-yk19PPmY7Pz4O1RwZEs8W1U8sCC_2Rn0N7t6kmTF-VQEG_OMAjETSET7TCorGzFVlTmBjem5T-TV4bLJELF-V2d4E1_KVOXXY-dQy8wFhl_3kbI_b546yBw_OmfiqseBCxcRqEFiH8b-thRtTlnWoKQr-mhctuq84Hc_luixaJ1_Q&sig=Cg0ArKJSzMFxfBYsBQqwEAE&fbs_aeid=%5Bgw_fbsaeid%5D&urlfix=1&adurl="; function getRandomJsonFileURL() { const defaultEndPoint = "LimitedTimeDeal"; const endPoints = { IAB1: ["LimitedTimeDeal_ToysAndGames"], //Arts & Entertainment IAB2: [ "LimitedTimeDeal_Automotive" ], //Auto IAB3: [ "LimitedTimeDeal_Computers", "LimitedTimeDeal_Electronics", "LimitedTimeDeal_OfficeProducts", ], //Business IAB4: ["LimitedTimeDeal_OfficeProducts"], //Careers IAB5: ["LimitedTimeDeal_OfficeProducts"], //Education IAB6: ["LimitedTimeDeal_HomeAndKitchen"], //Family & Parenting IAB7: [ "LimitedTimeDeal_HealthPersonalCare", "LimitedTimeDeal_ExerciseEquipment", "LimitedTimeDeal_SportsAndOutdoors", ], //Health & Fitness IAB8: ["LimitedTimeDeal_HomeAndKitchen"], //Food & Drink IAB9: [ "LimitedTimeDeal_ToysAndGames", "LimitedTimeDeal_MobileAndAccessories", ], //Hobbies IAB10: [ "LimitedTimeDeal_GardenAndOutdoor", "LimitedTimeDeal_HomeAndKitchen", "LimitedTimeDeal_ToolsAndHomeImprovement", "LimitedTimeDeal_Appliances", ], //Home & Garden IAB11: [], //Law Govt IAB12: [], //News IAB13: [ "LimitedTimeDeal_Computers", "LimitedTimeDeal_Electronics", "LimitedTimeDeal_MobileAndAccessories", ], //Personal Finance IAB14: [], //Society IAB15: [], //Science IAB16: ["LimitedTimeDeal_PetSupplies"], //Pets IAB17: [ "LimitedTimeDeal_ExerciseEquipment", "LimitedTimeDeal_SportsAndOutdoors" ], //Sports IAB18: [ "LimitedTimeDeal_HealthPersonalCare", "LimitedTimeDeal_LuxuryBeauty", "LimitedTimeDeal_Jewelry", ], //Style & Fashion IAB19: [ "LimitedTimeDeal_Computers", "LimitedTimeDeal_Electronics", "LimitedTimeDeal_MobileAndAccessories", ], //Tech & Computing IAB20: [ "LimitedTimeDeal_Luggage" ], //Travel IAB21: [], //Real Estate IAB22: [ "LimitedTimeDeal_HomeAndKitchen", "LimitedTimeDeal_Electronics", "LimitedTimeDeal_Jewelry", ], //Shopping }; // Safely get segments const data = window.gamera?.getPrebidSegments?.(); const segments = data?.user?.data?.[0]?.segment || []; // Determine the first segment ID that has endpoints defined let selectedEndpoints = []; for (const seg of segments) { const matches = endPoints[seg.id]; if (matches && matches.length > 0) { selectedEndpoints = matches; break; // stop after finding the first match (priority order) } } // Pick a random endpoint or fall back to default const chosenEndPoint = selectedEndpoints.length > 0 ? selectedEndpoints[Math.floor(Math.random() * selectedEndpoints.length)] : defaultEndPoint; // Construct and return the final URL return `https://www.accuweather.com/adops/amazon/${chosenEndPoint}.json`; } function pickRandomItemWithSavings(items) { const eligible = items.filter(item => asArray(_get(item, "Offers.Listings")).some(listing => _get(listing, "Price.Savings") != null ) ); if (eligible.length) { return eligible[Math.floor(Math.random() * eligible.length)]; } // fallback: no items with Savings found return items[Math.floor(Math.random() * items.length)]; } const _get = (o, p) => p.split(".").reduce((a, k) => (a && a[k] != null ? a[k] : undefined), o); const has = (v) => v !== undefined && v !== null && v !== ""; const pick = (o, paths) => { for (const p of paths) { const v = p.includes(".") ? _get(o, p) : o ? o[p] : undefined; if (has(v)) return v; } }; const asArray = (v) => (Array.isArray(v) ? v : v ? [v] : []); const buildGetClickUrl = ((adunit) => { const parts = (adunit || "").split("/"); const platform = parts[2] || ""; const position = parts[4] || ""; const page = (parts[6] || "").replaceAll("-v", "").replaceAll("-p", ""); const tP = ["web", "mweb", "ios", "android"], tPos = ["top", "top_right", "middle"], tPg = ["country_home", "local_home", "hourly", "daily", "extended", "news", "radar", "month", "current"]; return (url) => { let code = "accuweathe075-20"; if (!tP.includes(platform)) code = "accuweathe075-20"; else if (!tPos.includes(position)) code = `aw-${platform}-default-20`; else if (!tPg.includes(page)) code = `aw-${platform}-${position}-default-20`; else code = `aw-${platform}-${position}-${page}-20`; return (url || "").replaceAll("accuweathe075-20", code); }; })(ADUNIT); if (!document.getElementById("amazon-ad-css")) { const css = ` .house-ad{padding:0;display:block;background:none;text-align: left;} .awNativeAdWrapper .awNativeCard{position:relative;width:100%;min-width:300px;min-height:250px;height:auto;display:flex;flex-direction:column;border-radius:6px;overflow:hidden;font-family:solis,system-ui,-apple-system,Segoe UI,Roboto,Arial;margin:0 auto;box-shadow:0 2px 8px rgba(0,0,0,.12)} .awNativeAdWrapper .topHeadline{padding:8px 16px;font-size:13px;text-transform:uppercase;background:#000;color:#fff} .awNativeAdWrapper .awNativeCard a.mainBanner{position:relative;display:block;text-decoration:none;color:inherit;background-repeat:no-repeat;background-position:left center;background-size:contain;background-color:#fff;flex:1 1 auto;min-height:240px} .awNativeAdWrapper .awNativeCard .priceBlock{position:absolute;top:10px;right:10px;text-align:right;z-index:2} .awNativeAdWrapper .limitedButton{background:#ce0539;padding:6px 10px;font-size:12px;color:#fff;border-radius:6px;font-weight:700;text-transform:uppercase;display:inline-block;margin-bottom:6px} .awNativeAdWrapper .priceArea{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-bottom:2px} .awNativeAdWrapper .discountPercent{color:#ce0539;font-size:20px;font-weight:700;line-height:1} .awNativeAdWrapper .price{color:#000;background:rgba(255,255,255,.92);padding:2px 6px;border-radius:4px;font-size:18px;font-weight:700;line-height:1} .awNativeAdWrapper .price sup{vertical-align:text-top;font-size:10px} .awNativeAdWrapper .listPrice{display:block;color:#333;font-size:11px;background:rgba(255,255,255,.85);padding:1px 6px;border-radius:4px} .awNativeAdWrapper .awNativeCard .bottomPart{position:absolute;left:0;right:0;bottom:0;padding:10px;background:rgba(0,0,0,0.7);color:#fff;z-index:1} .awNativeAdWrapper .headline{font-size:15px;font-weight:500;line-height:1.3;text-shadow:0 1px 3px rgba(0,0,0,.6);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis} .awNativeAdWrapper .awNativeCard .cardCta{display:flex;align-items:center;justify-content:center;width:100%;background:#f05514;color:#fff;font-weight:700;font-size:13px;padding:10px 14px;text-decoration:none;gap:8px}`; const style = document.createElement("style"); style.id = "amazon-ad-css"; style.textContent = css; document.head.appendChild(style); } const findItemsArray = (x) => { const direct = _get(x, "Items"); if (Array.isArray(direct) && direct.length) return direct; for (const p of ["ItemsResult.Items", "items", "deals", "products", "results"]) { const arr = _get(x, p); if (Array.isArray(arr) && arr.length) return arr; } return []; }; const itemToHtml = (item) => { const detail = _get(item, "DetailPageURL") || "#"; const clickUrl = buildGetClickUrl(detail); const lightning = buildGetClickUrl( "https://www.amazon.com/deals?bubble-id=deals-collection-lightning-deals&tag=accuweathe075-20" ); const img = pick(item, ["Images.Primary.Large.URL", "Images.Primary.Medium.URL"]) || ""; const listing = asArray(_get(item, "Offers.Listings"))[0] || {}; const price = listing.Price || {}; const display = price.DisplayAmount || "", amt = price.Amount; const pHtml = display ? `
${display}
` : typeof amt === "number" ? `
$${Math.floor(amt)}${amt.toFixed(2).split(".")[1]}
`: ""; const pct = _get(price, "Savings.Percentage"); const disc = typeof pct === "number" ? `
-${pct}%
` : ""; const listDisp = pick(item, [ "Offers.Listings.0.SavingBasis.DisplayAmount", "ItemInfo.ProductInfo.ListPrice.DisplayAmount", ]); const listLine = listDisp ? `
List: ${listDisp}
` : ""; const title = pick(item, ["ItemInfo.Title.DisplayValue", "Title", "title"]) || "Limited Time Deal"; const header = isONE ? `

Amazon Limited Time Deals

` : `
Amazon Limited Time Deals
`; return `
${header}
Limited time deal
${disc}${pHtml}
${listLine}
${title}
All Lightning Deals →
`; }; // Fetch with timeout (fail fast if blocked) const fetchWithTimeout = (url, ms = 5000) => Promise.race([ fetch(url, { cache: "no-store" }), new Promise((_, reject) => setTimeout(() => reject(new Error("fetch timeout")), ms)), ]); try { const res = await fetchWithTimeout(getRandomJsonFileURL()); if (!res.ok) throw new Error("HTTP " + res.status); const data = await res.json(); const items = findItemsArray(data); if (!items.length) throw new Error("No items found in JSON"); const sel = pickRandomItemWithSavings(items); const card = itemToHtml(sel); cleanSlot(node, "ins"); cleanSlot(node, "div"); cleanSlot(node, "iframe"); node.classList.add("house-ad"); removeBeforeAdContent(); const awNativeAdWrapper = document.createElement("div"); awNativeAdWrapper.classList.add("awNativeAdWrapper"); awNativeAdWrapper.innerHTML = card; node.appendChild(awNativeAdWrapper); } catch (e) {console.log(e)} } /* function loadDT(node){ if (au.indexOf("/web") != -1 || au.indexOf("ios") != -1 || country != "us"){ return; } const c = document.createElement("div"); c.classList.add("content-module"); const h2 = document.createElement("h2"); h2.innerHTML = "Apps Center"; h2.setAttribute("style","margin-bottom:1px;font-size:0.75rem ;background-color:rgba(255, 255, 255, 1);color:rgba(0, 0, 0, .6);border-radius: 6px 6px 0 0;font-weight: 700;letter-spacing:0.5px;padding: 20px 20px 12px;text-transform: uppercase;"); const con = document.createElement("div"); con.style.height="290px"; con.style.backgroundColor = "rgba(255, 255, 255, 1)"; con.style.borderRadius = "0 0 6px 6px"; const i = document.createElement("iframe"); i.style.height="100%"; i.style.width="100%"; i.src = "https://dtwebfreighterd.digitalturbine.com?placement_id=9b6417eb-52e2-4da3-bff1-ee335c125df5"; node = document.getElementById("top"); node.innerHTML = ""; node.classList.remove("glacier-ad","ad"); con.appendChild(i); c.appendChild(h2); c.appendChild(con); node.appendChild(c); } */ function loadDT_ONE(node){ if (document.querySelector('#dtONE_AppsCenter')){ return false; } cleanSlot(node,"ins"); cleanSlot(node,"div"); removeBeforeAdContent(); node.classList.add("adNoBefore"); node.setAttribute("style","padding:0;background-color:transparent"); const titleCard = document.createElement("div"); titleCard.classList.add("title-card"); titleCard.setAttribute("style","width:100%"); titleCard.id = "dtONE_AppsCenter"; const titleCard__header = document.createElement("div"); titleCard__header.classList.add("title-card__header","has-rounded-top"); const titleCard__headerContent = document.createElement("div"); titleCard__headerContent.classList.add("title-card__header-content"); const h3 = document.createElement("h3"); h3.classList.add("title-card__header-content_text"); h3.innerHTML = "Apps Center"; const titleCard__content = document.createElement("div"); titleCard__content.classList.add("title-card__content","has-rounded-bottom"); titleCard__content.setAttribute("style","padding:5px"); const iframe = document.createElement("iframe"); iframe.style.height="300px"; iframe.style.width="100%"; iframe.src = "https://dtwebfreighterd.digitalturbine.com?placement_id=41596e54-cf2d-40cf-97ad-de7eab769df7"; titleCard__content.appendChild(iframe); titleCard__headerContent.appendChild(h3); titleCard__header.appendChild(titleCard__headerContent); titleCard.appendChild(titleCard__header); titleCard.appendChild(titleCard__content); node.innerHTML=""; node.appendChild(titleCard); return true; } function loadAWNowVideoPlayer(node){ if (document.querySelector('.video-player-wrapper')){ return false; } cleanSlot(node,"ins"); cleanSlot(node,"div"); removeBeforeAdContent(); node.classList.add("adNoBefore"); node.setAttribute("style","padding:0;background-color:transparent"); const titleCard = document.createElement("div"); titleCard.classList.add("title-card","video-player-wrapper"); //header const titleCard__header = document.createElement("div"); titleCard__header.classList.add("title-card__header","has-rounded-top"); const titleCard__headerContent = document.createElement("div"); titleCard__headerContent.classList.add("title-card__header-content"); const h3 = document.createElement("h3"); h3.classList.add("title-card__header-content_text"); h3.innerHTML = "AccuWeather NOW"; //player const lng_video_player = document.createElement("div"); lng_video_player.id = "lngtd_outstream"; //body controls const titleCard__content = document.createElement("div"); titleCard__content.classList.add("title-card__content","has-rounded-bottom"); const cta_container = document.createElement("div"); cta_container.classList.add("cta-container"); const thumb_info_wrapper = document.createElement("div"); thumb_info_wrapper.classList.add("thumb-info-wrapper"); const play_icon = document.createElement("div"); play_icon.classList.add("icon-play"); play_icon.addEventListener("click",function(){ window.watchAWNowLive(); }); const thumb_info = document.createElement("div"); thumb_info.classList.add("thumb-info"); const thumb_title = document.createElement("div"); thumb_title.classList.add("thumb-title"); thumb_title.innerHTML = "Watch Live"; const custom_mute = document.createElement("div"); custom_mute.classList.add("customMute"); //assemble card header titleCard__headerContent.appendChild(h3); titleCard__header.appendChild(titleCard__headerContent); //assemble card body thumb_info.appendChild(thumb_title); thumb_info_wrapper.appendChild(play_icon); thumb_info_wrapper.appendChild(thumb_info); thumb_info_wrapper.appendChild(custom_mute); cta_container.appendChild(thumb_info_wrapper); titleCard__content.appendChild(cta_container); //assemble card titleCard.appendChild(titleCard__header); titleCard.appendChild(lng_video_player); titleCard.appendChild(titleCard__content); if (window.AWVideoPlayerLoaded){ try{ node.appendChild(titleCard); window.acw_lngtd.resetAndRunAuction(); return true; } catch (e){return false;} } return false; } function loadAdSense(node, ad_slot, style, size){ function pushAd() { (adsbygoogle = window.adsbygoogle || []).push({}); } try{ node.firstChild.remove(); cleanSlot(node,"ins"); cleanSlot(node,"div"); } catch (e){} filled = true; const ins = document.createElement("ins"); ins.setAttribute("class","adsbygoogle"); ins.setAttribute("style","display:inline-block;margin:0 auto;"+style); ins.setAttribute("data-ad-client","ca-pub-5771594739411148"); ins.setAttribute("data-ad-slot",ad_slot); node.appendChild(ins); if (!document.querySelector('#google_adsense_script')){ const a = document.createElement("script"); const docHead = document.head || document.getElementsByTagName("head")[0]; a.src = "https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5771594739411148"; a.crossorigin = 'anonymous'; a.id = "google_adsense_script"; a.async = true; a.onload = pushAd; docHead.appendChild(a); } else { pushAd(); } if (isONE) { setupUnfilledMonitoring({ node, ins, size }); } return; } if (platform == "mweb"){ if (slot == "adhesion"){ loadAdSense(node, "8447144368", "width:320px;height:50px;", "320x50"); } else if (slot == "top") { loadAdSense(node, "6405445165", "width:300px;height:250px;", "300x250"); } else if (slot == "middle") { loadAdSense(node, "9811115806", "width:300px;height:250px;", "300x250"); } else if (slot == "bottom") { loadAdSense(node, "6970411167", "width:300px;height:250px;", "300x250"); } else if (slot == "native") { loadAdSense(node, "4340205220", "width:300px;height:250px;", "300x250"); } } else if (platform == "web") { if (slot == "top_right"){ loadAdSense(node, "8538566932", "width:300px;height:250px;", "300x250"); } else if (slot == "bottom_right"){ loadAdSense(node, "9359203321", "width:300px;height:250px;", "300x250"); } else if (slot == "native" || slot == "middle"){ loadAdSense(node, "3098441591", "width:300px;height:250px;", "300x250"); } else if (slot == "bottom"){ loadAdSense(node,"9706318568","width:970px;height:250px;", "970x250"); } else if (slot == 'top'){ loadAdSense(node,"4150593412","width:970px;height:250px;", "970x250"); //4150593412 - 970x250 //4208435833 - Multiplex } } else if (platform == "ios"){ if (slot == "adhesion" || smallBannerPages.includes(page)){ loadAdSense(node, "4040118405", "width:320px;height:50px;", "320x50"); } else if (slot == "bottom"){ loadAdSense(node, "8979560252", "width:300px;height:250px;", "300x250"); } else if (slot == "top"){ loadAdSense(node, "1540053939", "width:300px;height:250px;", "300x250"); } else if (slot == "middle"){ loadAdSense(node, "6464345031", "width:300px;height:250px;", "300x250"); } } else if (platform == "android"){ if (slot == "adhesion" || smallBannerPages.includes(page)){ loadAdSense(node, "1478082989", "width:320px;height:50px;", "320x50"); } else if (slot == "top"){ loadAdSense(node, "8646126562", "width:300px;height:250px;", "300x250"); } else if (slot == "middle"){ loadAdSense(node, "4706881551", "width:300px;height:250px;", "300x250"); } else if (slot == "bottom"){ loadAdSense(node, "2208161987", "width:300px;height:250px;", "300x250"); } } /* if (slot === "adhesion" && platform === "mweb" && !filled){ collapseAdhesion(); } */ //optional collapse slot if ("No" === 'Yes' && !filled) { try { node.style.display='none'; node.classList.remove('glacier-ad'); node.classList.remove('ad'); } catch (e) {} } //optional tracking impression if ("No" === 'Yes') { const track = new Image(); track.src = 'https://securepubads.g.doubleclick.net/pcs/view?xai=AKAOjss0Q0ultM9J4Hdb09dYpoffi0susPnP7TG7HEVZeXDCtsIi7y939F2I32XXtqkAKoeDLiKXOuJLN7WG6yp0axpfLugT7IqS62iYVRQDENgLlr-tCvmybtAQnGbhvw--fFniy5kU4DaBpxF-CntXINF-IAo-pbMbUPe-8mqvrACj_u6ezhVer_PRTvLIBKwZNHblKT2H-ZhnLDYM1xNzHnHU0W2uST97B8aR6jr2CAVPqgeOqeO_cQWqjs4piOdsDYsaLfGNQ1483VtrAANgb2nxYsnFuFiCxsGVbyCGqdySE2UJKXH3wikagJRZAnVLJqYITZYvPRI80PzXhSjUvKbcMvI3P8d03kS4VtX7a0tQmPZyLuArk4nXH2dq0aRqA57gB8M--EcyHNkB8Nuweszj91griyc_17ha4qRZoc2ERLHJVuwZvqm2Q9TxaXtkFaU8ZxqPZrOcggYCDPI&sai=AMfl-YSm04-fcnCjtkY5_CniWFODpDqEOym9L0poy9swN5Mfv6RKGcnWnGsaMPgHEjzH0SynQRBmGUatZSQQg2Ij9zqVhrf2gvunz1tkq9y9pOnIF9k7vN1EZiuCKZdptO6sLeeBdd5rl8qoWpFC819NqyxcIdQ_u8B8_aCfmvVu1IMjPgnnbfuJm7bSEwGyv5oRxpOt6c3BA2JiHzwl9QQSJbuCTA&sig=Cg0ArKJSzFhpz_4ImeCsEAE&uach_m=%5BUACH%5D&urlfix=1&adurl='; } try{""} catch (err){} }();