0

i know that i can open multiple profiles (different proxies), every profile in a firefox window, with many extentions or with commande "-P {PROFILENAME} -no-remote".

i would ask if it's possible to open multiple profiles in same window, every profile in one tab (thinking about having someone develop a custom extention).

thanx guys

  • As written, this does not appear to be a programming specific question. As such: Questions about **general computing hardware and software are off-topic** for Stack Overflow unless they directly involve tools used primarily for programming. You may be able to get help on [Super User](http://superuser.com/about). – Makyen Sep 01 '16 at 16:54

1 Answers1

0

You might be able to fake it by making one Firefox window the parent of another. I did a quick proof of concept using SetParent on two Firefox windows running in separate processes with different profile paths:

foxception

The inner window is definitely a sub-window of the outer window here. For example, if you try to maximise the inner window it simply expands to fill the outer window.

However, you can't a window a child of a tab, because a tab is not a window. To achieve the illusion of having the window embedded in a tab, you'd have to listen for when the current tab changes (gBrowser.tabContainer.addEventListener("TabSelect", f)) and switch to the correct sub-window for that tab. You can use SetWindowPos to resize and reposition the sub-window to fill the tab content area.

To slice off the chrome elements (window border, toolbars, etc.) you could either use SetWindowRgn or perhaps delete those elements from the DOM of the sub-window.

You would also have to make sure the Firefox sub-processes get closed when the corresponding tab is closed.

Note that you can do all this from JavaScript using the foreign-function-interface: https://developer.mozilla.org/en-US/docs/Mozilla/js-ctypes


This may be a dodgy-arse solution, but honestly I can't think of anything else that could possibly be better, apart from re-evaluating your requirements. Firefox simply isn't designed to deal with more than one profile per process.

Cauterite
  • 1,637
  • 17
  • 24