4

I want to create a Firefox Addon using WebExtensions, that will;

  • Display user, list of already created Firefox profiles
  • Ability to switch Profile

Just like User Agent Switcher (it was built on top of Mozilla Addon SDK). Watch https://www.screencast.com/t/Zj4AkTmFfA

I am unable to find any api reference over https://developer.mozilla.org/en-US/Add-ons/WebExtensions to access profiles list or switch profile.

Not sure if Mozilla is going to remove accessing Firefox profiles from within WebExtensions like they have restricted access to Firefox preferences (about:config).

Ahmed Memon
  • 219
  • 3
  • 11

1 Answers1

2

I'm afraid there is no API, at the moment, to deal with user profiles. Other than the list on MDN, there's a list of APIs that have been approved and are being implemented.

However, there is one mid-term possibility: you can file a bug to request the support for a new API. This doesn't necessarily mean that your request will be implemented, but it does mean that it will be at least discussed. There's a guide here on how to do that.

If none of these options address your situation, you can consider filing an API request. Before you do, please keep in mind:

  • The goal of WebExtensions is not to support every use case from legacy extensions. In most cases, the functionality you need can be
    built with WebExtensions APIs, but it requires some re-thinking and
    modification.
  • Generic or very broad bugs are hard to turn into actionable issues. Try to limit the focus if possible.
  • We do try to review all incoming API requests, but it takes time, so please be patient.
  • Do a search to see if the bug exists already.
  • Still want to file a new API? You can do so here.

Please note that there are ideas for filesystem access post Firefox 57: this could potentially be used to at least show the different user profiles.

Dexter
  • 2,482
  • 27
  • 40
  • Thanks @Dexter, NilkasG suggested it may be possible via native messaging https://discourse.mozilla-community.org/t/webextensions-allow-users-to-switch-to-another-firefox-profile/17194/4 I dont think Mozilla will add this feature, their priority seems like restricting addon developers as much as possible. – Ahmed Memon Jul 21 '17 at 00:43
  • 1
    You're welcome! I still think it might be useful to file a bug about it, otherwise the devs won't really know what the community *really* needs :) – Dexter Jul 21 '17 at 08:02
  • 1
    filed the request https://bugzilla.mozilla.org/show_bug.cgi?id=1383077, lets see. – Ahmed Memon Jul 21 '17 at 15:07
  • 2
    Infact had a voice conversation with core developers, they asked for use-cases, I did provided but seems like there were not enough requests. – Ahmed Memon Nov 28 '17 at 21:06