This documentation relates to Opera's now deprecated .oex Extension API framework for Opera versions <= 12.15 and also provided by our OEX2NEX shim library.
For the latest Opera Extensions API documentation for Opera versions > 12.15 please consult the latest Opera Extensions API documentation online.
This method adds a Button
to the toolbar in the browser. To create a Button
see the createItem
method.
item
: The Button
to be added.void addItem (<Button> item)
//
// The background process (e.g. index.html)
//
// Create a button
var button = opera.contexts.toolbar.createItem({
title: 'Weather Extension',
icon: 'yr.png'
});
// Add it to the browser UI
opera.contexts.toolbar.addItem(button);