This photo provided by the U.S. Centers for Disease Control shows an adult female lone star tick crawling on a blade of grass in 2023. (Lauren Bishop/CDC via AP)
By MATTHEW PERRONE Updated [hour]:[minute] [AMPM] [timezone], [monthFull] [day], [year] Add AP News on Google Add AP News as your preferred source to see more of our stories on Google. Share' + 'Please note that comments are not moderated immediately — every post is reviewed before appearing publicly to ensure it meets our community guidelines. This means there may be a delay before your comment is visible.'; header.parentNode.insertBefore(notice, header.nextSibling); return true; } function hideFloatingBellButton() { document.querySelectorAll('.vf-tray-trigger--floating').forEach((btn) => { btn.style.display = 'none'; }); } function moveTrendingAboveCommentsFooter() { const trendingHost = document.getElementById('ap-trending-host'); if (!trendingHost || trendingHost.dataset.moved === '1') return; const footer = document.querySelector('#vf-conversations > div > section > div > footer'); if (footer && footer.parentNode) { footer.parentNode.insertBefore(trendingHost, footer); trendingHost.dataset.moved = '1'; } } function onCommentingLoaded() { const container = document.getElementById('ap-comments'); if (!container) return; injectNoticeInContainer(container); replaceBellIconInNav(container); moveTrendingAboveCommentsFooter(); } function wireViafoura() { if (window.vf && typeof window.vf.$subscribe === 'function') { window.vf.$subscribe('commenting', 'loaded', onCommentingLoaded); } } /* ----------------- DARK THEME HANDLING ----------------- */ function isDarkColor(rgb) { if (!rgb) return false; const m = rgb.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/i); if (!m) return false; const r = +m[1], g = +m[2], b = +m[3]; const lum = (0.2126*r + 0.7152*g + 0.0722*b) / 255; return lum < 0.5; } function shouldUseDarkTheme() { if (document.querySelector('[data-featured-type="bgBlackTextWhite"]')) return true; const carrier = document.querySelector('[data-featured-type]') || document.body || document.documentElement; const bg = carrier ? getComputedStyle(carrier).backgroundColor : ''; return isDarkColor(bg); } function getEffectiveDarkBg() { const carrier = document.querySelector('[data-featured-type="bgBlackTextWhite"]') || document.body || document.documentElement; const bg = carrier ? getComputedStyle(carrier).backgroundColor : ''; return bg && bg !== 'rgba(0, 0, 0, 0)' && bg !== 'transparent' ? bg : '#0b0b0b'; } // NEW: normalize dropdown/menu background in dark mode (solid dark, non-transparent) function fixDarkModeDropdowns() { if (!shouldUseDarkTheme()) return; const bg = getEffectiveDarkBg(); const text = 'rgba(255,255,255,0.85)'; const dropdowns = document.querySelectorAll( '[role="menu"],[role="listbox"],.vf-dropdown__menu,.vf-select__menu' ); dropdowns.forEach((el) => { const cs = getComputedStyle(el); const bgColor = cs.backgroundColor; // Only fix ones that are effectively transparent / not already dark if ( bgColor === 'rgba(0, 0, 0, 0)' || bgColor === 'transparent' ) { el.style.setProperty('--default-color', bg); el.style.setProperty('--background-color', bg); el.style.setProperty('--light-text-on-default-color', text); el.style.setProperty('--dark-text-on-default-color', '#ffffff'); el.style.setProperty('--light-text-on-background-color', text); el.style.setProperty('--dark-text-on-background-color', '#ffffff'); el.style.backgroundColor = bg; el.style.color = text; } }); } function applyDarkThemeIfNeeded() { const container = document.getElementById('ap-comments'); if (!container) return; const useDark = shouldUseDarkTheme(); const bg = useDark ? getEffectiveDarkBg() : null; container.classList.toggle('ap-comments--dark', useDark); if (useDark) { container.style.setProperty('--apc-bg', bg); container.style.setProperty('--apc-text', '#e8e8e8'); container.style.setProperty('--apc-link', '#9ecbff'); container.setAttribute('data-theme', 'dark'); container.style.setProperty('background', 'var(--apc-bg)', 'important'); // Normalize Viafoura / AP-style variables INSIDE the comments container container.style.setProperty('--default-color', bg); container.style.setProperty('--background-color', bg); container.style.setProperty('--light-text-on-default-color', 'rgba(255, 255, 255, 0.8)'); container.style.setProperty('--dark-text-on-default-color', '#ffffff'); container.style.setProperty('--light-text-on-background-color', 'rgba(255, 255, 255, 0.8)'); container.style.setProperty('--dark-text-on-background-color', '#ffffff'); } else { container.removeAttribute('data-theme'); container.style.removeProperty('background'); [ '--apc-bg','--apc-text','--apc-link', '--default-color','--background-color', '--light-text-on-default-color','--dark-text-on-default-color', '--light-text-on-background-color','--dark-text-on-background-color' ].forEach(v => container.style.removeProperty(v)); } const elConv = document.getElementById('vf-conv'); const elTrend = document.getElementById('vf-trending'); const realConv = document.querySelector('#vf-conversations'); const realTrend = document.querySelector('#vf-trending-articles'); [elConv, elTrend].forEach(el => { if (!el) return; if (useDark) { el.setAttribute('data-vf-theme', 'dark'); el.setAttribute('vf-theme', 'dark'); el.setAttribute('theme', 'dark'); el.style.removeProperty('background'); el.style.color = 'var(--apc-text)'; } else { ['data-vf-theme','vf-theme','theme'].forEach(a => el.removeAttribute(a)); el.style.removeProperty('background'); el.style.removeProperty('color'); } }); [realConv, realTrend].forEach((root) => { if (!root) return; if (useDark) { root.classList.add('ap-vf-dark'); root.setAttribute('data-theme', 'dark'); } else { root.classList.remove('ap-vf-dark'); root.removeAttribute('data-theme'); } }); // fix dropdowns / sort menus any time theme is recalculated if (useDark) { fixDarkModeDropdowns(); } } const vfObserver = new MutationObserver(() => { applyDarkThemeIfNeeded(); }); (function bootComments() { const container = document.getElementById('ap-comments'); if (!container) return; // Initial theme & dropdown fix applyDarkThemeIfNeeded(); // --------- NEW: Global block tags (e.g. no_comment) ---------- // If the page has ANY of the COMMENT_BLOCK_TAGS, hide comments on all stories. if (pageHasBlockedTag(COMMENT_BLOCK_TAGS)) { container.innerHTML = ''; container.classList.remove('viafoura'); container.id = 'comments-hidden'; hideFloatingBellButton(); return; } // --------- NEW: Section-specific logic (World News) ---------- const section = getPageSection(); // Only apply this rule if the story is in World News. if (section === WORLD_NEWS_SECTION) { // If a World News story has any tag in WORLD_NEWS_EXCLUSION_TAGS (e.g. Israel), // hide the embed. Other sections with those tags are still allowed. if (pageHasBlockedTag(WORLD_NEWS_EXCLUSION_TAGS)) { container.innerHTML = ''; container.classList.remove('viafoura'); container.id = 'comments-hidden'; hideFloatingBellButton(); return; } } // --------- Existing Viafoura boot logic ---------- if (!window.vf && !document.querySelector('script[src*="cdn.viafoura.net/entry/index.js"]')) { const s = document.createElement('script'); s.async = true; s.src = '//cdn.viafoura.net/entry/index.js'; document.head.appendChild(s); } if (document.readyState === 'complete' || document.readyState === 'interactive') { wireViafoura(); } else { document.addEventListener('DOMContentLoaded', wireViafoura); } (function startCappedRetry() { let tries = 0; const maxTries = 120; const iv = setInterval(() => { injectNoticeInContainer(container); replaceBellIconInNav(container); hideFloatingBellButton(); moveTrendingAboveCommentsFooter(); applyDarkThemeIfNeeded(); if (++tries >= maxTries) clearInterval(iv); }, 100); })(); try { vfObserver.observe(container, { childList: true, subtree: true }); } catch (e) {} })(); .vf-guidelines-notice { font-family: var(--primary-font, 'AP', sans-serif); font-size: 1.0em; color: #666; margin: 0 0 10px 0; padding-left: 4px; opacity: 0.85; line-height: 1.4; } .vf-guidelines-notice a { text-decoration: underline; font-weight: 500; } #vf-trending-articles > div > div > h2 { font-size: 14px !important; line-height: 1.2; text-transform: uppercase; } #vf-trending-articles p.vf-trending-article__comment-count { font-size: 16px !important; line-height: 1.1; } #comments-hidden { display: none; } /* ---------- Dark theme for AP comments ---------- */ #ap-comments.ap-comments--dark { --apc-bg: #0b0b0b; --apc-text: #e8e8e8; --apc-muted: #a7a7a7; --apc-border: #2a2a2a; --apc-link: #9ecbff; background: var(--apc-bg) !important; color: var(--apc-text); color-scheme: dark; } /* DO NOT touch every descendant’s colors anymore – that was killing badges/icons */ #ap-comments.ap-comments--dark a { color: var(--apc-link); } #ap-comments.ap-comments--dark a:hover, #ap-comments.ap-comments--dark a:focus { text-decoration: underline; } #ap-comments.ap-comments--dark hr, #ap-comments.ap-comments--dark .vf-divider, #ap-comments.ap-comments--dark .vf-comment + .vf-comment, #ap-comments.ap-comments--dark .vf-card { border-color: var(--apc-border) !important; } #ap-comments.ap-comments--dark .vf-guidelines-notice { color: var(--apc-muted); } #ap-comments.ap-comments--dark #vf-trending-articles > div > div > h2, #ap-comments.ap-comments--dark p.vf-trending-article__comment-count { color: var(--apc-text) !important; } #ap-comments.ap-comments--dark #vf-conversations.ap-vf-dark, #ap-comments.ap-comments--dark #vf-trending-articles.ap-vf-dark { background: transparent !important; color: var(--apc-text) !important; color-scheme: dark; } #ap-comments.ap-comments--dark #vf-conversations, #ap-comments.ap-comments--dark #vf-trending-articles { background-color: var(--apc-bg) !important; } /* Removed “*:not(input)” background/color override so badges keep their own colors */ #ap-comments.ap-comments--dark #vf-conversations section, #ap-comments.ap-comments--dark #vf-conversations article, #ap-comments.ap-comments--dark #vf-conversations header, #ap-comments.ap-comments--dark #vf-conversations footer, #ap-comments.ap-comments--dark #vf-conversations .vf-card, #ap-comments.ap-comments--dark #vf-trending-articles section, #ap-comments.ap-comments--dark #vf-trending-articles article, #ap-comments.ap-comments--dark #vf-trending-articles header, #ap-comments.ap-comments--dark #vf-trending-articles footer, #ap-comments.ap-comments--dark #vf-trending-articles .vf-card { background-color: transparent !important; border-color: var(--apc-border) !important; } #ap-comments.ap-comments--dark .vf-content-editor-form, #ap-comments.ap-comments--dark .vf-editor-area { background-color: rgba(255,255,255,0.08) !important; border: 1px solid rgba(255,255,255,0.24) !important; border-radius: 6px !important; } #ap-comments.ap-comments--dark .vf-content-editor-input { color: var(--apc-text) !important; caret-color: var(--apc-text) !important; } #ap-comments.ap-comments--dark .vf-content-editor-input::placeholder { color: #cfcfcf !important; opacity: 1 !important; } #ap-comments.ap-comments--dark .vf-content-editor-input:focus, #ap-comments.ap-comments--dark .vf-editor-area:focus-within { outline: none !important; border-color: rgba(255,255,255,0.36) !important; box-shadow: 0 0 0 2px rgba(255,255,255,0.12) !important; } #ap-comments.ap-comments--dark .vf-dropdown-button, #ap-comments.ap-comments--dark .vf-dropdown-button__text { background-color: transparent !important; color: var(--apc-text) !important; border-color: var(--apc-border) !important; } #ap-comments.ap-comments--dark .vf-dropdown-button:hover, #ap-comments.ap-comments--dark .vf-dropdown-button:focus { background-color: rgba(255,255,255,0.06) !important; } /* Only tweak the swapped bell icon in dark mode; leave other badges alone */ #ap-comments.ap-comments--dark .vf-tray-trigger img[data-ap-bell="1"] { filter: invert(1) hue-rotate(180deg) brightness(1.1); opacity: 1; mix-blend-mode: normal; } /* Ban message styles */ .vf-ban-container { margin: 10px 0 15px; padding: 10px 12px; border-radius: 4px; background-color: #fff3cd; border: 1px solid #ffeeba; } .vf-ban-message { font-family: var(--primary-font, 'AP', sans-serif); font-size: 0.95em; color: #856404; display: flex; align-items: center; flex-wrap: wrap; } .vf-ban-icon { margin-right: 8px; } .vf-ban-tooltip { margin-left: 4px; font-weight: 600; text-decoration: underline; cursor: pointer; position: relative; } .vf-ban-tooltip-content { display: none; position: absolute; z-index: 9999; top: 120%; left: 0; width: 260px; padding: 8px 10px; background: #fff; border: 1px solid #ccc; border-radius: 4px; font-weight: 400; text-decoration: none; color: #333; box-shadow: 0 2px 4px rgba(0,0,0,0.1); } .vf-ban-tooltip:hover .vf-ban-tooltip-content { display: block; } (function(d, b) { const path = window.location.pathname || ''; const lastPart = path.split('/').pop() || ''; const articleId = (/([a-zA-Z0-9]{10,})$/.exec(lastPart)?.[1]) || 'fallback'; const primisUrl = `https://live.primis.tech/live/liveView.php?s=119023&subId=${encodeURIComponent(articleId)}&playerApiId=AP_MAIN_PLAYER`; const primisElmt = d.createElement('script'); primisElmt.type = 'text/javascript'; primisElmt.async = true; primisElmt.src = primisUrl; const elmtInterval = setInterval(function() { const mElmt = d.getElementById(b); if (mElmt) { mElmt.parentNode.insertBefore(primisElmt, mElmt.nextSibling); mElmt.parentNode.removeChild(mElmt); clearInterval(elmtInterval); setTimeout(() => { primisElmt.setAttribute('data-ot-ignore', ''); }, 0); } }, 100); })(document, 'widgetLoaded');
Comments (0)
No comments yet. Be the first!