GETTY IMAGES/Carlo Allegri
The sun sets on a flooded steet after Hurricance Wilma hit earlier in the morning Oct. 24, 2005 in Naples, Fla. Wilma slammed into the South Florida coastline as a strong Category 3 hurricane. The day ended with bright sunshine and cooling air as the temperature was expected to fall to 50 degrees overnight.
AP Photo/NOAA
In this National Oceanic and Atmospheric Administration color-enhanced satellite image, the center of Hurricane Wilma is shown about 100 miles west of Key West, Fla., at about 11:45 p.m., Oct. 23, 2005, and moving northeast towards the southwest Florida coastline.
AP Photo/NOAA
In this National Oceanic and Atmospheric Administration color-enhanced satellite image, the center of Hurricane Wilma is shown about 70 miles southwest of Naples, Fla., at about 3:45 a.m., Oct. 24, 2005, and moving northeast towards the southwest Florida coastline.
AP Photo/NOAA
A satellite photo of Wilma coming ashore Monday morning, Oct. 24, 2005.
AP Photo/Tampa Tribune
Billy Summer, left, Joanne Summer, center, and her brother Bill Summer, volunteers with the San Carlos Island community disaster recovery survey, look at the damage to the area around their home on the outskirts of Fort Myers after Hurricane Wilma hit, Monday, Oct. 24, 2005.
AP Photo/J. Pat Carter
Friends of Jeannie Berg, back center, help to rescue goods from her mobile home in Dania Beach, Fla., Monday, Oct. 24, 2005 after Hurricane Wilma moved through the area. Wilma plowed into southwest Florida early Monday with howling 125 mph winds and dashed across the state to the Miami-Fort Lauderdale area, blowing out windows in skyscrapers, peeling away roofs and knocking out power to millions of people.
AP
High winds from Hurricane Wilma blow a palm tree early Oct. 24, 2005 in Pembroke Pines, Fla.
AP
A tree is felled by winds with gusts up to 114 miles per hour race around a home in Pembroke Pines, Fla., early Oct. 24, 2005 as Hurricane Wilma races across the state.
AP
A small shed is blown across a road by the winds of Hurricane Wilma Oct. 24, 2005 in downtown Naples, Fla.
AP
Parts of a roof lie on the sidewalk as trees sway in the winds of Hurricane Wilma Oct. 24, 2005 in downtown Naples, Fla.
AP Photo/Julie Jacobson
An SUV passes through flooding in downtown Naples, Fla. as Hurricane Wilma passes over the city early Monday, Oct. 24, 2005.
STAN HONDA/AFP/Getty Images
Palm trees at a hotel bend in the fierce winds Oct. 24, 2005, as Hurricane Wilma slams into Naples, Fla.
AP
A doll is seen strapped to a palm tree battered by winds from Hurricane Wilma Oct. 24, 2005 in downtown Naples, Fla.
AP
Storm clouds move over a small island outside Islamorada, Fla., late Oct. 23, 2005, as Hurricane Wilma moves towards the Florida Keys.
AP/Key West Citizen
Artist Tony Gregory and his wife, Christine, sign their latest piece of impromptu art on the hurricane shutters at the Art Attack gallery, Oct. 23, 2005, in Key West, Fla., as the first bands of Hurricane Wilma reach Florida.
GETTY IMAGES/Chris Hondros
Evacuees settle in tents on the floor of Germain Arena, a sports stadium being used as a hurricane shelter, Oct. 23, 2005 near Ft. Myers in Estero, Fla.
AP Photo/The News-Press
Nataly Rosario, 19, comforts her 4-month-old son, Bruno Jovanny, at the Mariner Middle School hurricane shelter Oct. 23, 2005, in Cape Coral, Fla. Rosario and her family checked into the shelter Sunday afternoon as Hurricane Wilma approached the Florida coast.
GETTY IMAGES/Carlo Allegri
A sign announces the closure of the Naples (Fla.) Pier in advance of the arrival of Hurricane Wilma Oct. 23, 2005.
AP
Route 1, the highway to the Florida Keys, is empty of traffic as the illuminated road sign announces that a mandatory evacuation is in order late Oct. 23, 2005, in Homestead, Fla., as Hurricane Wilma moved towards the area.
const link = doc.createElement('link');
link.rel = 'stylesheet';
link.href = '/fly/fly/bundles/cbsnewscontent/css/cmp-banner.min.css?v=50747257b890e014813016b79ece0fb2';
doc.head.appendChild(link);
doc.body.innerHTML = CONSENT_MESSAGE;
} else {
el.insertAdjacentHTML('afterend', CONSENT_MESSAGE);
}
});
}
function hidePrivacyMessage() {
// Remove from the main document
document.querySelectorAll(`.${CONSENT_MESSAGE_CLASS}`).forEach(el => el.remove());
// Remove from inside any iframes
document.querySelectorAll('iframe').forEach(iframe => {
const doc = iframe.contentDocument || iframe.contentWindow.document;
doc.querySelectorAll(`.${CONSENT_MESSAGE_CLASS}`).forEach(el => el.remove());
});
}
function activateGatedScripts() {
// Handle both new format (cmp-gated-script) and old OneTrust/Ketch format (optanon-category-4)
const gatedScripts = Array.from(document.querySelectorAll('script.cmp-gated-script, script.optanon-category-4'));
// Activate scripts sequentially with a small delay to avoid timing issues
let delay = 0;
gatedScripts.forEach(function(placeholder, index) {
setTimeout(function() {
// Skip if already processed
if (placeholder.hasAttribute('data-cmp-processed')) {
return;
}
placeholder.setAttribute('data-cmp-processed', 'true');
const newScript = document.createElement('script');
newScript.type = 'text/javascript';
// Try new format first (data-cmp-src), then fall back to old format (data-src)
const src = placeholder.getAttribute('data-cmp-src') || placeholder.getAttribute('data-src');
if (src) {
newScript.src = src;
} else if (placeholder.textContent) {
// Inline script - just copy the content
newScript.textContent = placeholder.textContent;
}
// Handle new format attributes (data-cmp-attrs) - for both inline and external scripts
const attrs = placeholder.getAttribute('data-cmp-attrs');
if (attrs) {
const tempDiv = document.createElement('div');
tempDiv.innerHTML = '
<\/div>';
const tempAttrs = tempDiv.firstChild.attributes;
for (let i = 0; i < tempAttrs.length; i++) {
// For external scripts, allow defer/async. For inline scripts, skip them (not valid)
if (src || (tempAttrs[i].name !== 'async' && tempAttrs[i].name !== 'defer')) {
newScript.setAttribute(tempAttrs[i].name, tempAttrs[i].value);
}
}
}
// Copy other attributes from old OneTrust format
for (let i = 0; i < placeholder.attributes.length; i++) {
const attr = placeholder.attributes[i];
// Skip attributes we've already handled or don't want to copy
if (!['class', 'data-src', 'data-type', 'data-cmp-src', 'data-cmp-attrs', 'data-cmp-processed', 'type', 'async', 'defer', 'src'].includes(attr.name)) {
newScript.setAttribute(attr.name, attr.value);
}
}
placeholder.parentNode.replaceChild(newScript, placeholder);
// If external script, manually trigger window.onload handlers after it loads
// This handles widgets that use window.onload for initialization
if (src) {
newScript.addEventListener('load', function() {
// If page already loaded and script set a new onload handler, trigger it
if (document.readyState === 'complete' && window.onload) {
const originalOnload = window.onload;
window.onload = null; // Clear temporarily to prevent loops
originalOnload(); // Execute the handler
}
});
}
}, delay);
delay += 500; // 500ms delay between each script to allow full loading
});
}
cbsoptanon.onScriptsReady(function(cmp) {
cmp.ot.targetingAllowed(function(allowed) {
if (!allowed) {
showPrivacyMessage();
} else {
activateGatedScripts();
}
});
cmp.ot.awaitInitialConsent(function(consent_model) {
cmp.ot.addOnConsentChangedHandler(function() {
cmp.ot.targetingAllowed(function(allowed) {
if (allowed) {
hidePrivacyMessage();
activateGatedScripts();
} else {
showPrivacyMessage();
}
});
});
});
});