外部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.

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/  

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"
 ],
 …
}

ここにhtmlを入れるとリンク可能になりました!

This entry was posted on 土曜日, 7月 28th, 2012 at 5:08 PM and is filed under Chrome Extention. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Unityによるゲームを公開しております iOS/Android
https://itunes.apple.com/jp/app/lost-knight-3d-action/id900917032
https://play.google.com/store/apps/details?id=com.groundroad.runknight

各種開発支援・機能開発等小さいお仕事などもお請けしております。
unity開発支援, PHPシステム開発, javascript/html5 フロント開発, titanium mobileアプリ開発
お気軽にお問い合わせください
大崎・五反田近郊での対面でのお打ち合わせはいつでも可能です。