Note that there are some explanatory texts on larger screens.

plurals
  1. POChrome Manifest with Google API
    primarykey
    data
    text
    <p>I need some advice on how I can get my chrome manifest for an extension to allow a Google API talk between the servers and the application. The application loads fine when I point to it directly(not as extension). </p> <p>However my problem is that when I load it as an extension I get the following error:</p> <pre><code>Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' https://apis.google.com/". </code></pre> <p>The application is built to interface with Google’s Calendar API. </p> <p>This is what my HTML header looks like (locally): </p> <pre><code>&lt;head&gt; &lt;link href='reset.css' rel="stylesheet" type="text/css"&gt; &lt;link href='style.css' rel="stylesheet" type="text/css"&gt; &lt;link href='animate-custom.css' rel="stylesheet" type="text/css"&gt; &lt;script type="text/javascript" src="jquery.min.js"&gt;&lt;/script&gt; &lt;script src="https://apis.google.com/js/client.js?onload=onClientLoad" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="main.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="moment_langs.js"&gt;&lt;/script&gt; &lt;title&gt;Dashboard&lt;/title&gt; &lt;/head&gt; </code></pre> <p>This is what it looks like when its loaded (**scripts loads - guessing an api call?): </p> <pre><code>&lt;link href='reset.css' rel="stylesheet" type="text/css"&gt; &lt;link href='style.css' rel="stylesheet" type="text/css"&gt; &lt;link href='animate-custom.css' rel="stylesheet" type="text/css"&gt; **&lt;script src="https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.en.lm_l25KfNhA.O/m=client/rt=j/sv=1/d=1/ed=1/am=AQ/rs=AItRSTM1DJ5OrFPvETO8O24EqSIF_JCoKQ/cb=gapi.loaded_0" async=""&gt;&lt;/script&gt;** &lt;script type="text/javascript" src="jquery.min.js"&gt;&lt;/script&gt; &lt;script src="https://apis.google.com/js/client.js?onload=handleClientLoad" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="main.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="moment_langs.js"&gt;&lt;/script&gt; </code></pre> <p>My manifest: </p> <pre><code>{ "manifest_version": 2, "name": "My Dashboard", "version": "1.2", "content_security_policy": "script-src 'self' https://apis.google.com/; object-src 'self'", "permissions": [ "webRequest", "*://*.googleapis.com/*", "*://*.apis.google.com/*" ], "chrome_url_overrides" : { "newtab": "index.html" } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload