';
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);
}
});
});
Seven Utah tribes want to stop the Utah Transit Authority from building a train station on the site of an ancient village in Draper. They came together in a rare show of public unity to petition lawmakers and Utah's next governor to stop the proposed project, according to a story by Brandon Loomis of the Salt Lake Tribune.
The site, which dates to 3,000 years ago, contains some evidence of the earliest known corn farming in the Great Basin area and has been deemed significant by the state archeologist.
"Are we so insignificant that we are overlooked and desecration is done to our sites?" Curtis Cesspooch, chairman of the Uintah/Ouray Utes, told the Salt Lake Tribune.
The Utah Legislature had mandated the land be preserved for open space in 2000, but the Department of Natural Resources never signed a proposed perpetual conservation easement, and last winter lawmakers allowed UTA's proposal go forward.