10 comments

  • konradkpl2 hours ago
    There is a built-in possibility to assign URLs to containers: <a href="https:&#x2F;&#x2F;konradkruk.com&#x2F;images&#x2F;CleanShot%202024-12-02%20at%2014.40.29%402x.png" rel="nofollow">https:&#x2F;&#x2F;konradkruk.com&#x2F;images&#x2F;CleanShot%202024-12-02%20at%20...</a><p>However, there is no possibility to adjust matching rules, so this script offers a bit more customization options.
    • 0x696C69611 hour ago
      Yep, this addon is for more advanced scenarios. For example, I have different AWS accounts open in a different containers and I want codebuild urls to open in the correct one depending on the project name.
    • TonyTrapp1 hour ago
      That icon isn&#x27;t showing up here. Are you sure it isn&#x27;t coming from another add-on?
      • konradkpl1 hour ago
        I just use this one <a href="https:&#x2F;&#x2F;addons.mozilla.org&#x2F;en-US&#x2F;firefox&#x2F;addon&#x2F;multi-account-containers&#x2F;" rel="nofollow">https:&#x2F;&#x2F;addons.mozilla.org&#x2F;en-US&#x2F;firefox&#x2F;addon&#x2F;multi-account...</a> and Firefox Nightly
  • protoster2 hours ago
    Yes! I need this. I have a separate youtube container for background listening videos where I want the video quality to be set low. I want a container so that I don&#x27; t have to change quality back and forth when watching videos at full quality. Currently, I have to manually open a container tab and then navigate to the channel.
  • Ch00k1 hour ago
    Does it support regular expressions to match parts of a URL? I have two different GitHub accounts, that I need to be able open in different containers based on the organization name (<a href="https:&#x2F;&#x2F;github.com&#x2F;&lt;org&gt;" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;&lt;org&gt;</a>). I am currently using <a href="https:&#x2F;&#x2F;addons.mozilla.org&#x2F;en-CA&#x2F;firefox&#x2F;addon&#x2F;containerise&#x2F;" rel="nofollow">https:&#x2F;&#x2F;addons.mozilla.org&#x2F;en-CA&#x2F;firefox&#x2F;addon&#x2F;containerise&#x2F;</a>, but it is a bit of a pain. I would much prefer defining my rules in code.
    • 0x696C69611 hour ago
      Yeah, it&#x27;s JavaScript so you can write whatever logic you want!<p><pre><code> if (url.hostname === &quot;github.com&quot;) { if (&#x2F;.*foo.*&#x2F;.test(url.pathname)) { return &quot;My Foo Conatiner&quot; } if (&#x2F;.*bar.*&#x2F;.test(url.pathname)) { return &quot;My Bar Container&quot; } }</code></pre>
  • worble1 hour ago
    While containers are a great feature, it&#x27;s irritating that the official mozilla extension does have greater controls for controlling when pages get loaded into containers. For example Bandcamp has every artist on their own subdomain, which means even though bandcamp.com is set to open in its own container, none of the artists pages do.<p>I&#x27;ve been using <a href="https:&#x2F;&#x2F;addons.mozilla.org&#x2F;en-CA&#x2F;firefox&#x2F;addon&#x2F;containerise" rel="nofollow">https:&#x2F;&#x2F;addons.mozilla.org&#x2F;en-CA&#x2F;firefox&#x2F;addon&#x2F;containerise</a> to handle this for me.
  • OutOfHere1 hour ago
    I don&#x27;t know why it&#x27;s so difficult in Firefox to just run each URL domain in its own container unless instructed otherwise.
    • 0x696C69610 minutes ago
      You could accomplish that with ContainerScript like this:<p><pre><code> return url.hostname; </code></pre> But your container list would get pretty messy.
  • weberer1 hour ago
    In the official Multi-Account Containers add-on, there&#x27;s an option for &quot;Always open this site in...&quot; where you can chose a container. How does this differ?
    • protoster1 hour ago
      Different containers for different paths on the same domain. Obviously not a common use case, but it&#x27;s there. It&#x27;s fully programmable, so you can open a different container based on the current phase of the moon if your heart desires it.
  • bluelightning2k2 hours ago
    This is usually my type of thing but am I being thick, I don&#x27;t quite get what this is for? Could we get a zoomed out example of addressing said container?
    • cuanim2 hours ago
      I think it just auto opens a container according to the URL. So if url == &#x27;amazon.com&#x27; then switch container of tab to shopping.
  • DemocracyFTW219 minutes ago
    Could someone explain to me what &quot;container&quot; means in this context and why would I want to use &quot;containers&quot; for URLs &#x2F; domains?
    • 0x696C69616 minutes ago
      Firefox containers let you isolate browsing contexts. Think separate cookie jars. Example: You can have one container for work (logged into work Gmail, Slack) and another for personal (personal Gmail, Amazon). They won&#x27;t share logins or tracking data.
  • vfclists1 hour ago
    Having viewed the code by the CRX addon I&#x27;d like to ask -<p>Was all or part of the program written in another language and compiled to Javascript?<p>My Javascript is not the good but it looks that way to me, or perhaps was constructed from some table driven system.
    • 0x696C69611 hour ago
      It&#x27;s TypeScript bundled with esbuild. I needed to minify the output because the monaco editor resulted in file sizes over the 4MB limit imposed on FF addons. The background script is here: <a href="https:&#x2F;&#x2F;github.com&#x2F;icholy&#x2F;ContainerScript&#x2F;blob&#x2F;master&#x2F;background.ts">https:&#x2F;&#x2F;github.com&#x2F;icholy&#x2F;ContainerScript&#x2F;blob&#x2F;master&#x2F;backgr...</a>