Skip to main content

  • Login | Forgot Password?
Ribbit Developer logo

Creating a Ribbit Chrome Extension

Submitted by jwill on Mon, 2009-12-21 14:35

A couple of weeks ago, I previewed a Chrome extension using Ribbit technology to allow a user to make 2-legged call or send text messages. In this post, I'm going to show you some of the code powering the extension and how you would deploy it to the Chrome Extension Gallery.

Chrome extensions leverage CSS, HTML, and Javascript to extend the capabilities of the browser. As a HTML5-compliant browser, extensions can use localStorage to store data and can play audio or video without the need for a plugin.

Some Terminology

Let's start with a little terminology. In addition to bookmarks, events, tabs, windows, and themes that most browsers have, Chrome introduces a couple of new concepts for extensions:

Browser actions are little icons that live in the Google toolbar just right of the address bar.  They can have a popup web page that appears when a user clicks the icon and a tooltip to describe what the extension does. To provide limited information to the user without opening the popup page, you can also set text to appear as badge over the icon. We'll be using a browser action for our extension.

Options pages give users a single place to customize your extension. We'll be using the options page to set the developer portal credentials and the default phone number you'll want to ring.

Content scripts can rewrite, style, or otherwise manipulate the content of a web page using Javascript. If you are familiar with Greasemonkey for Firefox, content scripts function the same way. You can set the script to affect pages from a specific domain, subdomain, or on all pages.

Background pages bring a stateful experience to a generally stateless Internet. For example, if you were developing a Twitter extension, you would initiate the connection to Twitter from the background page and, with the help of a timer, periodically check Twitter for new messages. For a Ribbit extension, this would be where you would check for new voicemail messages.

Manifest files provide basic information about the extension noting whether the extension will use browser actions, content scripts, an options page, and what permissions are required.

Getting Started

First we'll need to create an empty directory to hold all files for your extension. Let's call it lilypad. The only requirement is that the manifest file be in the root directory. You are to organize your files in anyway way you see fit. To keep things sorted, let's create images, css, and js folders for our images, stylesheets, and javascript files respectively. The first thing we'll need to create is out manifest file:

{
   "name": "Lilypad for Google Chrome",
   "version": "1.0",
   "description": "Enables the use of Ribbit VOIP and SMS services.",
   "icons": { 
      "32" : "images/ribbitR_32x32.png",
      "128": "images/ribbitR_128x128.png" 
   },
   "permissions": [],
   "browser_action": {
      "default_title": "Ribbit Lilypad",
      "default_icon": "images/ribbitR_19x19.png",
      "popup": "popup.html"
   },
   "options_page": "options.html"
}

In the snippet listed above, we are telling Chrome what name and icons to show the user when they install the extension, that we want a browser action to display the contents of popup.html, and that we will be setting application options and settings in the code of options.html.

  • Applications
  • ribbit chrome extension
  • jwill's blog
  • Login or register to post comments
  • Share/Save

Ribbit Photos

Ribbit's Voice-to-Text Service AssuranceInc.: The Best Voicemail Management ServicesFirst Camera PhoneRibbit Mobile: Online Message InboxRibbit for Salesforce brings you: SMS MessagesRibbit for Windows 7

See more photos at Flickr

Ribbit Conversations

  • Tips from Ribbit --> Validating USA and UK phone numbers from @sant1t1 http://su.pr/1VYkoI — 5 days 5 hours ago
  • @martyzigman: I would love to know more about this new CRM integration you are building, sounds good. — 5 days 12 hours ago
  • If you are developing a Ribbit powered application, let us know. We want to love on you a little bit. http://su.pr/6XqZSv — 1 week 3 days ago
  • I don't care what the CEO says, most important *thing* in the room is the candy bowl. <smile> http://yfrog.com/j677209011j — 1 week 5 days ago
  • RT @kevinmarks: me talking about Buzz + open web to GTUG coming up in a few minutes live here -- http://www.building43.com/realtime/ — 1 week 5 days ago
  •  
  • 1 of 60
  • ››
more

Follow Ribbit

 

            

            

           

Categories

  • .NET
  • AIR
  • Applications
  • Articles and Media Mentions
  • Challenge
  • Code
  • Community
  • Contest
  • Design
  • Events
  • Feature
  • Flash
  • Flash Toolkit
  • Flex
  • Flex SDK
  • Gallery
  • General
  • Inside Ribbit
  • Interviews
  • News
  • Newsletter
  • PHP
  • REST
  • Role Playing
  • Silverlight
  • Tips &amp; Tricks
  • Uncategorized
  • Wish List

Archives

  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • November 1999

 

               

               

  • Company
    • Corporate Site
    • About Us
    • Careers
    • Contact Us
    • LegalPrivacy
    • News
    • Media Kit
  • Products
    • Platform
    • Mobile
    • Salesforce
    • Oracle
  • Solutions
    • Digital Agencies
    • Carriers
    • Systems Integrators
    • Hosted Contact Centers
  • Community
    • Corporate Blog
    • Developer Blog
    • CRM Blog
    • Moble Blog
    • Idea Wall
    • Events Calendar
  • Support
    • Developer Help
    • Ribbit for Salesforce Help
    • Ribbit for Oracle Help
    • Ribbit Mobile Help
    • Feedback
    • Developer Forums
    • Ribbit Mobile Forum
  • Developers
    • Developer Center
    • Develop for Ribbit Mobile
    • Register
    • Ribbit Labs

© 2010 Ribbit Corporation. All Rights Reserved.