Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License, and code samples are licensed under the BSD License.
©2010 Google
This page shows some sample extensions, with links that let you install them and find their source code. Each sample also has links to the documentation for each feature used by the sample.
Note: To run these samples on Linux or Mac, you need to get on an early access release channel of Google Chrome.
For more example code, see the Chromium examples directory. For tips on using the code viewer, see How to view the source code.
Adds a Google Mail button to the toolbar, displaying the number of unread messages in your inbox. Click the button to open your inbox.
Included with no charge is a swell animation when the number of unread items changes.
Features used:
Adds a small icon to the address bar when a web page contains a feed that can be subscribed to. When you click the icon, you'll see a preview of the feed and have the option to subscribe with the web-based reader of your choice.
Features used:
Uses a popup to display the first 5 items from the "Google News - top news" RSS feed. The popup dynamically resizes itself to fit additional content.
Features used:
These samples use similar capabilities to the ones above, but to implement different features.
The source code links in this page take you to a directory (for example, examples/extensions/gmail) that lists all the files in an extension. To view a file, first click its filename. If the page that comes up has an as text link, click that link to view the page's source code.
To download the file, right-click the download link. You can also left-click the download link to view the source code for files such as manifest.json that have no as text link.
We're working on a way to make it easier to look at the sample source code. If you'd like to track our progress, put a star by bug 25247.