外部URLからリソースを使うには? | chrome extension
外部からリンクしてもエラーになるので・・・ようやくわかりました。
This webpage is not available
The webpage at chrome-extension://invalid/ might be temporarily down or it may have moved permanently to a new web address.
Error 2 (net::ERR_FAILED): Unknown error.
The webpage at chrome-extension://invalid/ might be temporarily down or it may have moved permanently to a new web address.
Error 2 (net::ERR_FAILED): Unknown error.
Canaryだとちゃんとエラーが出るそうです・・・
Denying load of chrome-extension://…html. Resources must be listed in the web_accessible_resources manifest key in order to be loaded by pages outside the extension.
GET chrome-extension://invalid/
GET chrome-extension://invalid/
http://code.google.com/chrome/extensions/manifest.html
web_accessible_resources
An array of strings specifying the paths (relative to the package root) of packaged resources that are expected to be usable in the context of a web page. For example, an extension that injects a content script with the intention of building up some custom interface for example.com would whitelist any resources that interface requires (images, icons, stylesheets, scripts, etc.) as follows:
{
…
“web_accessible_resources”: [
"images/my-awesome-image1.png",
"images/my-amazing-icon1.png",
"style/double-rainbow.css",
"script/double-rainbow.js"
],
…
}
{
…
“web_accessible_resources”: [
"images/my-awesome-image1.png",
"images/my-amazing-icon1.png",
"style/double-rainbow.css",
"script/double-rainbow.js"
],
…
}
ここにhtmlを入れるとリンク可能になりました!