Home > Webmasters Resources > Chrome Extensions and NPAPI

Chrome Extensions and NPAPI

March 24th, 2009

There are more details up on the Chrome wiki for how to build a Chrome extension thanks to illustrious Aaron Boodman.

You create a JSON manifest in your extension directory, tell Chrome about it via –enable-extensions –load-extension="c:myextension" (only required while extensions are in dev mode) and then you can navigate to chrome-extension://00123456789ABCDEF0123456789ABCDEF0123456/hello_world.html assuming the manifest of:
PLAIN TEXT
JAVASCRIPT:

1.
2.
      {
3.
        "format_version": 1,
4.
        "id": "00123456789ABCDEF0123456789ABCDEF0123456",
5.
        "version": "1.0",
6.
        "name": "My First Extension",
7.
        "description": "The first extension that I made."
8.
      }

Aaron’s work wouldn’t be complete with some notion of userscripts, and the document discusses that:
PLAIN TEXT
JAVASCRIPT:

1.
   2.
      {
   3.
        "format_version": 1,
   4.
        "id": "00123456789ABCDEF0123456789ABCDEF0123456",
   5.
        "version": "1.0",
   6.
        "name": "My First Extension",
   7.
        "description": "The first extension that I made.",
   8.
        "content_scripts": [
   9.
          {
  10.
            "matches": ["http://www.google.com/chromeexp

The Chrome team has also launched a new website to showcase interesting web app examples and samples.

Calling it openwebexperiments or something, and being a bit more inclusive would have been nice (since these all seem to work fine in Safari, Firefox, etc ….. but the idea is good!

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • E-mail this story to a friend!
  • Fark
  • IndianPad
  • LinkedIn
  • Live
  • Pownce
  • Simpy
  • Slashdot
  • StumbleUpon
  • Technorati
  • TwitThis
  • Yahoo! Buzz
  • YahooMyWeb

admin Webmasters Resources , ,

  1. No comments yet.
  1. No trackbacks yet.
eXTReMe Tracker