fix: Fixed compact mode being available in popup windows, b=(no-bug), c=compact-mode

This commit is contained in:
mr. m
2025-05-20 08:53:03 +02:00
parent 0392d60352
commit adfc235865

View File

@@ -76,7 +76,14 @@ var gZenCompactModeManager = {
return lazyCompactMode.mainAppWrapper.getAttribute('zen-compact-mode') === 'true';
},
get shouldBeCompact() {
return !document.documentElement.getAttribute('chromehidden').includes('toolbar');
},
set preference(value) {
if (!this.shouldBeCompact) {
value = false;
}
if (
this.preference === value ||
document.documentElement.hasAttribute('zen-compact-animating')