';
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);
}
});
});
The U.S. Geological Survey released the results to a study yesterday that found mercury contamination in every fish tested in nearly 300 streams across the nation -- one quarter of which exceeded safe mercury levels set by the U.S. Environmental Protection Agency, reported The Seattle Times, among others.
The study, considered one of the most comprehensive to date, pinned atmospheric mercury as the culprit in most streams. While the EPA says that coal-fired power plants are the largest polluter of toxic mercury, some of the most elevated levels were found in Western states, who still bear the toxic scars of decades of mercury and gold mining.
This study comes at an interesting time. Alaska's Kensington gold mine just recently received the final go-ahead as it prepares to dump mercury and various other mine waste into the nearby Lower Slate Lake. And Matthew Preusch of the Oregonian reports that Oregon is pairing up with one of the nation's most notorious airborne mercury polluter, Ash Grove Cement Co. While Oregon's top environmental agency is trying to cut the cement plant's mercury pollution by 75 percent -- they also are asking that the plant be exempt from the EPA's new, more stringent limits on mercury emissions.