0

I want to execute the JavaScript from my chrome extension before any other script from the page is executed (including async scripts). I tried to use the "run_at" attribute in the manifest, but none of the options worked.

Thosam
  • 1
  • The question lacks specifics ([MCVE](/help/mcve)) so I can only guess you're trying to run code in page context, in which case you need to use textContent approach, see method 2 in [this answer](/a/9517879). And naturally you'll also need `"run_at": "document_start"`. – wOxxOm Jun 10 '20 at 12:58
  • Thanks for your comment. I'm sorry that this questions lacks the specifics. I'll try to do better next time. But can I be sure, that the injected script will be executed first? – Thosam Jun 10 '20 at 13:03
  • Uhm, my comment above explains it already. – wOxxOm Jun 10 '20 at 13:08
  • is that possible with v3? I am trying to inject a script to change the navigator.language (before the react javascript is executed) – Jason Hocker Oct 15 '22 at 00:59

0 Answers0