Skip to content

Instantly share code, notes, and snippets.

@edwardgalligan
Created November 3, 2020 11:50
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edwardgalligan/3d07875753ac6fa79a191a0d5ccbfe5a to your computer and use it in GitHub Desktop.
Save edwardgalligan/3d07875753ac6fa79a191a0d5ccbfe5a to your computer and use it in GitHub Desktop.
Quick hack to export container mapping from Firefox Multi-Account Containers

This is a very simplistic hack, and doesn't do a lot for you so there's a few steps.

  1. Go to about:addons, click the gear button and select Debug Addons
  2. Debug the Firefox Multi-Account Containers add-on
  3. Go to the console tab and paste in the code below
  4. Right-click on the output and choose Export Visible Messages To
browser.storage.local.get().then(obj => {
const uuidMap = {};
const siteMap = {};
Object.keys(obj).forEach(k => {
if (k !== 'identitiesState@@_firefox-default' && k.startsWith('identitiesState@@_')) {
uuidMap[obj[k].macAddonUUID] = k;
}
});
Object.keys(obj).forEach(k => {
if (k.startsWith('siteContainerMap@@_')) {
const site = k.substring(19);
const uuid = uuidMap[obj[k].identityMacAddonUUID];
if (typeof siteMap[uuid] === 'undefined') {
siteMap[uuid] = [];
}
siteMap[uuid].push(site);
}
});
console.log(JSON.stringify(siteMap));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment