On 21 Jul 2012, at 19:05, John J Barton wrote:
> On Sat, Jul 21, 2012 at 10:36 AM, Nige <
ni...@zaonce.com> wrote:
> I'm trying to upgrade to manifest version 2, but my options page is busted.
>
> How do I include jquery in the options page?
>
> I've got a local copy, which according to
http://code.google.com/chrome/extensions/contentSecurityPolicy.html should work, but I get the following error when opening the page:
>
> Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' chrome-extension-resource:".
>
> Anybody ideas?
>
> Your options.html cannot have any script tag without 'src' attributes, eg:
> <script>
> // inline not allowed
> </script>
> The logic, as I understand it, is that if you page is attacked by JS code, then that JS code can use then inline scripts to run JS code.
I think I've worked out what was wrong - the jquery library I was including was 1.4, which seems to cause issues. If I update it to 1.7, the problem goes away.