Introduction to Opera Extensions

Opera has always been known for its adaptability, and wealth of options for customisation. You can modify the UI with custom icons, buttons and menu options; you can write user stylesheets and User JavaScript to add custom styles and behaviour to any site you access; you can also create Opera Widgets and Unite applications to provide standalone native applications written using open standards, and much, much more.

We've also spent a long time looking at how to make a more powerful secure extension framework. We want to be certain our framework doesn't impact the browser's performance, and allows for the long tail of user requirements and developer needs. New in Opera 11 alpha, we've added our own extensions. Opera extensions are packages that add extra functionality to Opera Desktop. Examples include Mapsearch, which allows you to select any address and plot it straight onto a Google Map, and Slashdotty, which allows anyone to show and hide blocks in the Slashdot UI, not just registered members.

<p>Our extensions framework is built on existing standards, with Widgets and JavaScript as the basis. This means that if you can write a Web application or Widget you already have the skills you need to write extensions. Opera extensions also make use of new HTML5 technology such as <a href="http://dev.w3.org/html5/postmsg/">cross-document messaging</a>. </p>
<p>The architecture is conceptually similar to Firefox&#39;s Jetpack or the Chrome extension framework. Making it easy to port extensions across platforms was a design goal. It is also easy to <a href="https://dev.opera.com/articles/view/converting-userjs-to-extensions/">port User JavaScript  to extensions</a>, although there is of course more functionality available to make extensions more powerful. </p>
<p>An extension is packaged like a Widget. This provides a simple framework to localise extensions, building on things developers already know. It can be tailored to specific sites in the same way as User JavaScript and Greasemonkey scripts, or active all the time. It runs its own process, and has methods to communicate both with pages and with the web directly as well as add interactive items to the user interface.</p>

Making the browser even more useful!

<p>Extensions are invaluable for creating features not already present in the browser, adding to both the user and developer ability to extend functionality within the Opera browser. So, you could add a button to the browser UI that allows you to add posts to your blog or favourite social networking site, add a custom dialog window to the browser to pull up further information relating to what&#39;s being displayed in the browser, add an e-mail checker icon to the UI that shows the number of unread emails, or anything else that you want to add to make your browser more useful!</p>

<p>In terms of similarity to other browsers&#39; extension implementations, Opera has the advantage of being able to learn from other vendors&#39; successes and challenges, as well as leveraging some of the browser add-on technology we have had in place for ages, such as Widgets and User JS, with which our extensions share many similarities.</p>

Trying out Opera extensions

<p>Opera extensions are zip files with an extension of <code>.oex</code>. You install one by dropping it into the browser window or clicking on a link pointing to it. You are then asked to confirm installation, after which you can see the extension installed at Tools &gt; extensions &gt; Manage extensions. You can download and install a wealth of Opera extensions from the <a href="http://addons.labs.opera.com">Labs Addons page</a>.</p>

To run Opera extensions, you'll need an Opera 11 labs build that supports them:

<ul>
	<li><a href="https://www.opera.com/download/get.pl?id=33277&amp;location=270&amp;thanks=true&amp;sub=true">Opera 11 extensions build for Windows</a></li>
	<li><a href="https://www.opera.com/download/get.pl?id=33278&amp;location=270&amp;thanks=true&amp;sub=true">Opera 11 extensions build for Mac</a></li>
	<li><a href="http://snapshot.opera.com/unix/alpha1-with-extensions_11.00-1029/">Opera 11 extensions build for Linux</a></li>
</ul>


<p class="note">Note that the current release is an <strong>experimental labs build</strong>, therefore the implementation, architecture and design may change before the final release. If you create a complex extension, it may require updates as our APIs mature.</p>

Where to go next

  • Saying hello world to Opera extensions!: A very simple tutorial to get you started with building Opera extensions.

  • What's in an Opera extension?: Learn more about how Opera extensions work, what files they contain, what the different parts of the architecture do, and what types of extension you can expect to build.

  • Hands-on tutorial: building an Opera extension: A more in-depth extensions tutorial.

  • Converting UserJS to Opera extensions: Learn how to convert Opera UserJS files into Opera extensions.

  • Opera extensions: tabs: This article takes you through using the Opera extensions API tabs object to allow extensions to manipulate tabs in the Opera desktop browser.

  • Opera extensions: windows: This article shows you how to manipulate windows in the Opera desktop browser via the Opera extensions Windows object.

  • Opera extensions: buttons, badges and popups: This article takes you through the ins and outs of implementing buttons, badges and popups for Opera extensions.

  • Opera extension APIs: References for the specialist APIs that allow you to hook into the browser to extend functionality