Since the WebExtensions API does not currently support bookmarks tags, I created this WebExtension Experiment API to expose some of the internal Firefox API for tags, thus enabling users/developers to access/read/retrieve bookmark tags in their own extensions.
NOTE: It is very likely that this API will not work in the near future, as there are plans to merge the tagging API with the bookmarking API.
- Run a non-release build (Nightly or unbranded Beta/Release) version 59 (or newer) build.
- Navigate to
about:config
and set the prefextensions.legacy.enabled
totrue
. - Navigate to
about:debugging
, choose "Load Temporary Add-on" and selectmanifest.json
in this project. You should see a new entry in the list of extensions titled "Firefox Bookmark Webhooks".
You should see a new toolbar icon that resembles a tag.
getURIsForTag(tag)
- Finding all URLs with a given tag
const uris = browser.experiments.tags.getURIsForTag("tag 1");
// Returns an array of URIs
getTagsForURI(URI)
- Getting all tags associated with a URL
const tags = browser.experiments.tags.getTagsForURI("http://example.com/");
// Returns an array of tags stored for that URI
- Firefox issue tracker #1225916
- StackOverflow Question About Getting Bookmark Tags
- WebExtensions API currently not supporting bookmarks tags
- WebExtensions API Development
- Using The Places Tagging Service
- nsITaggingService
- XPConnectWrappers
- XPConnectWrappers More Information
This software is supplied "AS IS" without any warranties and support.
Andrew Zappella