Anonymous
Расширение Chrome не запускает файл JavaScript
Сообщение
Anonymous » 18 май 2025, 13:15
Я создал этот манифестный файл < /p>
Код: Выделить всё
{
"name": "AI-Email Replyer",
"description": "AI powered email reply generatr",
"version": "1.0",
"manifest_version": 3,
"action": {
"default_title": "Email Writer Assistant"
},
"permissions": ["storage", "activeTab"],
"host_permissions": [
"http://localhost:8080/*",
"https://mail.google.com/*"
],
"content_scripts": [
{
"js": ["content.js"],
"matches": ["https://mail.google.com/*"],
"css": ["content.css"],
"run_at": "document_start"
}
],
"web_accessible_resources": [
{
"resources": [ "icons/*" ],
"matches": [ "https://mail.google.com/*" ]
}
]
}
< /code>
и в content.js < /p>
console.log("AI content script loaded here");
все еще после загрузки расширения в браузере Chrome он не печатает ни одной вещи в консоли (я проверяю только консоль сайта Gmail)
Какую ошибку я совершил ??/P>
Подробнее здесь:
https://stackoverflow.com/questions/796 ... cript-file
1747563342
Anonymous
Я создал этот манифестный файл < /p> [code]{ "name": "AI-Email Replyer", "description": "AI powered email reply generatr", "version": "1.0", "manifest_version": 3, "action": { "default_title": "Email Writer Assistant" }, "permissions": ["storage", "activeTab"], "host_permissions": [ "http://localhost:8080/*", "https://mail.google.com/*" ], "content_scripts": [ { "js": ["content.js"], "matches": ["https://mail.google.com/*"], "css": ["content.css"], "run_at": "document_start" } ], "web_accessible_resources": [ { "resources": [ "icons/*" ], "matches": [ "https://mail.google.com/*" ] } ] } < /code> и в content.js < /p> console.log("AI content script loaded here"); [/code] все еще после загрузки расширения в браузере Chrome он не печатает ни одной вещи в консоли (я проверяю только консоль сайта Gmail) Какую ошибку я совершил ??/P> Подробнее здесь: [url]https://stackoverflow.com/questions/79627346/chrome-extension-is-not-running-the-javascript-file[/url]