()
| 36 | * Initialize API injection on DOM ready |
| 37 | */ |
| 38 | export function initAPIInjection() { |
| 39 | console.log('[Content Script] Initializing API injection'); |
| 40 | |
| 41 | // Inject immediately if DOM is ready, otherwise wait |
| 42 | if (document.readyState === 'loading') { |
| 43 | document.addEventListener('DOMContentLoaded', injectAPIIntoPage); |
| 44 | } else { |
| 45 | injectAPIIntoPage(); |
| 46 | } |
| 47 | } |
no test coverage detected