Quick! Let’s Create an Extension Installer!
Adding the Wave Mood Gadget manually is OK, but it’s not optimal in terms of user experience. Making the gadget accessible through an extension installer allows participants to add the gadget through a button in the conversation pane toolbar, and it also allows participants to reuse the gadget more easily in other waves.
We’ll be setting up a simple extension installer that hooks into the toolbar, adding a button with a custom icon that inserts the Wave Mood Gadget when clicked.
The Extension Installer Manifest
The structure and elements in our gadget installer are
fairly straightforward. As you may remember from The extension manifest, the extension
element has several attributes
that specify the name, description, and URL for a preview thumbnail of
the gadget. The <author>
element is
self-explanatory, while the MenuHook
element specifies that
the gadget should be added to a toolbar. The MenuHook
element also includes text for
the menu item and a URL for an icon to be used in the toolbar. Lastly,
the insertGadget
element specifies a URL to the gadget. In
this case, the URL references the gadget we created in the previous
section.
<extension name="Wave Mood Gadget" description="Displays the Google-o-meter to indicate the current mood of the wave" thumbnailUrl="http://cartosoft.com/lab/gadgets/mood-gadget/thumbnail.png"> <author ...
Get Google Wave: Up and Running now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.