Files
webextensions-examples/bookmark-it
S C P 5dcff0bef0 Illustrative function name
updateActiveTab has ambiguous meaning, most prominent of which doesn't mean what we are actually trying to do.
2024-05-11 09:24:33 +05:30
..
2024-05-11 09:24:33 +05:30

bookmark-it

What it does

Displays a simple button in the menu bar that toggles a bookmark for the currently active tab.

To display the button, the extension registers a browserAction in the manifest.

A background script will listen for tab events and update the browserAction icon correspondingly. It also listens for browserAction.onClicked events to create or remove a bookmark when the user has clicked the icon.

What it shows

  • how to use the various bookmarks functions
    • create a bookmark
    • remove a bookmark
    • search bookmarks by url
  • how to register a browserAction
  • how to listen for tab changes