Creates a container from the specified parameters.Does not allow multiple containers with the same name.
The container name.
The container color, must be one of: "blue", "turquoise", "green", "yellow", "orange", "red", "pink" or "purple". If nothing is supplied, it selects one at random.
The container icon, must be one of: "fingerprint", "briefcase", "dollar", "cart", "circle", "gift", "vacation", "food", "fruit", "pet", "tree", "chill"
Fetches all containers from Firefox's contextual identities API and checks if one exists with the specified name. Note: This operation is entirely case-insensitive.
boolean Returns true when cname matches an existing container or on query error.
Takes string parameters and returns them as a pseudo container object for use in other functions in the library.
Tries some simple ways to match containers to your input. Fuzzy matching is entirely case-insensitive.
The (partial) name of the container.
@returns An array representation of all containers.
Gets a container object from a supplied container id string.
Expects a cookieStringId e.g. "firefox-container-n"
The container name
The cookieStoreId of the first match of the query.
Removes specified container. No fuzzy matching is intentional here. If there are multiple containers with the same name (allowed by other container plugins), it chooses the one with the lowest cookieStoreId
The container name
Updates the specified container. TODO: pass an object to this when tridactyl gets proper flag parsing NOTE: while browser.contextualIdentities.create does check for valid color/icon combos, browser.contextualIdentities.update does not.
Expects a cookieStringId e.g. "firefox-container-n".
Helper function for create, returns a random valid IdentityColor for use if no color is applied at creation.