Changing navigator.userAgent using Chrome Extension

后端 未结 2 907
伪装坚强ぢ
伪装坚强ぢ 2020-12-05 12:18

I am trying to overload the navigator.userAgent using a simple chrome extension. As the content scripts operate in isolated env, I tried to create a script element and write

2条回答
  •  忘掉有多难
    2020-12-05 13:13

    Are you trying to change the User-Agent header that gets sent in requests? You'll have to use the declarativeWebRequest or webRequest APIs.

    Running content scripts in the page only occurs after the requests have been sent.

提交回复
热议问题