';
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 pair of wolves has been preying on farm animals in a rural town in Eastern Oregon, prompting wildlife agents to issue a death warrant for any wolves caught killing livestock, reports Jeff Barnard of the Associated Press in the Ashland Daily Tidings.
The two wolves are believed to have killed 29 animals, including a pet goat, and the Oregon Department of Fish and Wildlife said its agents have tried everything to fend off the wolves, including tracking the pair's migrations via radio collars. Permits have been issued for federal hunters to kill the pair, while farmers have been given permission to shoot wolves to protect livestock. While the wolves remain a federally protected endangered species in the majority of Oregon, just last May the protection was lifted for wolves in the easternmost portion of the state.
While Oregon Department of Fish and Wildlife spokeswoman Michelle Dennehy called the removal a part of "overall conservation" efforts, opponent groups feel the permits are a premature step, and a setback in efforts to restore wild wolf populations.
Sean Stevens, spokesman for conservation group Oregon Wild, told Barnard:
We have something like 10 [wolves] and we’re going to kill off two them in response to depredation... We don’t need more people with guns aimed at wolves.
The wolves have been migrating into the area from Idaho, where just yesterday wolf hunting season commenced, despite environmental groups' efforts to block the hunts.