mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-16 23:06:30 +00:00
Removed zen-browser scripts and fixed tools command
This commit is contained in:
@@ -1,12 +0,0 @@
|
|||||||
diff --git a/browser/base/content/browser-sets.inc b/browser/base/content/browser-sets.inc
|
|
||||||
index 019b3cc4691520667f9bd595444e7cc752307c98..17057b24e86dce43da30bf95d1d229044704546f 100644
|
|
||||||
--- a/browser/base/content/browser-sets.inc
|
|
||||||
+++ b/browser/base/content/browser-sets.inc
|
|
||||||
@@ -15,6 +15,7 @@
|
|
||||||
</stringbundleset>
|
|
||||||
|
|
||||||
<commandset id="mainCommandSet">
|
|
||||||
+ <command id="Tools:ZenProfiles" oncommand="BrowserOpenZenProfilesMgr();"/>
|
|
||||||
<command id="cmd_newNavigator" oncommand="OpenBrowserWindow()"/>
|
|
||||||
<command id="cmd_handleBackspace" oncommand="BrowserHandleBackspace();" />
|
|
||||||
<command id="cmd_handleShiftBackspace" oncommand="BrowserHandleShiftBackspace();" />
|
|
@@ -1,16 +1,8 @@
|
|||||||
diff --git a/browser/base/content/global-scripts.inc b/browser/base/content/global-scripts.inc
|
diff --git a/browser/base/content/global-scripts.inc b/browser/base/content/global-scripts.inc
|
||||||
index f5f43b8f9509c37bf217b3ed1c6c562be85430e0..41fb7b9439a1be9c47a7f200546b0230ec6a7505 100644
|
index f5f43b8f9509c37bf217b3ed1c6c562be85430e0..c8ab55760f817aa14e3db15f6b5556118e65d218 100644
|
||||||
--- a/browser/base/content/global-scripts.inc
|
--- a/browser/base/content/global-scripts.inc
|
||||||
+++ b/browser/base/content/global-scripts.inc
|
+++ b/browser/base/content/global-scripts.inc
|
||||||
@@ -12,6 +12,7 @@
|
@@ -22,4 +22,6 @@ if (AppConstants.platform == "macosx") {
|
||||||
# tools/lint/eslint/eslint-plugin-mozilla/lib/environments/browser-window.js
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
+Services.scriptloader.loadSubScript("chrome://browser/content/zen-browser.js", this);
|
|
||||||
Services.scriptloader.loadSubScript("chrome://browser/content/browser.js", this);
|
|
||||||
Services.scriptloader.loadSubScript("chrome://browser/content/places/browserPlacesViews.js", this);
|
|
||||||
Services.scriptloader.loadSubScript("chrome://browser/content/browser-places.js", this);
|
|
||||||
@@ -22,4 +23,6 @@ if (AppConstants.platform == "macosx") {
|
|
||||||
Services.scriptloader.loadSubScript("chrome://global/content/macWindowMenu.js", this);
|
Services.scriptloader.loadSubScript("chrome://global/content/macWindowMenu.js", this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,61 +0,0 @@
|
|||||||
var { XPCOMUtils } = ChromeUtils.importESModule(
|
|
||||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
|
||||||
);
|
|
||||||
|
|
||||||
function BrowserOpenZenProfilesMgr(aView, { selectTabByViewId = false } = {}) {
|
|
||||||
return new Promise(resolve => {
|
|
||||||
let emWindow;
|
|
||||||
let browserWindow;
|
|
||||||
|
|
||||||
var receivePong = function (aSubject, aTopic, aData) {
|
|
||||||
let browserWin = aSubject.browsingContext.topChromeWindow;
|
|
||||||
if (!emWindow || browserWin == window /* favor the current window */) {
|
|
||||||
if (
|
|
||||||
selectTabByViewId &&
|
|
||||||
aSubject.gViewController.currentViewId !== aView
|
|
||||||
) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
emWindow = aSubject;
|
|
||||||
browserWindow = browserWin;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Services.obs.addObserver(receivePong, "EM-pong");
|
|
||||||
Services.obs.notifyObservers(null, "EM-ping");
|
|
||||||
Services.obs.removeObserver(receivePong, "EM-pong");
|
|
||||||
|
|
||||||
if (emWindow) {
|
|
||||||
if (aView && !selectTabByViewId) {
|
|
||||||
emWindow.loadView(aView);
|
|
||||||
}
|
|
||||||
let tab = browserWindow.gBrowser.getTabForBrowser(
|
|
||||||
emWindow.docShell.chromeEventHandler
|
|
||||||
);
|
|
||||||
browserWindow.gBrowser.selectedTab = tab;
|
|
||||||
emWindow.focus();
|
|
||||||
resolve(emWindow);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (selectTabByViewId) {
|
|
||||||
const target = isBlankPageURL(gBrowser.currentURI.spec)
|
|
||||||
? "current"
|
|
||||||
: "tab";
|
|
||||||
openTrustedLinkIn("about:profiles", target);
|
|
||||||
} else {
|
|
||||||
// This must be a new load, else the ping/pong would have
|
|
||||||
// found the window above.
|
|
||||||
switchToTabHavingURI("about:profiles", true);
|
|
||||||
}
|
|
||||||
|
|
||||||
Services.obs.addObserver(function observer(aSubject, aTopic, aData) {
|
|
||||||
Services.obs.removeObserver(observer, aTopic);
|
|
||||||
if (aView) {
|
|
||||||
aSubject.loadView(aView);
|
|
||||||
}
|
|
||||||
aSubject.focus();
|
|
||||||
resolve(aSubject);
|
|
||||||
}, "EM-loaded");
|
|
||||||
});
|
|
||||||
}
|
|
@@ -8,7 +8,7 @@
|
|||||||
<p id="PanelUI-zen-profiles-current-profile-current" data-l10n-id="zen-panel-ui-current-profile-text"></p>
|
<p id="PanelUI-zen-profiles-current-profile-current" data-l10n-id="zen-panel-ui-current-profile-text"></p>
|
||||||
</vbox>
|
</vbox>
|
||||||
<toolbarbutton id="PanelUI-zen-profiles-privateWin" command="Tools:PrivateBrowsing" data-l10n-id="appmenuitem-new-private-window" class="subviewbutton"></toolbarbutton>
|
<toolbarbutton id="PanelUI-zen-profiles-privateWin" command="Tools:PrivateBrowsing" data-l10n-id="appmenuitem-new-private-window" class="subviewbutton"></toolbarbutton>
|
||||||
<toolbarbutton id="PanelUI-zen-profiles-managePrfs" command="Tools:ZenProfiles" data-l10n-id="appmenu-manage-profiles" class="subviewbutton"></toolbarbutton>
|
<toolbarbutton id="PanelUI-zen-profiles-managePrfs" oncommand="switchToTabHavingURI('about:profiles', true);" data-l10n-id="appmenu-manage-profiles" class="subviewbutton"></toolbarbutton>
|
||||||
<toolbarbutton id="PanelUI-zen-profiles-newProfile" oncommand="ZenProfileDialogUI.createProfileWizard();" data-l10n-id="appmenu-create-profile" class="subviewbutton"></toolbarbutton>
|
<toolbarbutton id="PanelUI-zen-profiles-newProfile" oncommand="ZenProfileDialogUI.createProfileWizard();" data-l10n-id="appmenu-create-profile" class="subviewbutton"></toolbarbutton>
|
||||||
<vbox id="PanelUI-zen-profiles-list">
|
<vbox id="PanelUI-zen-profiles-list">
|
||||||
</vbox>
|
</vbox>
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
content/browser/zen-browser-places.js (content/zen-browser-places.js)
|
content/browser/zen-browser-places.js (content/zen-browser-places.js)
|
||||||
content/browser/zen-browser.js (content/zen-browser.js)
|
|
||||||
content/browser/zenThemeModifier.js (content/zenThemeModifier.js)
|
content/browser/zenThemeModifier.js (content/zenThemeModifier.js)
|
||||||
content/browser/ZenSidebarManager.mjs (content/ZenSidebarManager.mjs)
|
content/browser/ZenSidebarManager.mjs (content/ZenSidebarManager.mjs)
|
@@ -7,7 +7,6 @@
|
|||||||
#PanelUI-zen-profiles-header {
|
#PanelUI-zen-profiles-header {
|
||||||
width: -moz-available;
|
width: -moz-available;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
border-radius: 7px;
|
|
||||||
background: var(--zen-main-browser-background);
|
background: var(--zen-main-browser-background);
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
@@ -30,7 +29,7 @@
|
|||||||
.PanelUI-zen-profiles-item {
|
.PanelUI-zen-profiles-item {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 10px;
|
padding: 6px 10px;
|
||||||
font: menu;
|
font: menu;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
@@ -115,7 +114,7 @@
|
|||||||
#PanelUI-zen-profiles-current-profile-current {
|
#PanelUI-zen-profiles-current-profile-current {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
margin: 0 auto 5px auto;
|
margin: 0 auto 15px auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user