/** * Content script for USAC E-File (forms.universalservice.org) * * Injects a guidance overlay when on the USAC access management pages * to help the client grant filing access to filings@performancewest.net. */ (function() { 'use strict'; const PW_EMAIL = 'filings@performancewest.net'; // Wait for page to load setTimeout(injectGuidance, 2000); function injectGuidance() { // Look for access management or user forms const emailFields = document.querySelectorAll('input[type="text"][name*="email"], input[type="email"], input[name*="user"]'); // Inject floating helper banner const banner = document.createElement('div'); banner.id = 'pw-usac-helper'; banner.innerHTML = `
Performance West Helper

Grant filing access to this email for your 499 Filer ID:

${PW_EMAIL}

Click to copy. Navigate to "Manage Users" or "Authorized Contacts" and add this email with filing permissions.

`; document.body.appendChild(banner); document.getElementById('pw-close-usac')?.addEventListener('click', () => banner.remove()); document.getElementById('pw-email-copy-usac')?.addEventListener('click', () => { navigator.clipboard.writeText(PW_EMAIL).then(() => { const el = document.getElementById('pw-email-copy-usac'); if (el) { el.textContent = 'Copied!'; setTimeout(() => el.textContent = PW_EMAIL, 1500); } }); }); // Auto-fill email fields if empty emailFields.forEach(field => { if (!field.value) { field.value = PW_EMAIL; field.style.backgroundColor = '#eff6ff'; field.style.borderColor = '#93c5fd'; } }); } })();