';
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 plan, hatched largely beyond the public eye, to divvy up water in an already arid Utah desert and send it to Las Vegas has drawn the ire of citizens, conservationists, and elected officials. The controversial Snake Valley water deal is now the subject of a series of citizen meetings as critics try to learn why details of the four-year negotiations that led to the water deal remain secret, reports Patty Henetz of the Salt Lake Tribune.
The plan would divide water in the aquifer that runs under Utah and Nevada, and use it to feed growth in Las Vegas. "We don't have any surplus water in Snake Valley. For goodness' sake, we're the epicenter of the drought," rancher Cecil Garland said during a citizens meeting this week.
Critics warn that a drop in the water table could kick up giant toxic dust storms. The soils that would blow away could contain mercury, deadly fungal spores, and radioactive particles, yet another legacy of nuclear tests in Nevada.
The current recession has already forced many to revisit their history texts for information about the Great Depression and how we got there. Maybe it's time to re-read the chapter on the Dust Bowl.