';
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);
}
});
});
Staying healthy is growing even more costly for Washington residents. Insurance Commissioner Mike Kreidler has approved rate increases of 17 percent for RegenceBlueShield, 13 percent at Group Health and 18 percent at Lifewise Health Plan. Only customers of Premera Blue Cross saw their increase limited to 6 percent. Those numbers are averages. There are outliers, such as Terry Naughton of Quilcene, who faces a 40 percent increase and concludes: "We need a public plan." Kyung M. Song's story in the Seattle Times today shows why health-care reform seems more likely in D.C. now than it has for years. Song offers up Seattle resident Gail Petersen, whose family of five will see her $1,400-a-month bill go to $1,700. She likens what's happening to price fixing: "I would love to see insurance companies have a little competition." Last we heard, Washington Sen. Maria Cantwell, who is on a key committee in the health-care debate, was still waffling on whether she supports a publicly funded option for health care insurance - a position she previously had endorsed in the state Legislature.