Wednesday, April 13, 2011

Chrome extension favicon

Some of you have asked me how to include a favicon in the Chrome Extensions after reading the "how to insert a favicon in blogger".

Chrome Extension MTG Finder favicon
Well, this one is even easier, you only need to put in the chrome manifest file a reference to a 16x16 pixel icon. It doesn't matters if the real image is larger than 16x16 (it can be the same file that you're using in the 128 icon), you only need to insert the following line in the manifest.json file:

<-- start manifest.json -->
{  "name": "MTG Finder",  "version": "1.1.2",  "description": "Displays a popup with the cards found by several mtg websites matching the selected words in the current tab",  "icons": {  "128": "mtg_finder_icon.png",  "48": "mtg_finder_icon.png",  "16": "mtg_finder_icon.png"},
  "options_page": "options.html",  "homepage_url": "http://themunsonsapps.blogspot.com/",  "background_page": "background.html",
<-- more manifest stuff -->
}
<-- end manifest.json -->

Remember that the Chrome Extension will works fine without the bold line, but you won't see the favicon in the pages created by the extension such as the options page.

0 comments::

Post a Comment