By Opera Software

From Opera 15 onward, Opera 11 & 12’s extension format is no longer supported, and instead, we’ve switched to Chromium’s extension model. Check out our new documentation for developing extensions for Opera 15 and higher and start building your own extensions.


This property indicates if the Button is disabled. By default, it is set to false (meaning the button is enabled).


Create a button that gets disabled for a short while when clicked.

// The background process (e.g. index.html)

// Create a button
var button = opera.contexts.toolbar.createItem({
  title: 'My Extension',
  icon: 'icon.18x18.png',
  onclick: disableButton // disable when clicked

// Add it to the browser UI

function disableButton() {
  // Disable the button
  button.disabled = true;
  setTimeout(function() {
    button.disabled = false;
  }, 500); // re-enable after timeout

This article is licensed under a Creative Commons Attribution 3.0 Unported license.


No new comments accepted.