';
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);
}
});
});
Federal officials will soon have another custody issue to deal with in their ongoing record-breaking bust of Southwestern artifact thieves - what to do with the artifacts themselves. So far, official have hauled away more than seven truck loads of relics from raids associated with the 26 people indicted so far in the case, reports Mike Stark of the Associated Press. Getting the articles back may seem like restitution.
But what's been lost forever, at least in some cases, is the scientific value associated with those objects - many of which were dug up with no regard for how their removal damaged what archeologists might have learned from them at the site.
At least some of those artifacts will eventually be housed in museums qualified to care for them. Some will be returned if their owners are found not guilty of participating in their thefts.
Others will be returned to their original tribes, and tribal leaders have said they hoped ceremonial and sacred objects could be used again for their intended purposes.
Given the way the artifacts were unceremoniously removed from their original locations, that seems an honorable solution.