PageSourceSearch

https://www.cdc.gov/TemplatePackage/5.0/js/modules/banner.js

js cdc.gov collected 2026-09-24 05:15:45 UTC 13,289 bytes, 187 lines download raw bytes

1/**
2 * @version 4.26.7
3 * Date: 2026-08-17T13:38:07.992Z
4 */
5"use strict";
6
7if (!window.CDC2025BANNER) {
8  (() => {
9    window.CDC2025BANNER = true;
10    const CDC2025Banners = () => {
11      const globalBanner = '';
12      const lang = String(document.documentElement?.lang).includes('es') ? 'es' : 'en';
13      const tpCheck = parseInt(document.querySelector('meta[property="cdc:template_version"]')?.getAttribute('content') || 0);
14      const legacyCheck = parseInt(document.querySelector('meta[name="template.version"]')?.getAttribute('content') || 0);
15      const tp = tpCheck || legacyCheck || 4;
16      const subdomain = String(document.location.hostname).toLowerCase().replace('.cdc.gov', '');
17      const url = String(document.querySelector('link[rel="canonical"]')?.href || location.href).trim().toLowerCase().replace(/[\?\#].*$/, '');
18      const path = url.replace(/^https?:\/\/[^\/]+/, '');
19
20      // prep banner
21      const style = document.createElement('style');
22      style.setAttribute('data-banner-style', '');
23      style.innerHTML = `
24			.cdc-banner2025 { background: #FEF0C8; padding: 1rem; border-radius: 0.5rem; margin: 0.5rem auto 1rem auto; font-size: 0.9rem; max-width: 1115px; }
25			.cdc-gs202601-banner {
26				background: #FBF0E8;
27				padding: 0.25rem 1rem !important;
28				margin: 0.5rem auto !important;
29				max-width: 900px;
30				border-radius: 0.25rem;
31				font-size: 14px;
32				color: #000;
33				padding: 0.25rem 0.5rem;
34				text-align: left;
35				@media (max-width: 900px) { border-radius: 0; }
36			}
37			.cdc-gs202601-banner p { margin: 0.25rem; line-height: 1.3; font-size: 14px; }
38			.cdc-gs202601-banner a { color: #005EA2; }
39		`;
40      document.head.appendChild(style);
41      const addBanner = bannerVersion => {
42        // build banner
43        const sitename = location.hostname.includes('atsdr') ? 'ATSDR' : 'CDC';
44        let text = `${sitename}'s website is being modified to comply with President Trump's Executive Orders.`;
45        if (2 === bannerVersion) {
46          text = `Per a court order, HHS is required to restore this website as of 11:59PM ET, February 11, 2025.
47				Any information on this page promoting gender ideology is extremely inaccurate and disconnected from the immutable biological reality
48				that there are two sexes, male and female. The Trump Administration rejects gender ideology and condemns the harms it causes to children,
49				by promoting their chemical and surgical mutilation, and to women, by depriving them of their dignity, safety, well-being, and opportunities.
50				This page does not reflect biological reality and therefore the Administration and this Department rejects it.`;
51        }
52        if (3 === bannerVersion) {
53          text = `Per a court order, HHS is required to restore this website as of 11:59PM ET, February 14, 2025.
54				Any information on this page promoting gender ideology is extremely inaccurate and disconnected from the immutable biological reality
55				that there are two sexes, male and female. The Trump Administration rejects gender ideology and condemns the harms it causes to children,
56				by promoting their chemical and surgical mutilation, and to women, by depriving them of their dignity, safety, well-being, and opportunities.
57				This page does not reflect biological reality and therefore the Administration and this Department rejects it.`;
58        }
59        if (4 === bannerVersion) {
60          text = `Per a court order, HHS is required to restore this website to its version as of 12:00 AM on January 29, 2025.
61				Information on this page may be modified and/or removed in the future subject to the terms of the court’s order and
62				implemented consistent with applicable law. Any information on this page promoting gender ideology is extremely
63				inaccurate and disconnected from truth. The Trump Administration rejects gender ideology due to the harms and
64				divisiveness it causes. This page does not reflect reality and therefore the Administration and this Department reject it.`;
65        }
66        if (5 === bannerVersion) {
67          text = `Consistent with Executive Order (E.O.) 14217, entitled "Commencing the Reduction of the Federal Bureaucracy,"
68				the CLIAC was declared terminated by the Secretary of HHS on March 31, 2025. The information on this page is no longer being updated.`;
69        }
70        if (7 === bannerVersion) {
71          text = `The content of this page is being revised to reflect <a href="https://www.cdc.gov/vaccines/imz-schedules/child-easyread.html" target="_blank" rel="noopener noreferrer">updated childhood immunization recommendations</a> recently made by the CDC.`;
72        }
73        // 20260409: ACIP update adults
74        if (8 === bannerVersion) {
75          text = `Pursuant to the preliminary order issued on March 16, 2026, in American Academy of Pediatrics et al. v. Kennedy et al., No. 1:25-cv-11916 (D. Mass.), which stayed all votes taken by the ACIP during its June, September and December 2025 meetings, and further stayed the Acting CDC Director’s January 5, 2026 Decision Memo revising the CDC’s childhood immunization schedule, the July 2, 2025 immunization schedule posted here is the current CDC Adult Immunization Schedule by Age for Healthcare Professionals.`;
76        }
77        // 20260409: ACIP update children
78        if (9 === bannerVersion) {
79          text = `Pursuant to the preliminary order issued on March 16, 2026, in American Academy of Pediatrics et al. v. Kennedy et al., No. 1:25-cv-11916 (D. Mass.), which stayed all votes taken by the ACIP during its June, September and December 2025 meetings, and further stayed the Acting CDC Director’s January 5, 2026 Decision Memo revising the CDC’s childhood immunization schedule, the July 2, 2025 immunization schedule posted here is the current CDC Child and Adolescent Immunization Schedule by Age for Healthcare Professionals.`;
80        }
81        // 20260427: ACIP banner variant
82        if (10 === bannerVersion) {
83          text = `Pursuant to the preliminary order issued on March 16, 2026, in American Academy of Pediatrics et al. v. Kennedy et al., No. 1:25-cv-11916 (D. Mass.), which stayed all votes taken by the ACIP during its June, September and December 2025 meetings, and further stayed the Acting CDC Director’s January 5, 2026 Decision Memo revising the CDC’s childhood immunization schedule, the July 2, 2025 immunization schedule (as amended on April 27, 2026 to add the ACIP's April 2025 RSV recommendation as adopted by HHS) posted here is the current CDC Adult Immunization Schedule by Age for Healthcare Professionals.`;
84        }
85        // 20260430: ACIP banner variants for consumers
86        if (11 === bannerVersion) {
87          text = `Pursuant to the preliminary order issued on March 16, 2026, in American Academy of Pediatrics et al. v. Kennedy et al., No. 1:25-cv-11916 (D. Mass.), which stayed all votes taken by the ACIP during its June, September and December 2025 meetings, and further stayed the Acting CDC Director’s January 5, 2026 Decision Memo revising the CDC’s childhood immunization schedule, the July 2, 2025 immunization schedule posted here are the current CDC Childhood Immunization Schedules by Age for Consumers.`;
88        }
89        if (12 === bannerVersion) {
90          text = `Pursuant to the preliminary order issued on March 16, 2026, in American Academy of Pediatrics et al. v. Kennedy et al., No. 1:25-cv-11916 (D. Mass.), which stayed all votes taken by the ACIP during its June, September and December 2025 meetings, and further stayed the Acting CDC Director’s January 5, 2026 Decision Memo revising the CDC’s childhood immunization schedule, the July 2, 2025 immunization schedules (as amended on April 27, 2026 to add the ACIP's April 2025 RSV recommendation for vaccination of high risk adults 50 – 59 as adopted by HHS) posted here are the current CDC Childhood and Adult Immunization Schedules by Age for Consumers.`;
91        }
92        if (13 === bannerVersion) {
93          text = `Pursuant to the preliminary order issued on March 16, 2026, in American Academy of Pediatrics et al. v. Kennedy et al., No. 1:25-cv-11916 (D. Mass.), which stayed all votes taken by the ACIP during its June, September and December 2025 meetings, and further stayed the Acting CDC Director’s January 5, 2026 Decision Memo revising the CDC’s childhood immunization schedule, the July 2, 2025 immunization schedule (as amended on April 27, 2026 to add the ACIP's April 2025 RSV recommendation for vaccination of high risk adults 50 – 59 as adopted by HHS) posted here is the current CDC Adult Immunization Schedule by Age for Consumers.`;
94        }
95        const banner = document.createElement('div');
96        banner.setAttribute('class', 'cdc-banner2025');
97        banner.dataset.banner = bannerVersion;
98        banner.innerHTML = text;
99        if (document.querySelector('html.cdc-page-type--2024home')) {
100          banner.style = 'padding-left:1rem;padding-right:1rem;';
101          document.querySelector('.official-notice')?.insertAdjacentElement('afterend', banner);
102        } else if (4 === tp) {
103          document.querySelector('main')?.prepend(banner);
104        } else if (2 === tp) {
105          document.querySelector('#content')?.insertAdjacentElement('beforebegin', banner);
106        } else {
107          document.querySelector('.cdc-page-title')?.insertAdjacentElement('beforebegin', banner);
108        }
109      };
110      const configHost = String(location.hostname).includes('dev') ? 'wwwdev.cdc.gov' : 'www.cdc.gov';
111      fetch(`https://${configHost}/config/banner.txt?v2`).then(response => response.text()).then(doc => {
112        const checks = String(doc).trim().split(/\s+/);
113        let bannerVersion = 1;
114        for (let i in checks) {
115          let check = String(checks[i]).trim().toLowerCase();
116          if (check.match(/^\d+$/)) {
117            bannerVersion = parseInt(check);
118            continue;
119          }
120          if (0 === path.indexOf(check) || 0 === url.indexOf(check)) {
121            // bannerversion can be 0 for up top skips
122            if (bannerVersion) {
123              addBanner(bannerVersion);
124            }
125            break;
126          }
127        }
128      });
129
130      // global banner
131      (() => {
132        let msg = String(globalBanner || '').trim();
133        if (!msg) {
134          return;
135        }
136        const banner = document.createElement('div');
137        banner.setAttribute('class', 'cdc-gs202601-banner');
138        banner.innerHTML = `<p>${msg}</p>`;
139        const subdomains = 'localhost|nchsdata|icd10cmtool|phinvads|ndc.services|mets|data|wwwdev|wwwn|www|wwwncdev|wwwnctest|wwwnc|atsdrdev|www.atsdr|wonder|search|dataset|communitycountsdataviz'.split('|');
140        let display = subdomains.includes(subdomain);
141
142        // exceptions
143        const exceptions = ['/vessel-sanitation/', '/measles/data-research/index.html', '/wtc/', '/niosh/rap/', '/niosh/cwhsp/', '/niosh/ocas/', '/cfa-qualitative-assessments/php/php/data-research/evd2025-riskassessment.html', '/cfa-qualitative-assessments/php/data-research/eboladrc2025-scenarioassessment.html', '/cfa-modeling-and-forecasting/measles-outbreak-simulator/index.html'];
144        exceptions.forEach(exc => {
145          if (0 === path.indexOf(exc) || 0 === url.indexOf(exc)) {
146            display = false;
147          }
148        });
149        if (display) {
150          // append
151          switch (subdomain) {
152            case 'communitycountsdataviz':
153              return document.querySelector('#appTemplate')?.prepend(banner);
154            case 'data':
155              return document.querySelector('#noticeContainer')?.append(banner);
156            case 'mets':
157              return document.querySelector('#page_banner')?.insertAdjacentElement('afterend', banner);
158            case 'wwwn':
159              return document.querySelector('.container-fluid.site-title')?.insertAdjacentElement('afterend', banner);
160            case 'wwwnc':
161              return document.querySelector('.container-fluid.header-wrapper')?.insertAdjacentElement('afterend', banner);
162            case 'icd10cmtool':
163              return document.querySelector('nav.navbar')?.insertAdjacentElement('beforebegin', banner);
164            case 'nchsdata':
165              return document.querySelector('#root')?.insertAdjacentElement('beforebegin', banner);
166            case 'wonder':
167              return document.querySelector('.container-fluid.site-title')?.insertAdjacentElement('afterend', banner);
168            default:
169              // other subdomains
170              if (document.querySelector('.cdc-header-official-notice')) {
171                document.querySelector('.cdc-header-official-notice').insertAdjacentElement('afterend', banner);
172              } else if (document.querySelector('header.official-notice')) {
173                document.querySelector('header.official-notice').insertAdjacentElement('afterend', banner);
174              } else {
175                document.querySelector('.cdc-page-banner')?.insertAdjacentElement('afterend', banner);
176              }
177          }
178        }
179      })();
180    };
181    if (document.readyState === 'complete' || document.readyState === 'interactive') {
182      CDC2025Banners();
183    } else {
184      document.addEventListener('DOMContentLoaded', () => CDC2025Banners());
185    }
186  })();
187}

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.