We're crowdfunding to fill the environmental reporting gap in Olympia
';
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);
}
});
});
As we've done for the last two years, InvestigateWest is again crowdfunding to support our 2017 Washington Statehouse Environmental News Project, offering in-depth coverage of the most critical environmental issues facing the Washington Legislature. If you donate today your gift will be doubled or tripled.
Unlike Congress, our state legislature is debating environmental policies that may actually become law. Energy and a carbon tax. Toxics. Puget Sound. Water rights. Growth management. Initiative 937. But there are fewer reporters than ever covering these issues in Olympia. And without reporters, how will voters know what lawmakers are doing?
For Olympia Environmental News, InvestigateWest needs to raise another $5,000 help cover the costs of reporting and keep reporter Adiel Kaplan on the job. It's a big goal and we need your help.
From now through Jan. 19, every donation will be matched by the Knight Foundation. And every new donor will be matched by the Ethics and Excellence in Journalism Foundation (even after Jan. 19). So your donation will be doubled or tripled.
Head over to our Statehouse Environmental News Project page on the crowdfunding site crowdrise.com to back the project, or go to InvestigateWest's regular donations page. In either case, feel free to leave a message telling us what environmental topics interest you the most. And please tell your friends, share on Facebook, tweet it around and help us get the word out. We're counting on you!