0

I am making a chrome extension and I would like have some circular pie charts like those from the jQuery plugin circliful. The charts show up fine when I link my popup.html document to circliful's scripts and open the popup as a window in Chrome, but when I try to open the same popup.html page as a packed chrome extension, the charts don't show up.

Do I need to declare special permissions in the manifest file? Is there another way to make this plugin work for my chrome extension?

Thanks very much in advance!

Brianna Singer
  • 119
  • 1
  • 1
  • 8
  • If you are loading external scripts over HTTP or HTTPS, you'll need to declare the sites you load from in your extensions permissions. Or, even better, include a local copy of the script in your extension. – Sidney Jan 28 '18 at 03:42
  • Also, you can debug a popup page by opening the popup in Chrome then using the "open devtools" shortcut. It's `ctrl + shift + i` on windows. You need to have the devtools set to open in a new window (rather than inside the window you're debugging) – Sidney Jan 28 '18 at 03:43
  • Hi there! I do have the plugin scripts saved in the same folder as the chrome extension. I am on a mac so I went to the debugging console and saw that it is throwing an error: "Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' blob: filesystem: chrome-extension-resource:". Either the 'unsafe-inline' keyword, a hash ('sha256-MdN/wveQsn5NW+ryUzsja+Bra6n8iRR3XrVphJYscc4='), or a nonce ('nonce-...') is required to enable inline execution." Anyone know what this means? – Brianna Singer Jan 28 '18 at 03:49

1 Answers1

0

Sorry guys, it looks like the problem was that chrome extensions don't like inline scripts. I transferred to an external js file and now it works. Thanks very much!

I'll leave this answer here in case anyone else has the same problem implementing circliful or a comparable plugin. Thanks!

Brianna Singer
  • 119
  • 1
  • 1
  • 8