Thanks,
Ken
--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.
r37353 adds chrome.browserAction.setPopup(). Setting the popup to the
empty string disables the popup. The stable channel on windows got
this change in the last update.
Sam
*: http://codereview.chromium.org/545068
chrome.browserAction.setPopup("");
Uncaught Error: Invalid value for argument 0. Expected 'object' but got 'string'.
chrome.browserAction.setPopup({});
Uncaught Error: Invalid value for argument 0. Property 'popup': Property is required.
I was wrong. chrome.browserAction.setPopup() is not yet available in
windows stable or beta. The dev channel has it.
Sam
Mohamed,
Sorry to give a bad example. This time I will copy from a working test case:
// Disable the popup on the selected tab:
chrpme.tabs.getSelected(null, function(tab) {
chrome.browserAction.setPopup({
tabId: tab.id,
popup: '' // Empty string means no popup.
});
});
If you omit tabId, you set the default for tabs that have not been
explicitly set by a call with tabId.
>
> When you mean disabled, does that mean it will be not visible in the
> toolbar?
By "disabled", I mean it is as if you had not set a popup in the
manifest. So there will still be a browser action button in the
toolbar. chrome.browserAction.onClicked will fire when the user
clicks on the button.
Sam