stoically / temporary-containers

Firefox Add-on that lets you open automatically managed disposable containers
https://addons.mozilla.org/firefox/addon/temporary-containers/
MIT License
852 stars 60 forks source link

toggling isolation on and off in automatic mode #337

Closed wjtk4444 closed 4 years ago

wjtk4444 commented 4 years ago

I'm currently using Temporary Containers in full tinfoil hat mode - automatic isolation for different domains. There are, however, some cases where I want to suspend the automatic mode - eg. online payments that redirect several times. I tried the Alt+I hotkey, but it seems to do nothing in automatic mode (other hotkeys work as intended). The only workaround I found so far is to:

Temporary Containers Version: 1.7 Firefox Version: 70.0.1-3

Not sure if it's an actual issue (broken hotkey) or if I'm just using it wrong, but it would certainly be nice to have a more elegant way of "suspending" the automatic mode.

stoically commented 4 years ago

Just to be sure: Did you enable the shortcut in the TC preferences under Advanced -> Keyboard shortcuts?

Another way to toggle the isolation would be the crossed circle icon in the popup, which can be enabled for the toolbar icon (general preferences), and as additional icon in the address bar (advanced -> popup).

stoically commented 4 years ago

Oh and btw, if you re-enable TC after disabling, it'll clean up leftover TCs itself eventually, there should be no reason to do that manually. (Unless you completely remove TC, in which case its storage is wiped and it can't remove leftover TCs)

wjtk4444 commented 4 years ago

It seems that my testing method was at fault. I used the middle mouse button to open new tabs (those open in a new, random container regardless of the isolation being toggled on or off). Clicking (with either of mouse buttons) on an actual links works as expected. Thanks for mentioning the icon, I had no idea that such option existed.

Another way to toggle the isolation would be the crossed circle icon in the popup, which can be enabled for the toolbar icon (general preferences), and as additional icon in the address bar (advanced -> popup).

stoically commented 4 years ago

I used the middle mouse button to open new tabs (those open in a new, random container regardless of the isolation being toggled on or off).

That would be a bug, since mouse click isolation should be disabled as well. However, I've just tested and disabling isolation doesn't isolate middle mouse clicks for me. Could you provide steps to reproduce and/or a debug log?

wjtk4444 commented 4 years ago

Sure thing. Fresh FF 71.0 profile, fresh TC install with the following changed from default (manually, not by "import settings").

Here's a video I recorded during obtaining the log, it's short (<60s) and should allow you to reproduce the steps easily.

tc.log

wjtk4444 commented 4 years ago

This question will be a bit off, but I don't think that it deserves its own issue. Since I'm tinkering with FF and TC right now, I updated my userChrome.css to show TC's icon in urlbar. I like it minimal, so here's how it looks:

image

css, in case someone would be interested

#userContext-icons,  /* container icon and name */
#pageActionButton,   /* reload/stop page        */
#star-button-box {   /* bookmark page           */ 
    display: none;
}

By default, page action buttons don't display on about:newtab url, so I wanted to add a rule that would make TC icon (and a separator) appear all the time. And here goes the problem, the rule looks like that:

#pageActionSeparator,
#pageAction-urlbar-_c607c8df-14a7-4f28-894f-29e8722976af_ {
    display: block !important;
}

I cannot use css classes either, they're common for every item that goes at the end of the url bar.

Not a bug, not really a feature request, but would it be possible for you to add a custom css class to that icon? Something like tc_pageActionIcon or whatever. Current selector differs between firefox installation / profiles and I happen to use a bunch of those.

stoically commented 4 years ago

Thanks for the log and video. So in the video, what happens:

That's expected behavior, and doesn't involve middle mouse clicks. Did you expect something else to happen?

would it be possible for you to add a custom css class to that icon?

To my knowledge that's unfortunately not possible, no - since it's not supported by the Firefox API.

wjtk4444 commented 4 years ago

second 24: isolation is disabled

Yet opening new tabs (either with middle click on the top bar or clicking the [+] icon) causes new temporary containers to spawn. I'd expect new tabs to open in the same container when isolation is disabled.

It doesn't bother me at all though, I just find it a bit weird.

stoically commented 4 years ago

Ah, you mean the native behavior when clicking the new tab button / tab bar. That's part of the Automatic Mode, not part of the Isolation. Disabling Automatic Mode when toggling isolation seems a bit counter-intuitive to me - and it would lead to navigating in the default container. So I think I'd like to keep it that way.