';
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);
}
});
});
A new report shows that British Columbia has been hit particularly hard by the recession. We learned of this through a story (http://www.vancouversun.com/business/fp/hardest+provinces+recession+report/1736584/story.html) in the Vancouver Sun by Fiona Anderson, which quotes BMO Capital Markets Economics’ Robert Kavcic’s report:
“British Columbia has been among the hardest-hit provinces during this recession, as what started out as forestry-specific downturn eventually spread to the construction, energy and consumer sectors.”
The story goes on to say that B.C. is showing the same rate of contraction this year as the rest of Canada, 2.5 percent of the gross domestic product. Hmmm… that would suggest B.C. has *not* been hit particularly hard. We turned over a few virtual rocks and found the actual study. (Pity the Sun didn’t link to it – c’mon, guys, remember that you're committing newsgathering in 21st Century.)
Examining Kavcic's report, we see that in 2008, B.C.’s GDP lagged behind seven other provinces, and was ahead of just two. So it’s not so much 2009 that put it behind other provinces as 2008.
However, the report predicts B.C.’s economy will nose up faster than six other provinces, outdone in 2010 only by three other provinces. btw, Canada's other Western provinces -- Alberta, Saskatchewan and Manitoba -- all fared about as well or better than B.C. over the last two years. And Kavcic has all three showing relatively healthy growth rates of 1.6 to 2.2 percent for next year, compared to 2 percent for B.C.