mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-29 06:28:39 +00:00
chore: Refactor Zen theme modifier, fix notification deck placement, and update tab styling
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
diff --git a/browser/base/content/browser-siteProtections.js b/browser/base/content/browser-siteProtections.js
|
||||
index 5364aa74cd938141e85e3a3333e8d1fa58ea3ae4..5cd1748a883b19caa2977c1047d51b9551686bf4 100644
|
||||
--- a/browser/base/content/browser-siteProtections.js
|
||||
+++ b/browser/base/content/browser-siteProtections.js
|
||||
@@ -1904,9 +1904,14 @@ var gProtectionsHandler = {
|
||||
// the information contained there would mostly be broken and/or
|
||||
// irrelevant anyway.
|
||||
this._trackingProtectionIconContainer.hidden = true;
|
||||
+ // ZEN: We make a clear distinction between native UI and websites for security reasons.
|
||||
+ // we can remove the separator for websites that dont need it, like "about:*" pages, where
|
||||
+ // they are safe to use.
|
||||
+ this._nativeSeparatorForWebsitesContainer.hidden = true;
|
||||
return;
|
||||
}
|
||||
this._trackingProtectionIconContainer.hidden = false;
|
||||
+ this._nativeSeparatorForWebsitesContainer.hidden = false;
|
||||
|
||||
// Check whether the user has added an exception for this site.
|
||||
this.hasException = ContentBlockingAllowList.includes(
|
||||
@@ -2882,4 +2887,12 @@ var gProtectionsHandler = {
|
||||
|
||||
return messageEl;
|
||||
},
|
||||
+
|
||||
+ get _nativeSeparatorForWebsitesContainer() {
|
||||
+ delete this._nativeSeparatorForWebsitesContainer;
|
||||
+ return (this._nativeSeparatorForWebsitesContainer = document.getElementById(
|
||||
+ "zen-website-and-native-separator"
|
||||
+ ));
|
||||
+ },
|
||||
+
|
||||
};
|
@@ -119,7 +119,7 @@ var ZenThemeModifier = {
|
||||
|
||||
// Fix notification deck
|
||||
document.getElementById("zen-appcontent-navbar-container")
|
||||
.appendChild(document.getElementById("tab-notification-deck"));
|
||||
.appendChild(document.getElementById("tab-notification-deck-template"));
|
||||
|
||||
gZenVerticalTabsManager.init();
|
||||
gZenCompactModeManager.init();
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
index 2674dc2bebf436529a46d45c52cb56e86b82c03f..06d30b3e33562d8eaa04522d3719728126c59a81 100644
|
||||
index 6e7a8ca21a20626a0607d860c56e39991b4aa2b8..d998059907f2467b0648c94c54c502278e2b188d 100644
|
||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
@@ -3208,6 +3208,11 @@
|
||||
@@ -3214,6 +3214,11 @@
|
||||
) {
|
||||
tabWasReused = true;
|
||||
tab = this.selectedTab;
|
||||
@@ -14,7 +14,7 @@ index 2674dc2bebf436529a46d45c52cb56e86b82c03f..06d30b3e33562d8eaa04522d37197281
|
||||
if (!tabData.pinned) {
|
||||
this.unpinTab(tab);
|
||||
} else {
|
||||
@@ -3257,6 +3262,10 @@
|
||||
@@ -3263,6 +3268,10 @@
|
||||
preferredRemoteType,
|
||||
});
|
||||
|
||||
@@ -25,3 +25,11 @@ index 2674dc2bebf436529a46d45c52cb56e86b82c03f..06d30b3e33562d8eaa04522d37197281
|
||||
if (select) {
|
||||
tabToSelect = tab;
|
||||
}
|
||||
@@ -4150,6 +4159,7 @@
|
||||
isLastTab ||
|
||||
aTab.pinned ||
|
||||
aTab.hidden ||
|
||||
+ true ||
|
||||
this._removingTabs.size >
|
||||
3 /* don't want lots of concurrent animations */ ||
|
||||
!aTab.hasAttribute(
|
||||
|
Reference in New Issue
Block a user