It is my first training for making chrome extension.
The example uses "jash" javascript shell bookmarklet.
This technique could be applied for converting any bookmarklet to chrome "browserAction" button (right side of the url bar).
Files:
- /manifest.json : descrition for browserAction extension
- /loader.html : generic background-page HTML
- /bookmarklet.js : javascript code from bookmarklet code
- /images/icon.png : required icon image
- /images/gen.sh : generating icon with "convert" (ImageMagick) command
Steps:
- modify manifest.json: "name" and "description" entry
- modify icon.png (or modify label and color in gen.sh, then run it)
- modify bookmarklet.js : convert bookmarklet js code into pure js code
- build package crx and release it
install crxmake:
gem install crxmake
build:
sh gencrx.sh --pack-extension=jash
build:
export PATH=/cygdrive/c/Users/$USER/AppData/Local/Google/Chrome/Application/:"$PATH"
chrome.exe --pack-extension=jash
for packaging:
- http://code.google.com/chrome/extensions/packaging.html
- http://dev.chromium.org/developers/design-documents/extensions/packaging
for extension specifications: