Skip to content
WebExtension Experiment API to get access/read bookmark tags in Firefox
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
experiments/tags
icons
src
README.md
manifest.json

README.md

WebExtension Experiment For Firefox Tags

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.

How to install this API and WebExtension

  1. Run a non-release build (Nightly or unbranded Beta/Release) version 59 (or newer) build.
  2. Navigate to about:config and set the pref extensions.legacy.enabled to true.
  3. Navigate to about:debugging, choose "Load Temporary Add-on" and select manifest.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.

API

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

References

Disclaimer

This software is supplied "AS IS" without any warranties and support.

Author

Andrew Zappella

You can’t perform that action at this time.