My manifest.json
is:
{
"manifest_version": 2,
"name": "Test",
"version": "1.0.0",
"web_accessible_resources": [
"public/*"
]
}
public/base.htm
is:
<style>
body {
background-image:url('chrome-extension://__MSG_@@extension_id__/background.png');
}
</style>
<link rel="stylesheet" href="chrome-extension://__MSG_@@extension_id__" type="text/css" />
<link rel="stylesheet" href='chrome-extension://@@extension_id/public/style_override.css' type="text/css" />
Whenever I am visiting view-source:chrome-extension://omjmnflgeadkeenialehggjcffaeonam/public/base.htm
I am getting:
<style>
body {
background-image:url('chrome-extension://__MSG_@@extension_id__/background.png');
}
</style>
<link rel="stylesheet" href="chrome-extension://__MSG_@@extension_id__" type="text/css" />
<link rel="stylesheet" href='chrome-extension://@@extension_id/public/style_override.css' type="text/css" />
I don't understand why these are not replaced by the chrome extension id.
Update: Just noticed it apparently works only with CSS format. Chrome don't allow inline JS. So I am still looking for an option to import external CSS/JS in this html page