Diagnostic step 1
Refactor so the extension's logic runs inside the content script (isolated world) and avoids adding inline <script> tags to the page.
Generated Oct 19, 2026, 9:33:36 AM
Refactor so the extension's logic runs inside the content script (isolated world) and avoids adding inline <script> tags to the page.
If you need to interact with page JS, implement a small messaging bridge: content script injects a minimalist, non-executing marker and uses window.postMessage or CustomEvent to communicate; the page-side code (if present) can respond.
Use chrome.scripting.executeScript to run code in the isolated world and then exchange data through DOM events rather than injecting executable inline scripts.
Test on pages with strict CSP by checking the console for CSP refusal messages and verifying the content script can still manipulate DOM and communicate via postMessage.