Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why I cannot use two or more "browser_action", "page_action" or "app" together?

Is there any good reason why I can't use two of them together?

  • browser_action
  • page_action
  • app

I can't think why single extension can't use browser and page specific actions together. Why should I have to write single extension for each action ...

like image 835
Marek Sebera Avatar asked Oct 25 '11 11:10

Marek Sebera


1 Answers

For a browser that boasts about its simplicity I believe that is the clearest explanation. To prevent clutter.

Packaged Apps is the easiest to explain as they are basically an alternative to Hosted Apps for developers that don't wish to host a service or wish to make their app fully integrated in to Chrome and/or work offline. However, since packaged apps are bundled as extensions this prevents them from adding anything to the browser's chrome since hosted apps don't have this ability.

Regarding the action choice, I can only imagine this restriction is to help prevent extensions from overcrowding the address bar and the toolbar with duplication.

In a lot of cases using badges and the onClicked event correctly can replicate a lot of the functionality of page actions in browser actions while using a combination of content scripts and message passing to trigger changes.

The StumbleUpon extension rotates its browser action's behavior depending on whether or not its toolbar is currently displaying.

like image 98
neocotic Avatar answered Nov 19 '22 13:11

neocotic