Skip to content

azappella/webextension-experiment-tags

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebExtension Experiment For Firefox Tags

Since the WebExtension API does not currently support bookmarks tags (see bugzilla thread, I created this WebExtension Experiment API to expose some of the internal Firefox API for tags, thus enabling users/developers to access & retrieve bookmark tags in their own extensions.

There is an example extension (in the /src folder) which shows how to use the experimental API in a background.js script.

How to install this API and the associated WebExtension

  1. Run a non-release build (Nightly or unbranded Beta/Release), the latest tested working version is 103.0b2 (or newer) build.
  2. Navigate to about:config
    • set the pref extensions.legacy.enabled to true
    • set the pref extensions.experiments.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

getURIsForTags(tags) - Finding all URLs with a given tag

const uris = browser.experiments.tags.getURIsForTags(["tag 1","tag 2"]);

// 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

About

WebExtension Experiment API to get access/read bookmark tags in Firefox

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published