A page action is a clickable icon inside the browser's address bar.
You can listen for clicks on the icon, or specify a popup that will open when the icon is clicked.
If you specify a popup, you can define its contents and behavior using HTML, CSS, and JavaScript—just like a normal web page. JavaScript running in the popup gets access to all the same WebExtension APIs as your background scripts.
You can define most of a page action's properties declaratively using the page_action
key in your manifest.json
, but can also redefine them programmatically using this API.
Page actions are for actions that are only relevant to particular pages (such as "bookmark the current tab"). If they are relevant to the browser as a whole (such as "show all bookmarks"), use a browser action instead.