0

I am new to Chrome extension development. I'm going to make an extension that will do nothing but replace the original window.Websocket class with a third-party one. To achieve that, I think I need to execute window.Websocket = ThirdpartyWS before every page is loaded.

I didn't read all the documents. I don't know how to execute an extension. I have thought about background script, and content_scripts, but none of them can satisfy me.

Robbi
  • 1,254
  • 2
  • 8
  • 11
zzzgoo
  • 1,974
  • 2
  • 17
  • 34
  • 1
    You need to run this code in [page context](/a/9517879) (use method 5). And specify "run_at": "document_start" for the content script. – wOxxOm May 19 '23 at 18:48

0 Answers0