@@ -224,7 +224,6 @@ document.querySelector("#version").textContent = _("Version",
224224
225225 function updateContainersEnabled ( ) {
226226 const supported = browser . contextualIdentities && ! contextStore . disabledByHost ;
227- const containersEnabled = supported && contextStore . enabled ;
228227 document . querySelector ( "#containers-opt" ) . style . display = supported ? "" : "none" ;
229228 document . querySelector ( "#opt-containers" ) . disabled = ! supported ;
230229 document . querySelector ( "#opt-containers" ) . checked = contextStore . enabled ;
@@ -275,8 +274,8 @@ document.querySelector("#version").textContent = _("Version",
275274
276275 var containers = [ ] ;
277276 async function updateContainerOptions ( ) {
278- let newContainers = [ { cookieStoreId : "default" , name : "Default" } , ] ;
279- let identities = browser . contextualIdentities && await browser . contextualIdentities . query ( { } ) ;
277+ const newContainers = [ { cookieStoreId : "default" , name : _ ( "DefaultContainerName" ) } , ] ;
278+ const identities = ! contextStore . disabledByHost && browser . contextualIdentities && await browser . contextualIdentities . query ( { } ) ;
280279 if ( identities ) {
281280 newContainers . push ( ...identities ) ;
282281 }
@@ -304,7 +303,9 @@ document.querySelector("#version").textContent = _("Version",
304303 }
305304 containerSelect . onfocus = updateContainerOptions ;
306305 containerCopy . onfocus = updateContainerOptions ;
307- if ( contextStore . enabled ) await updateContainerOptions ( ) ;
306+ if ( contextStore . enabled ) {
307+ await updateContainerOptions ( ) ;
308+ }
308309
309310 UI . onSettings . addListener ( async ( ) => {
310311 currentPolicy = await UI . getPolicy ( cookieStoreId ) ;
0 commit comments