mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
Added preloaded scripts that load before the window is created
This commit is contained in:
@@ -39,7 +39,6 @@
|
||||
gZenUIManager.init();
|
||||
gZenVerticalTabsManager.init();
|
||||
gZenCompactModeManager.init();
|
||||
gZenKeyboardShortcutsManager.init();
|
||||
|
||||
function throttle(f, delay) {
|
||||
let timer = 0;
|
||||
|
@@ -1,17 +1,25 @@
|
||||
diff --git a/browser/base/content/browser.xhtml b/browser/base/content/browser.xhtml
|
||||
index 481ebbee437250c71e9bd10c4fb6fc0c31314925..3bb046a4635fad831cc447e29516ee5ed407a3f2 100644
|
||||
index 5dd337a2ffc9f9107d735f4dc96a50d57b12d213..58ecaf7136e13885ac38d74d40b5ef0f52cd7684 100644
|
||||
--- a/browser/base/content/browser.xhtml
|
||||
+++ b/browser/base/content/browser.xhtml
|
||||
@@ -138,6 +138,8 @@
|
||||
@@ -98,6 +98,8 @@
|
||||
|
||||
<title data-l10n-id="browser-main-window-title"></title>
|
||||
|
||||
+#include zen-preloaded.inc.xhtml
|
||||
+
|
||||
# All JS files which are needed by browser.xhtml and other top level windows to
|
||||
# support MacOS specific features *must* go into the global-scripts.inc file so
|
||||
# that they can be shared with macWindow.inc.xhtml.
|
||||
@@ -141,6 +143,7 @@
|
||||
window.addEventListener("DOMContentLoaded",
|
||||
gBrowserInit.onDOMContentLoaded.bind(gBrowserInit), { once: true });
|
||||
</script>
|
||||
+#include zen-locales.inc.xhtml
|
||||
+#include zen-assets.inc.xhtml
|
||||
</head>
|
||||
<html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
# All sets except for popupsets (commands, keys, and stringbundles)
|
||||
@@ -159,9 +161,12 @@
|
||||
@@ -162,9 +165,12 @@
|
||||
</vbox>
|
||||
</html:template>
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
#include zen-locales.inc.xhtml
|
||||
|
||||
<!-- Styles used all over the browser -->
|
||||
<linkset>
|
||||
<link rel="stylesheet" type="text/css" href="chrome://browser/content/zen-styles/zen-theme.css" />
|
||||
@@ -23,7 +25,6 @@
|
||||
</linkset>
|
||||
|
||||
<!-- Scripts used all over the browser -->
|
||||
<script src="chrome://browser/content/zen-components/ZenCommonUtils.mjs" async="true"/>
|
||||
<script src="chrome://browser/content/zen-components/ZenThemesCommon.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenThemesImporter.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenCompactMode.mjs" />
|
||||
@@ -35,4 +36,3 @@
|
||||
<script src="chrome://browser/content/zen-components/ZenWorkspacesSync.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenViewSplitter.mjs"/>
|
||||
<script src="chrome://browser/content/zen-components/ZenProfileDialogUI.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenKeyboardShortcuts.mjs" />
|
||||
|
Submodule src/browser/base/content/zen-components updated: e8eb4a41cf...2d62e7d9be
4
src/browser/base/content/zen-preloaded.inc.xhtml
Normal file
4
src/browser/base/content/zen-preloaded.inc.xhtml
Normal file
@@ -0,0 +1,4 @@
|
||||
# This needs to be here, before all the other scripts, because it's used before
|
||||
# the window is fully loaded.
|
||||
<script src="chrome://browser/content/zen-components/ZenCommonUtils.mjs" async="true"/>
|
||||
<script src="chrome://browser/content/zen-components/ZenKeyboardShortcuts.mjs" />
|
Reference in New Issue
Block a user