Chrome-Extension-Example
Chrome-Extension-Example copied to clipboard
Put inline script in a separate file
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.