';
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);
}
});
});
Mexican drug cartels want to use Tuesday's murder of Benjamin LeBaron and his brother-in-law to spread fear among the populace, according to a report by Ken Ellingwood of the Los Angeles Times.
The bodies of LeBaron, a U.S. citizen living in Northern Mexico, and his brother-in-law bore a note claiming their murders as retribution for a neighboring town's wave of drug arrests.
In May, LeBaron rallied a group of Chihuahuaresidents in protest after the kidnapping and $1 million ransom of his teenaged brother Eric, who was eventually released after his family refused to pay.
LeBaron may have been an unlikely leader in Northern Mexico: he and his brother-in-law were part of a controversial community founded nearly 100 years ago by breakaway Mormons bent on polygamy.
Many Mexicans are so fearful of being kidnapped that they remain silent about the ravages inflicted upon their community by the drug trade.