bugfix: Fix Temporary Containers Automatic mode | change firefox -> zen for default cookiestore id #2411
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #172
This PR fixes automatic mode for Temporary Containers by patching
firefox-default
tozen-default
. I also included changes to the other store names to maintain consistency.Based off brief testing this does not impact Workspaces. The default container of a workspace takes precedence over an automatic container.
I can't comment whether this fix breaks other container extensions. If they hardcoded checking cookieStoreId against
firefox-default
, then this fix would break them.Why temporary containers didn't work
Inspecting the Temporary Containers extension and then opening a new tab, you will notice an uncaught error from
showOrHide
caused by L4943.Examining Temporary Containers source code,
showOrHide
is found inpageaction.ts
with the line causing the throw at L43. The correct behaviour is theif else
on L31 executing, not the else.In Zen that
if else
doesn't execute because Temporary Container assumes the default cookieStoreId is the browser's name (zen
) appended with-default
. However the default cookiestore id is set tofirefox-default
. Thus theelse if
doesn't execute aszen-default
does not equalfirefox-default
and the extension proceeds to theelse
causing the error.