我正在尝试将我的manifest.json文件加载到我的Chrome扩展程序中,但它给了我这个错误:cant'n load JavaScript file „_locales/YTplugin.js“
这就是我的manifest.json的样子:
{
// Required
"manifest_version": 2,
"name": "YouTube trending extension",
"version": "0.1",
// Recommended
"default_locale": "en",
"description": "YT extension",
"icons": {},
// Optional
"author": "Josef Reischig",
"chrome_url_overrides": {},
"content_scripts": [{"matches": ["https://www.youtube.com/*"],"js": ["/_locales/YTplugin.js"]}]
}
我的YTplugin.js
与manifest.json文件一起存储在_locales文件夹中。有人有想法吗?
答案 0 :(得分:1)
尝试以下路径
"content_scripts": [{"matches": ["https://www.youtube.com/*"],"js": ["../_locales/YTplugin.js"]}]