• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

165
Views
Content-Security-Policy with 'unsafe-inline' not working

In my chrome extension code, I need to inject a <script> tag with code, but I get this error:

Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self'"

So I added the content_security_policy to my manifest.json file, but now I get another error:

enter image description here

My manifest is as follows:

{
  "manifest_version": 3,
  "name": "...",
  "description": "...",
  "version": "1.1",
  "author": "...",
  "icons": {
    "48": "favicon48.png",
    "256": "favicon256.png"
  },
  "permissions": [
    
  ],
  "content_scripts": [
    {
      "matches": [
        "http://skribbl.io/*",
        "https://skribbl.io/*"
      ],
      "js": [
        "words.js",
        "content.js"
      ],
      "run_at": "document_end"
    }
  ],
  "content_security_policy": {
    "sandbox": "script-src 'self' 'unsafe-inline'"
  }
}
about 3 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error