';
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);
}
});
});
Ghostly memorials to cyclists killed in road accidents are showing up in Boise, the latest city to see the grassroots homage to cyclists as a way to inspire change on the roadways, writes Patrick Orr of the Idaho Statesman today. The memorials, bikes painted white and attached to a light pole or fence near where the cyclist died, first showed up in St. Louis in 2003 as a memorial. Since then, there have been at least 233 ghost bike tributes placed in 87 cities worldwide, the vast majority memorials to cyclists who died in traffic accidents, according to a New York Web site that tracks the appearance of ghost bike memorials.
Robert Cahn was among the cyclists riding with Kevin Pavlis in Boise when Pavlis was hit and fatally injured June 11, Orr writes.
"First and foremost, it's a memorial to Kevin, who was a husband, a father, and a friend," said Cahn, who placed a white bike as a memorial. "The second thing is to memorialize the death of a cyclist and try to inspire change on our roadways, to make city streets safer for bikes. The third thing is to make a space for those who loved Kevin."