【发布时间】:2022-12-02 18:44:49
【问题描述】:
This is my first attempt writing a Chrome extension. I added \"web_accessible_resources\": [\"images/icon.png\"] to manifest.json because I wanted to access the image from content script. After adding this line, I got the error \"Invalid value for \'web_accessible_resources[0]\'.
Could not load manifest.\" I have checked to make sure the file path is correct, where else could I be wrong?
Any help is appreciated.
{
\"name\": \"Bookmark Checker\",
\"version\": \"1.0\",
\"manifest_version\": 3,
\"permissions\": [
\"bookmarks\",
\"activeTab\"
],
\"background\": {
\"service_worker\": \"background.js\"
},
\"content_scripts\": [
{
\"matches\":[\"https://www.google.com/search?*\"],
\"js\": [\"content/content.js\"]
}
],
...
\"web_accessible_resources\": [\"images/icon.png\"]
}
标签: json google-chrome-extension