Drag'n'drop buttons for Opera

Sharing custom buttons

Intro

It is possible to add new buttons to Opera with drag'n'drop. You can share your custom buttons as links on a web page, and visitors can drag the link to create a button on a toolbar. On clicking the link (instead of dragging it) a button will be placed on the 'Buttons > My buttons' panel of the 'Appearance' dialog.

You can also drag links from a web page to create search fields or search buttons. See the separate page for custom search fields and buttons.

Note: this page has been updated for Opera 8.5, not all buttons function correctly in Opera 7.x.

Code

This special type of hyperlink is recognized by Opera:

<a href="opera:/button/<action text>"
  title="<default button title>">
    Clickable and draggable link</a>

Replace <action text> with the button action. See the toolbar.ini and keyboard.ini files for examples of the actions that can be used (an action is the part after the = sign). Replace <default button title> with the title for the button. It is not yet possible to use custom images, but you can reuse images defined in the existing skin.

Examples

Speed dial buttons
Speed Dial open Speed Dial in the current tab, "Homepage" icon
Speed Dial open Speed Dial in the current tab, "Tile" icon
Voice buttons
Speak all text select all text and let Opera speak it
Mail layout buttons
list, body and split view three-way toggle
Split directly switch to a layout
List
Body
Body and list toggle between two states
Body and split
Blogging buttons
BlogThis! Select a quote from a web page and press your new button to get a Blogger.com compose window. In Opera 8, you can finally use the layout buttons for Bold and Italic (though they insert the markup for STRONG and EM strangely enough) etc in the compose window.
Music buttons for the experimental MP3 player
+ add MP3
> play
¦ pause
x stop

Note: Opera plays the selected file using Windows Mediaplayer.
Note 2: The implementation is currently a proof of concept, please don't complain that it is not useful! ;).

Navigation buttons
F+FF combined Forward/Fast forward button (as tested in the 7.50 preview releases)
GoTo open GoTo dialog
Stop stand alone stop and reload buttons
Reload
More mail buttons
Views dropdown for the Mail window toolbar
HTML toggling preference for HTML or text view of messages
H toggling preference for HTML or text view of messages (one letter button)
X toggling 'Suppress external embeds' on and off (shows as 'X' when suppression is on and as 'E' when suppression is off)
Mark all as read uses same icon as 'Mark as read', because I put it on the toolbar of the Mail panel
Mark all as read uses text-only button
Quick preferences buttons
Java on/off toggles
Plugins
Javascript
Cookies
Proxy servers
PU-OK enable popups
PU-NO disable popups
PU-RQ requested popups only
Panel/manage buttons
History in a page
History in the Panels
Menu buttons
Bookmarks uses the image for 'Hotlist'
Full main Menu Now you can remove the main menu and save some space. Windows users can edit the keyboard shortcut Alt+F11 so it works for them as well, not only for Linuxes. Here is a Close button for those who disable the menu bar but don't like the close buttons on the pagebar tabs either.

Buttons to avoid using the keyboard alltogether: Home and End.

Adding buttons for the actions 'Switch to previous page' and 'Switch to next page'. You could use these instead of the Page bar: « - »

View the current page in Firefox: InFF, or in Mozilla: InMoz, or in Internet Explorer: InIE. Check out the source code of this page to see how I have encoded the links here.

Notes

  1. Lots more buttons can be found at the Nontroppo's Opera wiki.
  2. Drag existing buttons around between toolbars by keeping Shift pressed, or open the 'Appearance' dialog.
  3. Buttons can be dropped on the Main bar (hidden by default), the Status bar (hidden by default), the Address bar and the Navigation bar (hidden by default), and the Search panel. The Personal bar only accepts URLs (bookmarks) and search fields, so it doesn't make sense to drop buttons there. The Page bar can only contain page tabs. Dropping a link on it will open the link in a new page, which causes a 'Page not found' message.
  4. Sometimes it can be hard to drag a link, and you end up selecting text on the page instead. Here's what you should do:
    • position the mouse pointer over the link
    • press the left mouse button
    • move the mouse either straight up or straight down
    • see a change in the cursor icon
    • drag the mouse cursor to a toolbar
    • a marker will appear at the insertion point
    • release the left mouse button