';
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);
}
});
});
B.C. Minister of Children and Families Mary Polak is cutting funding for an early intervention program for autistic children across seven B.C. communities, reports Lindsay Kines of the Times Colonist. The intensive program focused on 70 preschool children who received more one-on-one attention than their slightly older counterparts, a situation Polak said was unfair to the other 800 children under age six with autism in the province. "We were not seeing any appreciable improvement in the outcomes for those kids," Polak says.
The preschool children each receive $70,000 per year in treatment funds, which Polak is slashing to $20,000 per child to put them on par with the other children. The plan also cuts 39 jobs from the Queen Alexandra Centre where the intensive program takes place.
Nicole Strong, whose son Isaac has autism, says he benefitted immensely from the intensive program. She disagreed with Polak's statement that the extra $50,000 in treatment per year didn't make a difference.
"For them to say that there would be no appreciable difference when you actually get 13 hours more of therapy [a week] is ridiculous," Strong says.
Strong also says children who go through the intensive program are much more able to deal with school and stressful situations than those who haven't.