WebExtensions content script won’t be attached to some web pages when the page specifies Content Security Policy.
Is this by design? A bug?
Or, am I missing something?
sample content.js:
"use strict";
{
console.log("content script attached");
}
manifest.json:
{
"applications": {
"gecko": {
"id": "webExtTest@asamuzak.jp"
}
},
"content_scripts": [
{
"matches": ["<all_urls>"],
"js": ["./content.js"],
"run_at": "document_end"
}
],
"manifest_version": 2,
"name": "WebExtensions test",
"permissions": [
"<all_urls>",
"activeTab"
],
"version": "0.0.1"
}
https://bugzilla.mozilla.org/
https://discourse.mozilla-community.org/c/add-ons
Works
https://addons.mozilla.org/en-US/firefox/
Doesn’t work.
CSP error is logged in console, too.