-
Notifications
You must be signed in to change notification settings - Fork 346
Developer Documentation
Danny Colin edited this page Dec 29, 2023
·
2 revisions
- Type
about:debugging
in the address bar - Click on "This Firefox" button in the sidebar
- Search Multi-Account Containers in the list and click on the "inspect" button
- In the newly opened devtool window, go to "Storage" tab
- Expand the "Extension Storage" item in the sidebar
Key starting with siteContainerMap@@_
are website assignments mapping.
- Go to about:profiles
- Open the root directory of the current profile
- The following files are used by the extension:
- [root-directory]/containers.json - used by the browser to store the containers available, their names, icons and colors.
- [root-directory]/browser-extension-data/@testpilot-containers/storage - used by the web extension to store assigned containers, also what versions the user opened the container on to show "new" content.
- The following may also exist: [root-directory]/jetpack/@testpilot-containers/simple-storage - this is the legacy storage of the extension and used to remember what preferences the user had to clean up when the user uninstalls the extension. This in 57 is no longer needed and removing container addons will remove all containers when there are none left.
Multi-Account Containers provides the possibility for other WebExtension to ask for assignments by using the runtime.sendMessage
API.
The contextualIdentities
permission is required to send messages.
The message that is sent must be an object with the following properties:
-
method
set togetAssignment
-
url
with the URL to check for assignment
The reply is a Promise that resolves to either null
if no assignment was found or to an object with at least the following properties:
-
neverAsk
, boolean,true
if the assignment was made permanent with "Remember my choice" -
userContextId
, string, thecookieStoreId
without the leadingfirefox-container-
If the contextualIdentities
permission is missing, no method
is given, the method
is unknown or the url
parameter is undefined
for the getAssignment
method the Promise will get rejected.
Example usage:
browser.runtime.sendMessage('@testpilot-containers', {
method: 'getAssignment',
url: 'https://example.com'
}).then((assignment) => {
// Use result
}).catch((error) => {
// Something went wrong
});