Perfect! Combine this addon with the Temporary Containers (TC) addon, and you can automatically open links in its relevant container.
Containerise lets you always reuse a specific container for a domain (e.g. youtube.com). TC allows you can create an isolated tab (like a Private Window, but in Tab form) per domain.
You can make navigation away from 'saved' containers (such as YouTube), default to a general container, and you can make all navigation in containers that match a domain reopen in that domain container.
You want to be careful with combining the two addons though, as you might get stuck in an infinite loop, where TC will keep creating new temporary containers. To get this to work, do the following:
- install 'Firefox Multi-Account Containers' addon if you haven't already
- install 'Containerise' addon
- go to Settings > Addons > Containerise
- enable the 'Default container'
- install 'Temporary Containers' addon
- go to Settings > Addons > Temporary Containers
- enable 'Show popup when clicking toolbar icon'
- [optional] under 'Container Number', select 'Reuse available numbers'
- change to the 'Isolation' tab at the top, make sure you're on the 'Global' tab
- under 'Navigation' and 'Mouse Click', change all the options to 'Different from Tab Domains and Subdomains'
- [important] under 'Exclude Permanent Containers', select the 'Default' container you created at the start
- under 'Multi-Account Containers', select 'Isolate'
- at the top, select the 'Advanced' tab
- expand the 'Popup' section and select 'Isolation Per Domain'
- expand the 'Isolation' section and enable 'Instead of creating a new tab, replace the current tab in case of Isolation'
- [optional] in the same section, enable 'auto-close leftover redirector tabs'
Okay, now you have the 'default' container setup, everything not in a domain container should open in there.
For each domain or login you want to group together, first create an entry in 'Containerise', then an entry in 'Temporary Containers'. I will use Reddit, YouTube and Google as an example. I want Reddit links to open in a Reddit container and I want to group the YouTube and Google links into its own container (since they share a Google login).
First, the Reddit container, as it's simpler:
- I open the 'Containerise' menu icon and select the 'CSV Editor' (the pencil icon) - warning this is a popup dialog and will disappear if you click away!
- next, I add the following entries (everything inside the backticks):
- press the save icon at the bottom and you're done!
You see 2 entries, because I want old.reddit.com to also be included (this is important later).
Time to add it to 'Temporary Containers':
- I open the options through the orange '+' icon in the top-right corner
- then I head to Isolation > Per Domain
- under 'Domain Pattern' section, I add (without quotes): 'reddit.com' (note how I don't need the * here)
- under 'Always open in' section, select 'Enabled' and tick the box for 'Disable if Navigation in Temporary Containers' (this will leave your domain containers in 'Containerise' alone)
- press the 'Add reddit.com' button at the bottom and you'll see an entry in the bottom area
You're done! Try opening 'reddit.com' and 'old.reddit.com', login and you should see both are in the same container. Feel free to customise the container, changing the colours and icons etc. If you open a non-domain whilst inside the 'Reddit' container, it will open in the 'Default' container. Likewise, if you open a Reddit link in a different container (such as the 'Default'), it will open inside the 'Reddit' container.
For the trickier grouping of my 'Google' container, I will do the same but include 'google.com' as well as 'youtube.com' in my steps (you may need to add your country local version as well. e.g. 'google.co.uk' - this part is important, or you may get infinite tabs opening!).