';
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);
}
});
});
Anchorage Mayor Dan Sullivan had one week to decide whether to support an ordinance approved by the Anchorage Assembly banning discrimination based on sexual orientation. After seven days of receiving thousands of phone calls, e-mails and other messages and listening to heated public hearings, he vetoed the ordinance. His reasoning? Sullivan doesn't believe discrimination by sexual orientation exists in Anchorage, reports Don Hunter in the Anchorage Daily News.
The veto frustrated supporters, who have been pushing for gay rights in Anchorage since the 1970s. Many waved rainbow flags outside City Hall Monday in protest of the mayor's decision.
Assembly Chairwoman Debbie Ossiander voted against the ordinance, worrying it would force businesses to create unisex bathrooms and alter their facilities in other ways.
But Spokeswoman Jackie Buckley of Equality Works, a coalition supporting the ordinance, said the mayor could have used the ordinance to stimulate business:
“This was an opportunity. It was good for business, so Anchorage could attract and retain the best employees and customers. This is a giant step backwards by the mayor, not seeing that.”
The assembly approved the ordinance with a 7-4 vote last week, one vote short of the super majority necessary to override the mayor's veto.
Now it's back to the table for the assembly, which has three weeks to draw up a new, more compromising ordinance.
– Emily Linroth