I simply want to send the current tab url to my extension:
Following is my manifest.json
{
\"name\": \"DocUrlExtention\",
\"version\": \"1.0\",
\"
Your manifest file contains "manifest_version": 2,, which enables the Content Security Policy. By default, Inline JavaScript will not be executed. And, there is no way to relax the CSP such that inline JavaScript is allowed.
You've got two options:
"manifest_version": 2
(which disabled the default CSP).The second method is recommended, and also suggested in your code...
... <!-- JavaScript and HTML must be in separate files for security. --> <!--<script src="popup.js"></script>--> </head> ...
PS. The Dev tools for the pop-up can be opened by right-clicking on the browser action icon, and selecting the last option, "Inspect popup".