title: Chrome showing error as: Refused to execute inline script because of Content-Security-Policy
body: <p>I am working on creating a Chrome Extension of an Image Cropping Widget. The code of my <code>popup.html</code> is as follows:</p>
  
  <pre><code>&lt;body&gt;
      &lt;textarea id="widget_script" style="border:1px solid #ccc;padding:5px;width:600px" rows="5" readonly&gt;&lt;/textarea&gt;
      &lt;script type="text/javascript"&gt;
          var protocol=window.location.protocol;
          var host= window.location.host;
          var head=('&lt;div id="wd_id" style="margin-bottom: 20px;"&gt;&lt;/div&gt;
      &lt;script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"&gt;&lt;/\script&gt;
      &lt;script type="text/javascript" src="'+protocol+'//'+host+'Image_crop/cropimages/img_crop_widget.js'+'"&gt;&lt;\/script&gt;
      &lt;script type="text/javascript"&gt;init_widget()&lt;\/script&gt;');
          document.getElementById("widget_script").innerHTML=head;
      &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>The variables <strong>protocol</strong> and <strong>host</strong> take <em>protocol</em> and <em>host</em> from URL in the browser. When I tried to integrate this as a Chrome extension, it is not working. When it works perfectly, it displays following code in the textarea:</p>
  
  <pre><code>&lt;div id="wd_id" style="margin-bottom: 20px;"&gt;&lt;/div&gt;
  &lt;script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="http://localhost/cropimages/img_crop_widget.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;init_widget()&lt;/script&gt;
  </code></pre>
  
  <p>I have things few things like, placing the JS code in external JS file and and also calling the file in <code>manifest.json</code> calling it in my <code>popup.html</code>, but none worked.</p>
  
  <p>Can anyone tell me what I am doing wrong, or what else should I try to make it work?</p>
  
  <p>Thanks in advance... </p>