';
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);
}
});
});
MISSOULA, MT -- The Society of Environmental Journalists annual conference that just wrapped up here proved -- as usual -- a veritable conucopia of interesting information about environmental news.
If you weren't able to go, you might want to nose around. I live-tweeted a few plenaries, as did several other SEJers. You should be able to find most of that by searching for #SEJ, #sej2010 or #sej10.
I highly recommend the unofficial conference blog. I'll shortly be posting my Dateline Earth item there that examines the failings of our $1.5-billion-a-year firefighting effort. Look also for an interesting film by Amy Gahran on the disruption of the food chain in Flathead Lake. Amy also captured the bracing words of Randy Udall on the future of
http://conf.sej.org/2010/10/hedging-and-betting-on-the-tar-sands-future-footprint.html