';
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);
}
});
});
In the waning days of the Bush presidency, Utah's Bureau of Land Management went on a tear.
In December, it auctioned off 77 leases -- to 100,000 acres of federal land -- to oil and gas companies intent on drilling Utah. Some of the leases would have allowed drilling within view of the Arches and Canyonlands national parks.
Now, 60 of those leases have been deemed illegal and revoked by Interior Secretary Ken Salazar, in response to a federal restraining order that halted the sale of the drilling rights.
He based his decision on a report that "found that people in the Bureau of Land Management's Utah office, which oversaw the sales, believed that energy concerns should override environmental or recreational ones," according to the LA Times, which quoted Salazar as saying, "There is no such preference for the use of the land."
Environmentalists hailed Salazar's decision, which was decried by energy groups as antithetical to the Obama Administration's wish for energy independence.