How can I package JSON files with my chrome extension?
I have created an extension containing a pre-existing javascript file. This javascript file requires a json config file in the same directory, but putting that file in the same directory in the extension folder didn't work. Is there some special way I have to do thi开发者_如何学Cs?
This problem also proved IMPOSSIBLE to Google since all extensions needs a json manifest file.
Try adding it in the content_scripts
section of the manifest.json
.
"content_scripts": [
{
"matches": ["https://*/*", "http://*/*"],
"js": ["extension.js", "config.json"],
"run_at": "document_start",
"all_frames": true
}
],
精彩评论