title: Cordova error: Refused to execute inline script because it violates the following Content Security Policy directive
body: <p>I'm learning to use Cordova with jquery mobile and I have the following error:</p>
  
  <blockquote>
    <p>Refused to execute inline script because it violates the following Content Security Policy directive: "default-src 'self' data: gap: <a href="https://ssl.gstatic.com" rel="noreferrer">https://ssl.gstatic.com</a> 'unsafe-eval'". Either the 'unsafe-inline' keyword, a hash ('sha256-iacGaS9lJJpFDLww4DKQsrDPQ2lxppM2d2GGnzCeKkU='), or a nonce ('nonce-...') is required to enable inline execution. Note also that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.</p>
  </blockquote>
  
  <p>My code is as follows:</p>
  
  <pre><code>    &lt;!DOCTYPE html&gt; 
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *; img-src 'self' data: content:;"&gt;
          &lt;meta name="format-detection" content="telephone=no"&gt;
          &lt;meta name="msapplication-tap-highlight" content="no"&gt;
          &lt;meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width"&gt;
          &lt;link rel="stylesheet" type="text/css" href="css/index.css"&gt;
          &lt;title&gt;Hello World&lt;/title&gt;
          &lt;script&gt; 
              $(document).ready(function()
              { 
                  $("#tryit").click(function() {   
                      document.getElementById("msg").innerHTML = "hello";
                  });
  
              }); 
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt; 
          &lt;button id="tryit"&gt;Try it&lt;/button&gt;
          &lt;div id="msg"&gt;&lt;/div&gt;
  
          &lt;script type="text/javascript" src="cordova.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="js/index.js"&gt;&lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>In the class, I wrote this:</p>
  
  <pre><code>cordova create hello2 com.example.hello2 hello2
  cordova platform add android
  cordova build 
  </code></pre>
  
  <p>I think it has to do with <strong><em>"cordova-plugin-whitelist"</em></strong>
  , but I don't know how to uninstall the NPM</p>