Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome Extension: Hide and show the browser action icon

Is it possible to show and hide the browser action icon from the options page?

I know how to do it with the page actions using the show and hide methods, but I don't see any similarities in browser actions.

like image 317
Oscardr Avatar asked Apr 04 '12 08:04

Oscardr


People also ask

How do I add an icon to Chrome extension?

To the right of your address bar, find your extensions' icons. On your computer, open Chrome. Drag the extension's icon to its new place.

What is browser action icon?

A browser action is a button that your extension adds to the browser's toolbar. The button has an icon, and may optionally have a popup whose content is specified using HTML, CSS, and JavaScript.

What is the puzzle piece icon in Google Chrome?

In 2019, Google added a new Extensions Menu to the Chrome browser. The menu, accessible via a small jigsaw puzzle icon near the address bar, allows users to access all of their extensions from one place. Users can also choose which extensions remain pinned to the toolbar and which are nested in the Extensions Menu.


2 Answers

From https://developer.chrome.com/extensions/browserAction:

If you want to create an icon that isn't always visible, use a page action instead of a browser action.

In other words: no, this isn't possible. Browser actions are permanent by design.

like image 189
Wladimir Palant Avatar answered Sep 20 '22 01:09

Wladimir Palant


Google defined Browser Action as static buttons, and Page Action as dynamic ones. Google is very careful with Chrome's interface, and don't want people use buttons in a different way they are "supposed" to do.

They do so because they think users have tu put an effort to learn to use Chrome, and Google want to present a consistent, coherent and minimalist user interface.

You don't have much freedom with regard to Chrome user interface.

like image 20
Alejandro Silvestri Avatar answered Sep 22 '22 01:09

Alejandro Silvestri