I just installed a “hello world” Chrome extension from this Chrome Extension tutorial page. When you surf to www.google.com, the Google logo is replaced with a Lolcat:
Here’s how to write your own Google Chrome extension in three steps:
1. Install the developer-channel version of Google Chrome. I don’t know if this is 100% necessary, but new support for plugins will probably show up in the developer version first. You can read instructions on how to switch to the developer version. It takes maybe 3-4 minutes — you basically run a small program to indicate your preference. In case you’re worried that the developer version will crash a lot: I’ve been running the developer version for months and haven’t seen any major issues. The developer version also gets new features (such as pressing “F11” to get full-screen mode) way before the beta/stable releases of Chrome. I’m using version 184.108.40.206 of Chrome and the “hello world” extension worked fine for me.
I like several things about the extension framework:
– Your plugin has to have a unique identifier (40 digit hexadecimal number). Given an identifier such as “00123456789ABCDEF0123456789ABCDEF0123456”, an extension can include an image such as foo.gif and then easily access that image by using a full path such as “chrome-extension://00123456789ABCDEF0123456789ABCDEF0123456/foo.gif”
– Bundling your extension directory into a “.crx” Chrome Extension file is as simple as running a short Python script.
– Chrome also supports binary NPAPI (Netscape Plugin Application Programming Interface) plugins.
3. Try it out! If you’re running the developer version of Chrome, you can install the “hello world” plugin from the extension howto page just by clicking to download the .crx file. Then type “chrome-ui://extensions/” and you’ll see something like this:
Once you see how it works, just start hacking around and see what happens. Remember, this howto document is only a few days old. I’m sure the Chrome team is thinking about ways to add more functionality to extensions, but the current developer version of Chrome already lets you do a lot of neat things.
One more nice thing: it looks like installing extensions doesn’t require you to restart the browser. And a hat-tip to Google OS for pointing out this document.