Chrome-Extension-Example icon indicating copy to clipboard operation
Chrome-Extension-Example copied to clipboard

Put inline script in a separate file

Open ento opened this issue 13 years ago • 0 comments

Problem: Inline JavaScript in background.html is not being executed.

Cause: This is because of the Content Security Policy adopted by Chrome's extension system. This restriction cannot be relaxed.

Fix: This patch externalizes the JavaScript code found in background.html to a file called background.js.

ento avatar Oct 19 '12 11:10 ento