Page actions are a simple way to represent actions that can be taken on a page ("Email this page", "Share with Facebook", etc).
User interface
Page actions are displayed in the right side of the Omnibox. New actions get added to the left of the star:
A maximum of 8 (?) actions can appear at the top level, any additional ones overflow into a drop-down menu:
Manifest
Developers can include page actions in the manifest using the following syntax:
"page_actions": [ { "id": "myaction", // chosen by developer, and should be unique within their extension "name": "Do action", "icons": ["favicon.png", "favicon2.png"] } ]
Supported icon image formats include for example png, bmp, ico, jpg, gif. If an image larger than 16x16 is specified, it will be resized to fit.
Methods
enableForTab
void chrome.pageActions.enableForTab(, string pageActionId, object action)
Undocumented.
A description from the json schema def of the function goes here.
Parameters
- pageActionId
(
optional Type array of string )
- Undocumented.
- Description of this parameter from the json schema.
-
- action
(
optional Type array of object )
- Undocumented.
- Description of this parameter from the json schema.
-
- tabId
(
optional Type array of integer )
- Undocumented.
- Description of this parameter from the json schema.
-
- url
(
optional Type array of string )
- Undocumented.
- Description of this parameter from the json schema.
-
- title
(
optional Type array of string )
- Undocumented.
- Description of this parameter from the json schema.
-
- iconId
(
optional Type array of integer )
- Undocumented.
- Description of this parameter from the json schema.
-
Returns
Callback function
If you specify the callback parameter, it should specify a function that looks like this:
function(Type param1, Type param2) {...});
disableForTab
void chrome.pageActions.disableForTab(, string pageActionId, object action)
Undocumented.
A description from the json schema def of the function goes here.
Parameters
- pageActionId
(
optional Type array of string )
- Undocumented.
- Description of this parameter from the json schema.
-
- action
(
optional Type array of object )
- Undocumented.
- Description of this parameter from the json schema.
-
- tabId
(
optional Type array of integer )
- Undocumented.
- Description of this parameter from the json schema.
-
- url
(
optional Type array of string )
- Undocumented.
- Description of this parameter from the json schema.
-
Returns
Callback function
If you specify the callback parameter, it should specify a function that looks like this:
function(Type param1, Type param2) {...});
Events
event name
chrome.bookmarks.onEvent.addListener(function(Type param1, Type param2) {...});
Undocumented.
A description from the json schema def of the event goes here.
Parameters