';
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);
}
});
});
I will be covering the Obamacare speech tonight, in partnership with public radio's Capitol News Connection. CNC provides localized Washington, D.C. coverage to public radio stations and is, like InvestigateWest, a founding member of the national Investigative News Network. Anne-Marie Taylor of InvestigateWest will be there as a working photojournalist, to bring you literally an insider view of what's happening.
Since we focus on the environment, health and social justice, it's a natural for us to cover the speech. And given the tight realities of modern newsrooms, it's important that InvestigateWest also helps our partners cover these important issues.
So email, comment or tweet me your questions about the speech, so I can get you some answers. You can also go to AskYourLawmaker.org, CNC's site for crowdsourcing questions.
So Obamacare, what do you want to know?