';
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);
}
});
});
Utah's medical provider system is already stretched thin and health reform critics wonder how doctors would be able to handle an influx of newly insured patients, writes Lisa Rosetta of the Salt Lake Tribune. Utah already has to recruit 270 physicians a year to practice in the state to meet the needs of current patients. That number could go up as the University of Utah's School of Medicine graduates fewer doctors each year in the wake of state and federal funding cuts. Rosetta's story compares Utah's situation with Massachusetts, which has historically had one of the highest physician to population ratios in the country. Even so, after the state overhauled its own healthcare system in 2006, the number of uninsured dropped in half, but the wait times to see physicians increased. It can take more than two months to schedule routine physicals with a family physician.
Elizabeth Garbe with the Utah Health Policy Project told Rosetta, "In the end, you can hand everyone an insurance card today, but that doesn't mean they're going to be able to see a doctor tomorrow."