mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
Fixed pining extensions to the toolbar
This commit is contained in:
@@ -331,13 +331,13 @@ var gZenVerticalTabsManager = {
|
||||
if (isSingleToolbar) {
|
||||
this._navbarParent = navBar.parentElement;
|
||||
let elements = document.querySelectorAll('#nav-bar-customization-target > :is([cui-areatype="toolbar"], .chromeclass-toolbar-additional):not(#urlbar-container)');
|
||||
elements = Array.from(elements);
|
||||
elements = Array.from(elements).reverse();
|
||||
// Add separator if it doesn't exist
|
||||
if (!buttonsTarget.contains(this._topButtonsSeparatorElement)) {
|
||||
buttonsTarget.append(this._topButtonsSeparatorElement);
|
||||
}
|
||||
for (const button of elements) {
|
||||
buttonsTarget.append(button);
|
||||
this._topButtonsSeparatorElement.after(button);
|
||||
}
|
||||
buttonsTarget.prepend(document.getElementById('unified-extensions-button'));
|
||||
buttonsTarget.prepend(document.getElementById('PanelUI-button'));
|
||||
@@ -361,6 +361,7 @@ var gZenVerticalTabsManager = {
|
||||
for (const button of elements) {
|
||||
document.getElementById('nav-bar-customization-target').append(button);
|
||||
}
|
||||
this._topButtonsSeparatorElement.remove();
|
||||
document.documentElement.removeAttribute("zen-single-toolbar");
|
||||
navBar.appendChild(document.getElementById('PanelUI-button'));
|
||||
this._toolbarOriginalParent.prepend(navBar);
|
||||
|
17
src/browser/base/content/browser-addons-js.patch
Normal file
17
src/browser/base/content/browser-addons-js.patch
Normal file
@@ -0,0 +1,17 @@
|
||||
diff --git a/browser/base/content/browser-addons.js b/browser/base/content/browser-addons.js
|
||||
index 992d07daaef1abc4554a43aa654888f66963c575..6db4dd3864375da4b83a3a6f1a656403f324093e 100644
|
||||
--- a/browser/base/content/browser-addons.js
|
||||
+++ b/browser/base/content/browser-addons.js
|
||||
@@ -2113,10 +2113,12 @@ var gUnifiedExtensions = {
|
||||
? CustomizableUI.AREA_NAVBAR
|
||||
: CustomizableUI.AREA_ADDONS;
|
||||
let newPosition = shouldPinToToolbar ? undefined : 0;
|
||||
+ for (const window of CustomizableUI.windows) window.gZenVerticalTabsManager._preCustomize();
|
||||
|
||||
CustomizableUI.addWidgetToArea(widgetId, newArea, newPosition);
|
||||
|
||||
this.updateAttention();
|
||||
+ for (const window of CustomizableUI.windows) window.gZenVerticalTabsManager._updateEvent();
|
||||
},
|
||||
|
||||
async moveWidget(menu, direction) {
|
Reference in New Issue
Block a user