';
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);
}
});
});
A rule banning mining, logging and new road construction on nearly 40 million acres of national forest land was reinstated by a federal court Wednesday. Among those covering the decision by the San Francisco-based 9th Circuit Court of Appeals were the Anchorage Daily News and the Los Angeles Times.
The rule was created during the Clinton administration, but later repealed during the Bush administration in favor of state-level decision making. As a result, the Tongass National Forest and national forests in Idaho are the only areas of forest land that are not protected under the reinstated rule. Another case affecting the rule is going on in the Denver-based 10th Circuit Court of Appeals.
After the approval of a timber sale in the Tongass last month, it will be interesting to see if the Obama administration enforces the “Roadless Rule” by reinstating it for the Tongass as well.
– Emily Linroth