Air doesn’t always stay put! Learn how your simple steps to improve Colorado’s air have positive benefits worldwide, and where else air pollution is an issue.
Learn the differences between wildfire smoke and ozone air pollution, how to effectively deal with each, and what to do when they occur in the Front Range at the same time.
If you or a loved one lives with asthma or similar respiratory conditions, this World Asthma Day, take a moment to learn about the impacts of ground-level ozone in Colorado.
When it comes to acting on air quality, some days are more important than others! Sign up for summer ozone alerts to know when it matters most to take simple steps for better air in your community. Our timely text and email alerts can also help you protect your health.
(function () {
// Toggle this to true while testing if you want console logs
var DEBUG = false;
var HP_SELECTORS = [
'input[name="form_fields[field_41e2746]"]',
'textarea[name="form_fields[field_41e2746]"]',
'input[name="field_41e2746"]',
'textarea[name="field_41e2746"]'
];
function log() { if (DEBUG && window.console) console.log.apply(console, arguments); }
function getHoneypot(form) {
for (var i = 0; i < HP_SELECTORS.length; i++) {
var el = form.querySelector(HP_SELECTORS[i]);
if (el) return el;
}
return null;
}
function isFilled(el) {
return el && typeof el.value === 'string' && el.value.trim() !== '';
}
function fakeSuccess(form) {
try {
var msg = document.createElement('div');
msg.className = 'elementor-message elementor-message-success';
msg.textContent = 'Your form has been submitted successfully.';
// Hide the form and show fake confirmation
form.style.display = 'none';
form.insertAdjacentElement('afterend', msg);
} catch (e) {
log('Fake success render error:', e);
}
}
function shouldBlock(form) {
if (!form || !form.classList || !form.classList.contains('elementor-form')) return false;
var hp = getHoneypot(form);
if (!hp) { log('Honeypot not found in form:', form); return false; }
var filled = isFilled(hp);
log('Honeypot value check:', filled ? 'FILLED' : 'empty', hp);
return filled;
}
// Intercept ALL submits (capture phase catches it before Elementor)
document.addEventListener('submit', function (e) {
var form = e.target;
if (shouldBlock(form)) {
e.preventDefault();
if (e.stopImmediatePropagation) e.stopImmediatePropagation();
e.stopPropagation();
fakeSuccess(form);
log('Submission blocked at submit event.');
}
}, true);
// Belt & suspenders: intercept submit button clicks too
document.addEventListener('click', function (e) {
var btn = e.target && e.target.closest && e.target.closest('button[type="submit"], input[type="submit"]');
if (!btn) return;
var form = btn.form;
if (shouldBlock(form)) {
e.preventDefault();
if (e.stopImmediatePropagation) e.stopImmediatePropagation();
e.stopPropagation();
fakeSuccess(form);
log('Submission blocked at click event.');
}
}, true);
})();