';
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);
}
});
});
Folks, it had been my intention to write tonight about the challenge to the feds' plans for Snake-Columbia river operations filed today by salmon advocates. But instead I got wrapped up in a discussion on the Society of Environmental Journalists' listserv about what sociologists should be studying in our realm. Here's what I told my fellow SEJers:
"Sewage disposal: What is our big hangup with composting toilets? Think of the infrastucture repair and construction costs we could save merely by figuring out what to do with our pee and our poop. Night soils were the answer in ancient China -- why not today, here?"
"Stormwater (Our #1 water pollution source! You people listening? Hello? Hello? Is this microphone working?): 1) What is the deal with lawns? Why do we have to have these green expanses surrounding our little castles-sans-moats-and-palace-walls? 2) And why will we not require Low Impact Development, which controls stormwater, costs about the same as regular development, and actually injects some greenery and soft lines into hard urban landscapes? Seriously, think about it: Farmers are the target of a lot of abuse by enviros, and deservedly so in many cases when you experience the foul smells of CAFOs and see the runoff that taints adjacent streams. But if you look at what our urban and suburban lawns and our urban and suburban roads contribute to water pollution, it has to overwhelm the farmers' contribution to water pollution."Readers: The comment section is open for your nominations on this important subject. I was just chewing the fat yesterday with Bill Ruckelshaus, the first administrator of the U.S. Environmental Protection Agency, who now serves as head of the Puget Sound Partnership Leadership Council. We were discussing how sociologists really need to be brought into the solving of environmental problems in a much bigger way than they currently are. Dateline Earth is privileged to enjoy some erudite readers. I'd love to hear your suggestions about how sociology could contribute to a cleaner, safer and more wildlife-friendly world.-- Robert McClure