Google Chrome Extension - Script Injections

后端 未结 4 842
暗喜
暗喜 2020-12-07 23:04

I\'m trying to get my Chrome Extension to inject some javascript with content_scripts, using this previous answer as a reference.

4条回答
  •  一整个雨季
    2020-12-07 23:21

    The problem here is that you are using manifest_version : 2. If you make that manifest-version: 1 you'll not have any problems. Version 2 restricts many such features to improve security. Refer Google Content Security Policy for more details on the restrictions imposed in manifest version 2. I could not find your specific case mentioned in the CSP but when I changed the manifest version to 1 and executed your code it is working fine.

提交回复
热议问题