WebExtensions - Allow users to switch to another Firefox Profile

Hey guys,

I want to create a WebExtension that will allow users to switch Firefox profile, pretty much like, user-agent-switcher. Watch how it work https://www.screencast.com/t/Zj4AkTmFfA

Either search over https://developer.mozilla.org is not good or I am too n00b, unable to find anything.

Features I would like to present;

  1. Display a popup with all the profiles user have
  2. Allow switching profile
  3. Persist other addon storage in currently selected profile

My basic question at the moment is, how do we access list of Firefox profiles within WebExtension?

Thanks in advance.

This won’t work without native messaging and a custom OS-native program the users would need to install separately.

1 Like

Thanks for replying. Apart from examples from Mozilla, do you know other examples of native messaging?

I do not know if this is a good implementation, but here is one using node.js: