Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

270
Views
Refused to execute inline script because it violates the following Content Security Policy directive without external scripts

I'm making a chrome extension and keep getting this error: Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self'". Either the 'unsafe-inline' keyword, a hash I've already tried using <meta> and other methods. (I'm not using any external scripts, so other posts are unusable) manifest.json:

{
  "name": "Mini Embed",
  "description": "Opens a small version of a webpage",
  "version": "1.0",
  "manifest_version": 3,
  "action": {
    "default_popup": "index.html"
  }
}

index.html:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
  <style>
    body {
      width: 320px;
      height: 169px;
    }

    #btn {
      background-color: #0bde19;
    }

    iframe {
      width: 300;
      height: 169;
    }
  </style>
</head>

<body>
  <script>
  var url;
  function run(){
  url = document.getElementById("text").value;
    document.getElementById("iframe").src = "url";
  }
  </script>
  <span>
  <button onclick="run" id="btn">Embed</button>
  <input id="text" placeholder="enter URL">
  </span>
</body>

</html>
about 4 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 Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!