';
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);
}
});
});
Washington State's Referendum 71, which allows voters to decide on whether the state should extend domestic rights to gay couples, may have made the November ballot nearly a week ago, but the petitions are still making headlines, reports Janet I. Tu of the Seattle Times.
U.S. District Judge Benjamin Settle has decided to shield the names of those who signed the petitions that got R-71 onto the ballot, citing that they are protected under the First Amendment and blocking the state from releasing the petitions to the public.
While the Secretary of State's Office has said that it is obligated to release the papers under the Public Records Act, Protect Marriage Washington -- a group opposed to the extended benefits -- filed a lawsuit to protect the petitions, arguing that the signers "would be subject to threats and harassment."
While the block is just a preliminary injunction, the judge has openly sided with Protect Marriage Washington, writes Tu:
Settle said he wasn't convinced that release of the names is necessary as "an important check on the integrity of the referendum election process." Indeed, Settle said that Protect Marriage is likely to succeed in its claim that the public-records act is unconstitutional as applied to the disclosure of referendum petitions.
Some are concerned that the ruling could affect the application of Washington's public disclosure law on future initiatives. Transparency is important to us at InvestigateWest, so we'll keep you posted.
-- Natasha Walker