Files
chrome-extensions-samples/api-samples/action
Oliver Dunk d2296fac85 Update dependencies (#1096)
Updates a nunber of dependencies in a single PR. These were
suggested by dependabot but updating them individually would
mean the reposistory would be in a broken state until everything
had merged.

I'm not personally a huge fan of lowercasing doctype, but
Prettier has taken an opinionated stance here and there is not a
way to disable it:

https://github.com/prettier/prettier/issues/15096
2024-02-20 12:53:23 +01:00
..
2024-02-20 12:53:23 +01:00
2024-02-20 12:53:23 +01:00

chrome.action

This sample demonstrates the use of Action API which changes the badge text,icon,hover text or popup page depending on the user's choice or action.

API Link

Overview

This sample demonstrates the Action API by allowing the user to perform the below actions:

  • Toggle Enabled State : to enable or disable the extensions' action button in Chrome's toolbar and menu.
  • Change Popup Page : to change the popup page by entering a new string or url.
  • Badge Text : to insert a text overlay with a solid background color.
  • Icon Image : to change the action button's icon.
  • Hover Text : it is visible when mousing over the extension's icon.

Implementation Notes

The user can set values to implement above functionalities from here

Running this extension

  1. Clone this repository.
  2. Load this directory in Chrome as an unpacked extension.
  3. Click the extension's icon in the toolbar to open the demo page.