';
document.querySelector('#copytext').value = textContent;
modal.showModal();
});
// Modal close functionality
const modal = document.querySelector('.republish-modal');
const closeBtn = document.querySelector('.republish-modal-close');
// Close button click
closeBtn.addEventListener('click', function() {
modal.close();
});
// Close on backdrop click
modal.addEventListener('click', function(e) {
if (e.target === modal) {
modal.close();
}
});
// Close on ESC key (this is usually built-in, but adding for safety)
modal.addEventListener('keydown', function(e) {
if (e.key === 'Escape') {
modal.close();
}
});
// Copy text button functionality
document.querySelector('.copy-text-button').addEventListener('click', async function() {
const textarea = document.querySelector('#copytext');
const text = textarea.value;
try {
// Try modern Clipboard API first
if (navigator.clipboard && window.isSecureContext) {
await navigator.clipboard.writeText(text);
this.textContent = 'Copied!';
} else {
// Fallback for older browsers
textarea.select();
document.execCommand('copy');
this.textContent = 'Copied!';
}
// Reset button text after 2 seconds
setTimeout(() => {
this.textContent = 'Copy text';
}, 2000);
} catch (err) {
console.error('Failed to copy text: ', err);
// Fallback to selection if copying fails
textarea.select();
this.textContent = 'Text selected';
setTimeout(() => {
this.textContent = 'Copy text';
}, 2000);
}
});
});
We’re happy to report that InvestigateWest’s work alongside KING 5 on our just-released “Exhausted At School” project has prompted action by Seattle School District officials to protect students from the toxic air pollution emanating from traffic along big roads.
District spokesperson Tom Redman said the district just launched a new policy in response to inquiries from InvestigateWest and KING 5 concerning air quality. Principals in the coming year will be sent a daily notice of the regional air quality to help them decide whether its necessary to keep kids inside for recess. In general, air quality reports can indicate high ozone counts, more common on hot days, or higher-than-normal levels of toxic soot from traffic and wood smoke, which hang in the air more on colder days.
The school we focused on in the top of our story, John Marshall Junior High, currently undergoing renovations, is also getting a new look from the Seattle School District. In an email, Redman told KING 5's Chris Ingalls:
“We are looking at our options to install an upgrade to the air filtration system into Phase II of the John Marshall reopening project. We have time to incorporate this scope of work. We have asked our Engineer to work up construction estimates and a design modification proposal.”
Watch this space as InvestigateWest and KING 5 continue to follow the story.