mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
chore: Implemented static linting for JS modules, p=#9673, c=common
This commit is contained in:
22
eslint.config.mjs
Normal file
22
eslint.config.mjs
Normal file
@@ -0,0 +1,22 @@
|
||||
import js from '@eslint/js';
|
||||
import globals from 'globals';
|
||||
import { defineConfig } from 'eslint/config';
|
||||
import zenGlobals from './src/zen/zen.globals.js';
|
||||
|
||||
export default defineConfig([
|
||||
{
|
||||
files: ['**/*.{js,mjs,cjs}'],
|
||||
plugins: { js },
|
||||
extends: ['js/recommended'],
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...zenGlobals.reduce((acc, global) => {
|
||||
acc[global] = 'readable';
|
||||
return acc;
|
||||
}, {}),
|
||||
},
|
||||
},
|
||||
ignores: ['**/vendor/**', '**/tests/**'],
|
||||
},
|
||||
]);
|
3645
package-lock.json
generated
3645
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
12
package.json
12
package.json
@@ -20,7 +20,8 @@
|
||||
"update-ff:rc": "python3 scripts/update_ff.py --rc",
|
||||
"update-ff:l10n": "python3 scripts/update_ff.py --just-l10n",
|
||||
"pretty": "prettier . --write && autopep8 -r --in-place scripts/ src/",
|
||||
"lint": "npx prettier . --check && autopep8 --diff scripts/ src/",
|
||||
"lint": "npx eslint src/ && prettier . --check && autopep8 --diff scripts/ src/",
|
||||
"lint:fix": "npx eslint src/ --fix && npm run pretty",
|
||||
"prepare": "husky",
|
||||
"reset-ff": "surfer reset",
|
||||
"surfer": "surfer",
|
||||
@@ -49,7 +50,16 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/preset-typescript": "^7.27.0",
|
||||
"@eslint/js": "^9.32.0",
|
||||
"@microsoft/eslint-plugin-sdl": "^1.1.0",
|
||||
"eslint": "^9.32.0",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-html": "^8.1.3",
|
||||
"eslint-plugin-import": "^2.32.0",
|
||||
"eslint-plugin-json": "^4.0.1",
|
||||
"eslint-plugin-react-hooks": "^5.2.0",
|
||||
"formal-git": "^1.1.5",
|
||||
"globals": "^16.3.0",
|
||||
"husky": "^9.1.7",
|
||||
"lint-staged": "^15.3.0",
|
||||
"prettier": "^3.4.2",
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
|
||||
index 8e839c497bba9de04948ad8759679b6a6f61a65f..f94a160427b7e465e2c7134fbaf876f589a3fcce 100644
|
||||
index 8e839c497bba9de04948ad8759679b6a6f61a65f..d79bd14443d94b91309f0add133e35ab87d7fbf3 100644
|
||||
--- a/browser/base/content/browser.js
|
||||
+++ b/browser/base/content/browser.js
|
||||
@@ -29,6 +29,7 @@ ChromeUtils.defineESModuleGetters(this, {
|
||||
@@ -33,7 +33,7 @@ index 8e839c497bba9de04948ad8759679b6a6f61a65f..f94a160427b7e465e2c7134fbaf876f5
|
||||
|
||||
if (!doAdopt) {
|
||||
- aWindow.gBrowser.tabContainer.selectedIndex = i;
|
||||
+ aWindow.gZenWorkspaces.switchIfNeeded(browser, i);
|
||||
+ aWindow.gZenWorkspaces.switchIfNeeded(browser);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@@ -1,6 +1,8 @@
|
||||
/* eslint-disable no-undef */
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
var gZenMarketplaceManager = {
|
||||
async init() {
|
||||
const checkForUpdates = document.getElementById('zenThemeMarketplaceCheckForUpdates');
|
||||
@@ -15,7 +17,7 @@ var gZenMarketplaceManager = {
|
||||
}
|
||||
|
||||
if (!window.gZenMods) {
|
||||
window.gZenMods = ZenMultiWindowFeature.currentBrowser.gZenMods;
|
||||
window.gZenMods = nsZenMultiWindowFeature.currentBrowser.gZenMods;
|
||||
}
|
||||
|
||||
header.appendChild(this._initDisableAll());
|
||||
@@ -83,7 +85,7 @@ var gZenMarketplaceManager = {
|
||||
|
||||
_initDisableAll() {
|
||||
const areModsDisabled = Services.prefs.getBoolPref('zen.themes.disable-all', false);
|
||||
const browser = ZenMultiWindowFeature.currentBrowser;
|
||||
const browser = nsZenMultiWindowFeature.currentBrowser;
|
||||
const mozToggle = document.createElement('moz-toggle');
|
||||
|
||||
mozToggle.className =
|
||||
@@ -268,7 +270,7 @@ var gZenMarketplaceManager = {
|
||||
}
|
||||
|
||||
const mods = await gZenMods.getMods();
|
||||
const browser = ZenMultiWindowFeature.currentBrowser;
|
||||
const browser = nsZenMultiWindowFeature.currentBrowser;
|
||||
const modList = document.createElement('div');
|
||||
|
||||
for (const mod of Object.values(mods).sort((a, b) => a.name.localeCompare(b.name))) {
|
||||
@@ -632,6 +634,7 @@ var gZenMarketplaceManager = {
|
||||
const kZenExtendedSidebar = 'zen.view.sidebar-expanded';
|
||||
const kZenSingleToolbar = 'zen.view.use-single-toolbar';
|
||||
|
||||
/* eslint-disable no-unused-vars */
|
||||
var gZenLooksAndFeel = {
|
||||
init() {
|
||||
if (this.__hasInitialized) return;
|
||||
@@ -650,7 +653,7 @@ var gZenLooksAndFeel = {
|
||||
this.applySidebarLayout();
|
||||
},
|
||||
|
||||
observe(subject, topic, data) {
|
||||
observe() {
|
||||
this.applySidebarLayout();
|
||||
},
|
||||
|
||||
@@ -730,10 +733,11 @@ var gZenLooksAndFeel = {
|
||||
},
|
||||
};
|
||||
|
||||
/* eslint-disable no-unused-vars */
|
||||
var gZenWorkspacesSettings = {
|
||||
init() {
|
||||
var tabsUnloaderPrefListener = {
|
||||
async observe(subject, topic, data) {
|
||||
async observe() {
|
||||
let buttonIndex = await confirmRestartPrompt(true, 1, true, true);
|
||||
if (buttonIndex == CONFIRM_RESTART_PROMPT_RESTART_NOW) {
|
||||
Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart);
|
||||
@@ -811,6 +815,7 @@ var zenIgnoreKeyboardShortcutL10n = [
|
||||
'zen-full-zoom-reduce-shortcut-alt-a',
|
||||
];
|
||||
|
||||
/* eslint-disable no-unused-vars */
|
||||
var gZenCKSSettings = {
|
||||
async init() {
|
||||
await this._initializeCKS();
|
||||
@@ -906,7 +911,6 @@ var gZenCKSSettings = {
|
||||
input.setAttribute('data-id', keyID);
|
||||
|
||||
input.addEventListener('focus', (event) => {
|
||||
const value = event.target.getAttribute(KEYBIND_ATTRIBUTE_KEY);
|
||||
this._currentActionID = event.target.getAttribute('data-id');
|
||||
event.target.classList.add(`${ZEN_CKS_INPUT_FIELD_CLASS}-editing`);
|
||||
this._hasSafed = true;
|
||||
@@ -1012,6 +1016,7 @@ var gZenCKSSettings = {
|
||||
);
|
||||
|
||||
if (!this._latestValidKey && !this._latestModifier) {
|
||||
// todo(lint): This is a bit weird, we need to remove this empty block
|
||||
} else if (!this._latestValidKey || hasConflicts) {
|
||||
if (!input.classList.contains(`${ZEN_CKS_INPUT_FIELD_CLASS}-invalid`)) {
|
||||
input.classList.add(`${ZEN_CKS_INPUT_FIELD_CLASS}-invalid`);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
index 96fd8acdc09cc4c9649d1ed7503c2a0bde536613..32b3e4cd13c2fffa4630e49f209e382cc1fcac10 100644
|
||||
index 96fd8acdc09cc4c9649d1ed7503c2a0bde536613..77d690c9beb306781a5f7325473a2a9b3d040bba 100644
|
||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
@@ -422,15 +422,49 @@
|
||||
@@ -210,7 +210,7 @@ index 96fd8acdc09cc4c9649d1ed7503c2a0bde536613..32b3e4cd13c2fffa4630e49f209e382c
|
||||
+ let hasZenDefaultUserContextId = false;
|
||||
+ let zenForcedWorkspaceId = undefined;
|
||||
+ if (typeof gZenWorkspaces !== "undefined" && !_forZenEmptyTab) {
|
||||
+ [userContextId, hasZenDefaultUserContextId, zenForcedWorkspaceId] = gZenWorkspaces.getContextIdIfNeeded(userContextId, fromExternal, allowInheritPrincipal);
|
||||
+ [userContextId, hasZenDefaultUserContextId, zenForcedWorkspaceId] = gZenWorkspaces.getContextIdIfNeeded(userContextId, fromExternal);
|
||||
+ }
|
||||
+
|
||||
if (!UserInteraction.running("browser.tabs.opening", window)) {
|
||||
|
@@ -3,7 +3,7 @@
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
// Utility to register JSWindowActors
|
||||
|
||||
var gZenActorsManager = {
|
||||
window.gZenActorsManager = {
|
||||
_actors: new Set(),
|
||||
_lazy: {},
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
var gZenOperatingSystemCommonUtils = {
|
||||
window.gZenOperatingSystemCommonUtils = {
|
||||
kZenOSToSmallName: {
|
||||
WINNT: 'windows',
|
||||
Darwin: 'macos',
|
||||
@@ -15,7 +15,8 @@ var gZenOperatingSystemCommonUtils = {
|
||||
},
|
||||
};
|
||||
|
||||
class ZenMultiWindowFeature {
|
||||
/* eslint-disable no-unused-vars */
|
||||
class nsZenMultiWindowFeature {
|
||||
constructor() {}
|
||||
|
||||
static get browsers() {
|
||||
@@ -27,18 +28,18 @@ class ZenMultiWindowFeature {
|
||||
}
|
||||
|
||||
static get isActiveWindow() {
|
||||
return ZenMultiWindowFeature.currentBrowser === window;
|
||||
return nsZenMultiWindowFeature.currentBrowser === window;
|
||||
}
|
||||
|
||||
windowIsActive(browser) {
|
||||
return browser === ZenMultiWindowFeature.currentBrowser;
|
||||
return browser === nsZenMultiWindowFeature.currentBrowser;
|
||||
}
|
||||
|
||||
async foreachWindowAsActive(callback) {
|
||||
if (!ZenMultiWindowFeature.isActiveWindow) {
|
||||
if (!nsZenMultiWindowFeature.isActiveWindow) {
|
||||
return;
|
||||
}
|
||||
for (const browser of ZenMultiWindowFeature.browsers) {
|
||||
for (const browser of nsZenMultiWindowFeature.browsers) {
|
||||
try {
|
||||
if (browser.closed) continue;
|
||||
await callback(browser);
|
||||
@@ -49,14 +50,16 @@ class ZenMultiWindowFeature {
|
||||
}
|
||||
}
|
||||
|
||||
class ZenDOMOperatedFeature {
|
||||
/* eslint-disable no-unused-vars */
|
||||
class nsZenDOMOperatedFeature {
|
||||
constructor() {
|
||||
var initBound = this.init.bind(this);
|
||||
document.addEventListener('DOMContentLoaded', initBound, { once: true });
|
||||
}
|
||||
}
|
||||
|
||||
class ZenPreloadedFeature {
|
||||
/* eslint-disable no-unused-vars */
|
||||
class nsZenPreloadedFeature {
|
||||
constructor() {
|
||||
var initBound = this.init.bind(this);
|
||||
document.addEventListener('MozBeforeInitialXULLayout', initBound, { once: true });
|
||||
|
@@ -3,7 +3,7 @@
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
// prettier-ignore
|
||||
// eslint-disable-next-line no-lone-blocks
|
||||
|
||||
{
|
||||
Services.scriptloader.loadSubScript("chrome://browser/content/ZenStartup.mjs", this);
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
{
|
||||
class ZenSessionStore extends ZenPreloadedFeature {
|
||||
class ZenSessionStore extends nsZenPreloadedFeature {
|
||||
init() {
|
||||
this.#waitAndCleanup();
|
||||
}
|
||||
|
@@ -129,11 +129,6 @@ var gZenUIManager = {
|
||||
return Services.uuid.generateUUID().toString();
|
||||
},
|
||||
|
||||
toogleBookmarksSidebar() {
|
||||
const button = document.getElementById('zen-bookmark-button');
|
||||
SidebarController.toggle('viewBookmarksSidebar', button);
|
||||
},
|
||||
|
||||
createValidXULText(text) {
|
||||
return text.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
||||
},
|
||||
@@ -447,7 +442,7 @@ var gZenUIManager = {
|
||||
this._toastTimeouts[messageId] = setTimeout(timeoutFunction, options.timeout || 2000);
|
||||
});
|
||||
}
|
||||
if (!toast.style.hasOwnProperty('transform')) {
|
||||
if (!toast.style.transform) {
|
||||
toast.style.transform = 'scale(0)';
|
||||
}
|
||||
await this.motion.animate(toast, { scale: 1 }, { type: 'spring', bounce: 0.2, duration: 0.5 });
|
||||
@@ -466,7 +461,7 @@ var gZenUIManager = {
|
||||
|
||||
var gZenVerticalTabsManager = {
|
||||
init() {
|
||||
this._multiWindowFeature = new ZenMultiWindowFeature();
|
||||
this._multiWindowFeature = new nsZenMultiWindowFeature();
|
||||
this._initWaitPromise();
|
||||
|
||||
ChromeUtils.defineLazyGetter(this, 'isWindowsStyledButtons', () => {
|
||||
@@ -695,7 +690,7 @@ var gZenVerticalTabsManager = {
|
||||
browser.gZenVerticalTabsManager._initWaitPromise();
|
||||
});
|
||||
|
||||
if (ZenMultiWindowFeature.isActiveWindow) {
|
||||
if (nsZenMultiWindowFeature.isActiveWindow) {
|
||||
this._updateEvent();
|
||||
this._initWaitPromise();
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
{
|
||||
class ZenEmojiPicker extends ZenDOMOperatedFeature {
|
||||
class ZenEmojiPicker extends nsZenDOMOperatedFeature {
|
||||
#panel;
|
||||
|
||||
#anchor;
|
||||
|
File diff suppressed because one or more lines are too long
@@ -43,7 +43,8 @@ def get_js_code(emojis):
|
||||
Returns:
|
||||
str: JavaScript code as a string.
|
||||
"""
|
||||
js_code = "var ZenEmojisData = "
|
||||
js_code = "/* eslint-disable no-unused-vars */\n"
|
||||
js_code += "var ZenEmojisData = "
|
||||
# dump without unicode escape
|
||||
js_code += json.dumps(emojis, ensure_ascii=False)
|
||||
return js_code
|
||||
|
@@ -8,7 +8,7 @@ document.addEventListener(
|
||||
// <commandset id="mainCommandSet"> defined in browser-sets.inc
|
||||
document
|
||||
.getElementById('zenCommandSet')
|
||||
// eslint-disable-next-line complexity
|
||||
|
||||
.addEventListener('command', (event) => {
|
||||
switch (event.target.id) {
|
||||
case 'cmd_zenCompactModeToggle':
|
||||
|
@@ -57,7 +57,7 @@ var ZenThemeModifier = {
|
||||
);
|
||||
},
|
||||
|
||||
handleEvent(event) {
|
||||
handleEvent() {
|
||||
// note: even might be undefined, but we shoudnt use it!
|
||||
this.updateAllThemeBasics();
|
||||
},
|
||||
|
@@ -113,7 +113,7 @@ var gZenCompactModeManager = {
|
||||
delete this._wasInCompactMode;
|
||||
}
|
||||
// We dont want the user to be able to spam the button
|
||||
return value;
|
||||
return;
|
||||
}
|
||||
this.sidebar.removeAttribute('zen-user-show');
|
||||
// We use this element in order to make it persis across restarts, by using the XULStore.
|
||||
@@ -125,7 +125,6 @@ var gZenCompactModeManager = {
|
||||
Services.prefs.setBoolPref('zen.view.compact.should-enable-at-startup', value);
|
||||
}
|
||||
this._updateEvent();
|
||||
return value;
|
||||
},
|
||||
|
||||
get sidebarIsOnRight() {
|
||||
@@ -314,40 +313,6 @@ var gZenCompactModeManager = {
|
||||
this.getAndApplySidebarWidth({});
|
||||
this._ignoreNextResize = true;
|
||||
|
||||
// TODO: Work on this a bit more, needs polishing
|
||||
if (lazyCompactMode.COMPACT_MODE_CAN_ANIMATE_SIDEBAR && false) {
|
||||
gZenUIManager.motion
|
||||
.animate(
|
||||
[
|
||||
this.sidebar,
|
||||
...(gZenVerticalTabsManager._hasSetSingleToolbar &&
|
||||
!gURLBar.hasAttribute('zen-floating-urlbar')
|
||||
? [gURLBar.textbox]
|
||||
: []),
|
||||
],
|
||||
{
|
||||
transform: [
|
||||
`translateY(${((isCompactMode ? -1 : 1) * elementSeparation) / 2}px) translateX(${
|
||||
isCompactMode
|
||||
? (this.sidebarIsOnRight ? elementSeparation : -elementSeparation) / 2
|
||||
: (this.sidebarIsOnRight ? -elementSeparation : elementSeparation) / 2
|
||||
}px)`,
|
||||
`translateY(0px) translateX(0px)`,
|
||||
],
|
||||
},
|
||||
{
|
||||
ease: 'easeIn',
|
||||
type: 'spring',
|
||||
bounce: 0,
|
||||
duration: 0.2,
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
this.sidebar.style.transform = '';
|
||||
gURLBar.textbox.style.transform = '';
|
||||
});
|
||||
}
|
||||
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
@@ -602,31 +567,37 @@ var gZenCompactModeManager = {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.target.matches(':hover')) {
|
||||
return;
|
||||
}
|
||||
// See bug https://bugzilla.mozilla.org/show_bug.cgi?id=1979340 and issue https://github.com/zen-browser/desktop/issues/7746.
|
||||
// If we want the toolbars to be draggable, we need to make sure to check the hover state after a short delay.
|
||||
// This is because the mouse is left to be handled natively so firefox thinks the mouse left the window for a split second.
|
||||
setTimeout(() => {
|
||||
// Let's double check if the mouse is still hovering over the element, see the bug above.
|
||||
if (event.target.matches(':hover')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
event.explicitOriginalTarget.closest('#urlbar[zen-floating-urlbar]') ||
|
||||
(document.documentElement.getAttribute('supress-primary-adjustment') === 'true' &&
|
||||
gZenVerticalTabsManager._hasSetSingleToolbar) ||
|
||||
this._hasHoveredUrlbar
|
||||
) {
|
||||
return;
|
||||
}
|
||||
if (
|
||||
event.explicitOriginalTarget.closest('#urlbar[zen-floating-urlbar]') ||
|
||||
(document.documentElement.getAttribute('supress-primary-adjustment') === 'true' &&
|
||||
gZenVerticalTabsManager._hasSetSingleToolbar) ||
|
||||
this._hasHoveredUrlbar
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.hoverableElements[i].keepHoverDuration) {
|
||||
this.flashElement(
|
||||
target,
|
||||
this.hoverableElements[i].keepHoverDuration,
|
||||
'has-hover' + target.id,
|
||||
'zen-has-hover'
|
||||
);
|
||||
} else {
|
||||
this._removeHoverFrames[target.id] = window.requestAnimationFrame(() =>
|
||||
target.removeAttribute('zen-has-hover')
|
||||
);
|
||||
}
|
||||
if (this.hoverableElements[i].keepHoverDuration) {
|
||||
this.flashElement(
|
||||
target,
|
||||
this.hoverableElements[i].keepHoverDuration,
|
||||
'has-hover' + target.id,
|
||||
'zen-has-hover'
|
||||
);
|
||||
} else {
|
||||
this._removeHoverFrames[target.id] = window.requestAnimationFrame(() =>
|
||||
target.removeAttribute('zen-has-hover')
|
||||
);
|
||||
}
|
||||
}, 0);
|
||||
};
|
||||
|
||||
target.addEventListener('mouseenter', onEnter);
|
||||
@@ -666,7 +637,7 @@ var gZenCompactModeManager = {
|
||||
}
|
||||
});
|
||||
|
||||
gURLBar.textbox.addEventListener('mouseleave', (event) => {
|
||||
gURLBar.textbox.addEventListener('mouseleave', () => {
|
||||
setTimeout(() => {
|
||||
delete this._hasHoveredUrlbar;
|
||||
}, 0);
|
||||
|
@@ -13,7 +13,7 @@
|
||||
},
|
||||
});
|
||||
|
||||
class nsZenDownloadAnimation extends ZenDOMOperatedFeature {
|
||||
class nsZenDownloadAnimation extends nsZenDOMOperatedFeature {
|
||||
async init() {
|
||||
await this.#setupDownloadListeners();
|
||||
}
|
||||
@@ -34,7 +34,7 @@
|
||||
#handleNewDownload() {
|
||||
if (
|
||||
!Services.prefs.getBoolPref('zen.downloads.download-animation') ||
|
||||
!ZenMultiWindowFeature.isActiveWindow
|
||||
!nsZenMultiWindowFeature.isActiveWindow
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
@@ -52,7 +52,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
#onTabGroupRemoved(event) {}
|
||||
#onTabGroupRemoved() {}
|
||||
|
||||
#onTabPinned(event) {
|
||||
const tab = event.target;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
{
|
||||
class nsZenGlanceManager extends ZenDOMOperatedFeature {
|
||||
class nsZenGlanceManager extends nsZenDOMOperatedFeature {
|
||||
_animating = false;
|
||||
_lazyPref = {};
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
|
||||
onUnload() {
|
||||
// clear everything
|
||||
/* eslint-disable no-unused-vars */
|
||||
for (let [id, glance] of this.#glances) {
|
||||
gBrowser.removeTab(glance.tab, { animate: false });
|
||||
}
|
||||
@@ -412,7 +413,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
quickOpenGlance({} = {}) {
|
||||
quickOpenGlance() {
|
||||
if (!this.#currentBrowser || this._duringOpening) {
|
||||
return;
|
||||
}
|
||||
@@ -562,7 +563,7 @@
|
||||
return false;
|
||||
}
|
||||
return Services.io.newURI(url1).host !== url2.host;
|
||||
} catch (e) {
|
||||
} catch {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -36,11 +36,6 @@ export class ZenGlanceChild extends JSWindowActorChild {
|
||||
return this._hoverActivationDelay;
|
||||
}
|
||||
|
||||
async receiveMessage(message) {
|
||||
switch (message.name) {
|
||||
}
|
||||
}
|
||||
|
||||
async initiateGlance() {
|
||||
this.mouseIsDown = false;
|
||||
const activationMethod = await this.getActivationMethod();
|
||||
|
@@ -1123,7 +1123,7 @@ var gZenKeyboardShortcutsManager = {
|
||||
},
|
||||
|
||||
_applyShortcuts() {
|
||||
for (const browser of ZenMultiWindowFeature.browsers) {
|
||||
for (const browser of nsZenMultiWindowFeature.browsers) {
|
||||
let mainKeyset = browser.document.getElementById(ZEN_MAIN_KEYSET_ID);
|
||||
if (!mainKeyset) {
|
||||
throw new Error('Main keyset not found');
|
||||
@@ -1186,7 +1186,7 @@ var gZenKeyboardShortcutsManager = {
|
||||
|
||||
async _saveShortcuts() {
|
||||
let json = [];
|
||||
for (shortcut of this._currentShortcutList) {
|
||||
for (const shortcut of this._currentShortcutList) {
|
||||
json.push(shortcut.toJSONForm());
|
||||
}
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
{
|
||||
class nsZenMods extends ZenPreloadedFeature {
|
||||
class nsZenMods extends nsZenPreloadedFeature {
|
||||
// private properties start
|
||||
#kZenStylesheetModHeader = '/* Zen Mods - Generated by ZenMods.';
|
||||
#kZenStylesheetModHeaderBody = `* DO NOT EDIT THIS FILE DIRECTLY!
|
||||
@@ -152,7 +152,7 @@
|
||||
}
|
||||
|
||||
#writeToDom(modsWithPreferences) {
|
||||
for (const browser of ZenMultiWindowFeature.browsers) {
|
||||
for (const browser of nsZenMultiWindowFeature.browsers) {
|
||||
for (const { enabled, preferences, name } of modsWithPreferences) {
|
||||
const sanitizedName = this.sanitizeModName(name);
|
||||
|
||||
@@ -209,9 +209,6 @@
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -288,6 +285,7 @@
|
||||
return `https://zen-browser.github.io/theme-store/themes/${modId}/theme.json`;
|
||||
}
|
||||
|
||||
/* eslint-disable no-unused-vars */
|
||||
async #downloadUrlToFile(url, path, isStyleSheet = false, maxRetries = 3, retryDelayMs = 500) {
|
||||
let attempt = 0;
|
||||
|
||||
|
@@ -63,7 +63,7 @@ class nsSplitNode extends nsSplitLeafNode {
|
||||
}
|
||||
}
|
||||
|
||||
class nsZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
class nsZenViewSplitter extends nsZenDOMOperatedFeature {
|
||||
currentView = -1;
|
||||
_data = [];
|
||||
_tabBrowserPanel = null;
|
||||
@@ -435,7 +435,7 @@ class nsZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
]).then(() => {
|
||||
this._maybeRemoveFakeBrowser();
|
||||
});
|
||||
} catch (e) {
|
||||
} catch {
|
||||
this._canDrop = false;
|
||||
this._maybeRemoveFakeBrowser();
|
||||
}
|
||||
@@ -732,7 +732,7 @@ class nsZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
return;
|
||||
}
|
||||
|
||||
const { tab, browser, isSplitHeaderDrag } = this._dragState;
|
||||
const { browser, isSplitHeaderDrag } = this._dragState;
|
||||
|
||||
if (browser) {
|
||||
browser.style.opacity = isSplitHeaderDrag ? '1' : '.85';
|
||||
@@ -1213,7 +1213,7 @@ class nsZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
* @param {Tab} activeTab - The active tab.
|
||||
*/
|
||||
applyGridToTabs(tabs) {
|
||||
tabs.forEach((tab, index) => {
|
||||
tabs.forEach((tab) => {
|
||||
tab.splitView = true;
|
||||
tab.splitViewValue = this.currentView;
|
||||
tab.setAttribute('split-view', 'true');
|
||||
@@ -1446,13 +1446,13 @@ class nsZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
});
|
||||
};
|
||||
|
||||
setCursor(isVertical ? 'ew-resize' : 'ns-resize');
|
||||
window.setCursor(isVertical ? 'ew-resize' : 'ns-resize');
|
||||
document.addEventListener('mousemove', dragFunc);
|
||||
document.addEventListener(
|
||||
'mouseup',
|
||||
() => {
|
||||
document.removeEventListener('mousemove', dragFunc);
|
||||
setCursor('auto');
|
||||
window.setCursor('auto');
|
||||
this.tabBrowserPanel.removeAttribute('zen-split-resizing');
|
||||
},
|
||||
{ once: true }
|
||||
@@ -1778,7 +1778,7 @@ class nsZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
.then(callback);
|
||||
}
|
||||
|
||||
handleTabDrop(event, urls, replace, inBackground) {
|
||||
handleTabDrop(event, urls, replace) {
|
||||
if (replace || urls.length !== 1) {
|
||||
return false;
|
||||
}
|
||||
@@ -1829,7 +1829,7 @@ class nsZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
// We can't create an empty group, so only create if we have tabs
|
||||
if (tabs?.length) {
|
||||
// Create a new group with the initial tabs
|
||||
const group = gBrowser.addTabGroup(tabs, {
|
||||
gBrowser.addTabGroup(tabs, {
|
||||
label: '',
|
||||
showCreateUI: false,
|
||||
insertBefore: tabs[0],
|
||||
|
@@ -51,7 +51,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
class nsZenPinnedTabManager extends ZenDOMOperatedFeature {
|
||||
class nsZenPinnedTabManager extends nsZenDOMOperatedFeature {
|
||||
MAX_ESSENTIALS_TABS = 12;
|
||||
|
||||
async init() {
|
||||
@@ -85,7 +85,9 @@
|
||||
gBrowser.setIcon(tab, favicon);
|
||||
}
|
||||
});
|
||||
} catch {}
|
||||
} catch {
|
||||
// Handle error
|
||||
}
|
||||
} else {
|
||||
if (tab.hasAttribute('zen-essential')) {
|
||||
tab.style.setProperty('--zen-essential-tab-icon', `url(${iconUrl})`);
|
||||
@@ -159,7 +161,7 @@
|
||||
...pin,
|
||||
iconUrl: image || null,
|
||||
};
|
||||
} catch (ex) {
|
||||
} catch {
|
||||
// If favicon fetch fails, continue without icon
|
||||
return {
|
||||
...pin,
|
||||
@@ -895,7 +897,7 @@
|
||||
if (!pin) {
|
||||
return;
|
||||
}
|
||||
// Remove # and ? from the url
|
||||
// Remove # and ? from the URL
|
||||
const pinUrl = pin.url.split('#')[0];
|
||||
const currentUrl = browser.currentURI.spec.split('#')[0];
|
||||
// Add an indicator that the pin has been changed
|
||||
|
2
src/zen/vendor/motion.min.mjs
vendored
2
src/zen/vendor/motion.min.mjs
vendored
File diff suppressed because one or more lines are too long
@@ -432,7 +432,7 @@
|
||||
'zen-welcome-set-default-browser'
|
||||
).checked;
|
||||
if (AppConstants.HAVE_SHELL_SERVICE && shouldSetDefault) {
|
||||
let shellSvc = getShellService();
|
||||
let shellSvc = window.getShellService();
|
||||
if (!shellSvc) {
|
||||
return;
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
{
|
||||
function parseSinePath(pathStr) {
|
||||
const points = [];
|
||||
const commands = pathStr.match(/[MCL]\s*[\d\s\.\-,]+/g);
|
||||
const commands = pathStr.match(/[MCL]\s*[\d\s.\-,]+/g);
|
||||
if (!commands) return points;
|
||||
|
||||
commands.forEach((command) => {
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
const EXPLICIT_LIGHTNESS_TYPE = 'explicit-lightness';
|
||||
|
||||
class nsZenThemePicker extends ZenMultiWindowFeature {
|
||||
class nsZenThemePicker extends nsZenMultiWindowFeature {
|
||||
static MAX_DOTS = 3;
|
||||
|
||||
currentOpacity = 0.5;
|
||||
@@ -129,7 +129,7 @@
|
||||
XPCOMUtils.defineLazyPreferenceGetter(this, 'darkModeBias', 'zen.theme.dark-mode-bias', 0.25);
|
||||
}
|
||||
|
||||
handleDarkModeChange(event) {
|
||||
handleDarkModeChange() {
|
||||
this.updateCurrentWorkspace();
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@
|
||||
* @return {Array} The RGB representation
|
||||
*/
|
||||
hslToRgb(h, s, l) {
|
||||
const { abs, min, max, round } = Math;
|
||||
const { round } = Math;
|
||||
let r, g, b;
|
||||
|
||||
if (s === 0) {
|
||||
@@ -1346,9 +1346,9 @@
|
||||
{
|
||||
let opacity = browser.gZenThemePicker.currentOpacity;
|
||||
const svg = browser.gZenThemePicker.sliderWavePath;
|
||||
const [_, secondStop, thirdStop] = document.querySelectorAll(
|
||||
'#PanelUI-zen-gradient-generator-slider-wave-gradient stop'
|
||||
);
|
||||
const [secondStop, thirdStop] = document
|
||||
.querySelectorAll('#PanelUI-zen-gradient-generator-slider-wave-gradient stop')
|
||||
.slice(1, 3);
|
||||
// Opacity can only be between MIN_OPACITY to MAX_OPACITY. Make opacity relative to that range
|
||||
if (opacity < MIN_OPACITY) {
|
||||
opacity = 0;
|
||||
@@ -1599,16 +1599,18 @@
|
||||
let newPathData = '';
|
||||
this.#sinePoints.forEach((p) => {
|
||||
switch (p.type) {
|
||||
case 'M':
|
||||
case 'M': {
|
||||
const interpolatedY = referenceY + (p.y - referenceY) * t;
|
||||
newPathData += `M ${p.x} ${interpolatedY} `;
|
||||
break;
|
||||
case 'C':
|
||||
}
|
||||
case 'C': {
|
||||
const y1 = referenceY + (p.y1 - referenceY) * t;
|
||||
const y2 = referenceY + (p.y2 - referenceY) * t;
|
||||
const y = referenceY + (p.y - referenceY) * t;
|
||||
newPathData += `C ${p.x1} ${y1} ${p.x2} ${y2} ${p.x} ${y} `;
|
||||
break;
|
||||
}
|
||||
case 'L':
|
||||
newPathData += `L ${p.x} ${p.y} `;
|
||||
break;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
|
||||
/**
|
||||
* Stores workspace IDs and their last selected tabs.
|
||||
*/
|
||||
@@ -151,7 +151,7 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
}
|
||||
|
||||
if (!this.privateWindowOrDisabled) {
|
||||
const observerFunction = async function observe(subject) {
|
||||
const observerFunction = async function observe() {
|
||||
this._workspaceBookmarksCache = null;
|
||||
await this.workspaceBookmarks();
|
||||
this._invalidateBookmarkContainers();
|
||||
@@ -242,30 +242,26 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
) {
|
||||
// Only set up URL bar selection if we're switching to a different tab
|
||||
if (gBrowser.selectedTab !== this._emptyTab && selectURLBar) {
|
||||
// Use a Promise-based approach for better sequencing
|
||||
const urlBarSelectionPromise = new Promise((resolve) => {
|
||||
const tabSelectListener = () => {
|
||||
// Remove the event listener first to prevent any chance of multiple executions
|
||||
window.removeEventListener('TabSelect', tabSelectListener);
|
||||
const tabSelectListener = () => {
|
||||
// Remove the event listener first to prevent any chance of multiple executions
|
||||
window.removeEventListener('TabSelect', tabSelectListener);
|
||||
|
||||
// Use requestAnimationFrame to ensure DOM is updated
|
||||
requestAnimationFrame(() => {
|
||||
// Then use setTimeout to ensure browser has time to process tab switch
|
||||
setTimeout(() => {
|
||||
if (gURLBar) {
|
||||
try {
|
||||
gURLBar.select();
|
||||
} catch (e) {
|
||||
console.warn('Error selecting URL bar:', e);
|
||||
}
|
||||
// Use requestAnimationFrame to ensure DOM is updated
|
||||
requestAnimationFrame(() => {
|
||||
// Then use setTimeout to ensure browser has time to process tab switch
|
||||
setTimeout(() => {
|
||||
if (gURLBar) {
|
||||
try {
|
||||
gURLBar.select();
|
||||
} catch (e) {
|
||||
console.warn('Error selecting URL bar:', e);
|
||||
}
|
||||
resolve();
|
||||
}, 50);
|
||||
});
|
||||
};
|
||||
}
|
||||
}, 50);
|
||||
});
|
||||
};
|
||||
|
||||
window.addEventListener('TabSelect', tabSelectListener, { once: true });
|
||||
});
|
||||
window.addEventListener('TabSelect', tabSelectListener, { once: true });
|
||||
}
|
||||
|
||||
// Safely switch to the empty tab using our debounced method
|
||||
@@ -483,7 +479,7 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
await new Promise((resolve) => {
|
||||
workspaceWrapper.addEventListener(
|
||||
'ZenWorkspaceAttached',
|
||||
(event) => {
|
||||
() => {
|
||||
this._organizeTabsToWorkspaceSections(
|
||||
workspace,
|
||||
workspaceWrapper.tabsContainer,
|
||||
@@ -589,7 +585,6 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
if (event.deltaMode !== 1) return;
|
||||
|
||||
const isVerticalScroll = event.deltaY && !event.deltaX;
|
||||
const isHorizontalScroll = event.deltaX && !event.deltaY;
|
||||
|
||||
//if the scroll is vertical this checks that a modifier key is used before proceeding
|
||||
if (isVerticalScroll) {
|
||||
@@ -665,7 +660,7 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
);
|
||||
}
|
||||
|
||||
_popupOpenHandler(event) {
|
||||
_popupOpenHandler() {
|
||||
// If a popup is opened, we should stop the swipe gesture
|
||||
if (this._swipeState?.isGestureActive) {
|
||||
document.documentElement.removeAttribute('swipe-gesture');
|
||||
@@ -788,7 +783,7 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
|
||||
get shouldHaveWorkspaces() {
|
||||
if (typeof this._shouldHaveWorkspaces === 'undefined') {
|
||||
let chromeFlags = docShell.treeOwner
|
||||
let chromeFlags = window.docShell.treeOwner
|
||||
.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIAppWindow).chromeFlags;
|
||||
this._shouldHaveWorkspaces =
|
||||
@@ -823,7 +818,7 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
getWorkspaceFromId(id) {
|
||||
try {
|
||||
return this._workspaceCache.workspaces.find((workspace) => workspace.uuid === id);
|
||||
} catch (e) {
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1193,7 +1188,9 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
let target;
|
||||
try {
|
||||
target = event.explicitOriginalTarget?.closest('toolbarbutton');
|
||||
} catch (_) {}
|
||||
} catch (e) {
|
||||
console.error('Error getting explicitOriginalTarget in context menu:', e);
|
||||
}
|
||||
this.#contextMenuData = {
|
||||
workspaceId: target?.getAttribute('zen-workspace-id'),
|
||||
originalTarget: target,
|
||||
@@ -1686,7 +1683,7 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
if (nextWorkspace) {
|
||||
const [nextGradient, nextGrain] =
|
||||
await gZenThemePicker.getGradientForWorkspace(nextWorkspace);
|
||||
const [_, existingGrain] = await gZenThemePicker.getGradientForWorkspace(workspace);
|
||||
const existingGrain = (await gZenThemePicker.getGradientForWorkspace(workspace))[1];
|
||||
const percentage = Math.abs(offsetPixels) / 200;
|
||||
await new Promise((resolve) => {
|
||||
requestAnimationFrame(() => {
|
||||
@@ -1786,7 +1783,7 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
if (previousBackgroundOpacity) {
|
||||
previousBackgroundOpacity = parseFloat(previousBackgroundOpacity);
|
||||
}
|
||||
} catch (e) {
|
||||
} catch {
|
||||
previousBackgroundOpacity = 1;
|
||||
}
|
||||
if (previousBackgroundOpacity == 1 || !previousBackgroundOpacity) {
|
||||
@@ -1794,7 +1791,6 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
} else {
|
||||
previousBackgroundOpacity = 1 - previousBackgroundOpacity;
|
||||
}
|
||||
previousBackgroundOpacity = previousBackgroundOpacity;
|
||||
gZenThemePicker.previousBackgroundOpacity = previousBackgroundOpacity;
|
||||
await new Promise((resolve) => {
|
||||
requestAnimationFrame(() => {
|
||||
@@ -2591,7 +2587,7 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
|
||||
// Tab browser utilities
|
||||
|
||||
getContextIdIfNeeded(userContextId, fromExternal, allowInheritPrincipal) {
|
||||
getContextIdIfNeeded(userContextId, fromExternal) {
|
||||
if (!this.workspaceEnabled) {
|
||||
return [userContextId, false, undefined];
|
||||
}
|
||||
@@ -2793,7 +2789,7 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
}
|
||||
}
|
||||
|
||||
async switchIfNeeded(browser, i) {
|
||||
async switchIfNeeded(browser) {
|
||||
const tab = gBrowser.getTabForBrowser(browser);
|
||||
await this.switchTabIfNeeded(tab);
|
||||
}
|
||||
|
@@ -246,7 +246,9 @@ ZenWorkspacesStore.prototype._validateRecord = function (record) {
|
||||
try {
|
||||
JSON.parse(record.theme_colors);
|
||||
} catch (e) {
|
||||
throw new Error(`Invalid theme_colors JSON for workspace ID ${record.id}`);
|
||||
throw new Error(
|
||||
`Invalid theme_colors JSON for workspace ID ${record.id}. Error: ${e.message}`
|
||||
);
|
||||
}
|
||||
if (record.theme_opacity != null && typeof record.theme_opacity !== 'number') {
|
||||
throw new Error(`Invalid theme_opacity for workspace ID ${record.id}`);
|
||||
@@ -390,7 +392,7 @@ ZenWorkspacesTracker.prototype.observe = async function (subject, topic, data) {
|
||||
break;
|
||||
case 'zen-workspace-removed':
|
||||
case 'zen-workspace-updated':
|
||||
case 'zen-workspace-added':
|
||||
case 'zen-workspace-added': {
|
||||
let workspaceIDs;
|
||||
if (data) {
|
||||
try {
|
||||
@@ -424,6 +426,7 @@ ZenWorkspacesTracker.prototype.observe = async function (subject, topic, data) {
|
||||
this.score += SCORE_INCREMENT_XLARGE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
this._log.error(`Error handling ${topic} in observe method`, error);
|
||||
|
307
src/zen/zen.globals.js
Normal file
307
src/zen/zen.globals.js
Normal file
@@ -0,0 +1,307 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
export default [
|
||||
'nsZenMultiWindowFeature',
|
||||
'nsZenDOMOperatedFeature',
|
||||
'nsZenPreloadedFeature',
|
||||
|
||||
'ZenThemeModifier',
|
||||
'ZenHasPolyfill',
|
||||
|
||||
'gZenOperatingSystemCommonUtils',
|
||||
'gZenCommonActions',
|
||||
|
||||
'gZenCompactModeManager',
|
||||
|
||||
'gZenUIManager',
|
||||
'gZenVerticalTabsManager',
|
||||
|
||||
'gZenWorkspaces',
|
||||
'ZenWorkspacesEngine',
|
||||
'ZenWorkspacesStorage',
|
||||
'ZenWorkspaceBookmarksStorage',
|
||||
|
||||
'gZenPinnedTabManager',
|
||||
'ZenPinnedTabsStorage',
|
||||
|
||||
'gZenEmojiPicker',
|
||||
'gZenSessionStore',
|
||||
'gZenFolders',
|
||||
'gZenMediaController',
|
||||
'gZenGlanceManager',
|
||||
|
||||
'nsZenThemePicker',
|
||||
'gZenThemePicker',
|
||||
|
||||
'gZenViewSplitter',
|
||||
|
||||
'Ci',
|
||||
'Cu',
|
||||
'Cc',
|
||||
|
||||
'gZenActorsManager',
|
||||
'JSWindowActorParent',
|
||||
'JSWindowActorChild',
|
||||
|
||||
'delayedStartupPromise',
|
||||
|
||||
'Services',
|
||||
'PathUtils',
|
||||
'ChromeUtils',
|
||||
'IOUtils',
|
||||
'XPCOMUtils',
|
||||
'AppConstants',
|
||||
'gBrowserInit',
|
||||
'gBrowser',
|
||||
'gContextMenu',
|
||||
'gMultiProcessBrowser',
|
||||
'gFissionBrowser',
|
||||
'gBrowserAllowScriptsToCloseInitialTabs',
|
||||
'gEditUIVisible',
|
||||
'gReduceMotionSetting',
|
||||
'gReduceMotionOverride',
|
||||
'shouldSuppressPopupNotifications',
|
||||
'gLazyFindCommand',
|
||||
'gPageIcons',
|
||||
'gInitialPages',
|
||||
'isInitialPage',
|
||||
'browserWindows',
|
||||
'updateBookmarkToolbarVisibility',
|
||||
'gNavigatorBundle',
|
||||
'updateFxaToolbarMenu',
|
||||
'UpdateBackForwardCommands',
|
||||
'updatePrintCommands',
|
||||
'SetClickAndHoldHandlers',
|
||||
'gClickAndHoldListenersOnElement',
|
||||
'gSessionHistoryObserver',
|
||||
'gStoragePressureObserver',
|
||||
'PopupBlockerObserver',
|
||||
'gKeywordURIFixup',
|
||||
'_createNullPrincipalFromTabUserContextId',
|
||||
'HandleAppCommandEvent',
|
||||
'BrowserCommands',
|
||||
'kSkipCacheFlags',
|
||||
'loadOneOrMoreURIs',
|
||||
'openLocation',
|
||||
'gLastOpenDirectory',
|
||||
'readFromClipboard',
|
||||
'UpdateUrlbarSearchSplitterState',
|
||||
'UpdatePopupNotificationsVisibility',
|
||||
'PageProxyClickHandler',
|
||||
'OpenSearchManager',
|
||||
'SimpleGestureEvent',
|
||||
'MozXULElement',
|
||||
'TabContextMenu',
|
||||
'CreateContainerTabMenu',
|
||||
'FillHistoryMenu',
|
||||
'toOpenWindowByType',
|
||||
'OpenBrowserWindow',
|
||||
'updateEditUIVisibility',
|
||||
'gFileMenu',
|
||||
'openNewUserContextTab',
|
||||
'XULBrowserWindow',
|
||||
'LinkTargetDisplay',
|
||||
'CombinedStopReload',
|
||||
'TabsProgressListener',
|
||||
'showFullScreenViewContextMenuItems',
|
||||
'onViewToolbarCommand',
|
||||
'setToolbarVisibility',
|
||||
'updateToggleControlLabel',
|
||||
'Win10TabletModeUpdater',
|
||||
'displaySecurityInfo',
|
||||
'gUIDensity',
|
||||
'nodeToTooltipMap',
|
||||
'nodeToShortcutMap',
|
||||
'gDynamicTooltipCache',
|
||||
'GetDynamicShortcutTooltipText',
|
||||
'UpdateDynamicShortcutTooltipText',
|
||||
'hrefAndLinkNodeForClickEvent',
|
||||
'contentAreaClick',
|
||||
'handleLinkClick',
|
||||
'middleMousePaste',
|
||||
'handleDroppedLink',
|
||||
'ToolbarContextMenu',
|
||||
'BrowserOffline',
|
||||
'CanvasPermissionPromptHelper',
|
||||
'WebAuthnPromptHelper',
|
||||
'CanCloseWindow',
|
||||
'WindowIsClosing',
|
||||
'warnAboutClosingWindow',
|
||||
'MailIntegration',
|
||||
'gRemoteControl',
|
||||
'gPrivateBrowsingUI',
|
||||
'switchToTabHavingURI',
|
||||
'gRestoreLastSessionObserver',
|
||||
'safeModeRestart',
|
||||
'duplicateTabIn',
|
||||
'MousePosTracker',
|
||||
'ToolbarIconColor',
|
||||
'PanicButtonNotifier',
|
||||
'TabDialogBox',
|
||||
'gDialogBox',
|
||||
'ConfirmationHint',
|
||||
'FirefoxViewHandler',
|
||||
'AMTelemetry',
|
||||
'AboutNewTab',
|
||||
'AboutReaderParent',
|
||||
'AddonManager',
|
||||
'BrowserTelemetryUtils',
|
||||
'BrowserUIUtils',
|
||||
'BrowserUsageTelemetry',
|
||||
'BrowserWindowTracker',
|
||||
'CFRPageActions',
|
||||
'Color',
|
||||
'ContentAnalysis',
|
||||
'ContextualIdentityService',
|
||||
'CustomizableUI',
|
||||
'DevToolsSocketStatus',
|
||||
'DownloadUtils',
|
||||
'DownloadsCommon',
|
||||
'E10SUtils',
|
||||
'ExtensionsUI',
|
||||
'HomePage',
|
||||
'LightweightThemeConsumer',
|
||||
'LoginHelper',
|
||||
'LoginManagerParent',
|
||||
'MigrationUtils',
|
||||
'NetUtil',
|
||||
'NewTabPagePreloading',
|
||||
'NewTabUtils',
|
||||
'NimbusFeatures',
|
||||
'OpenInTabsUtils',
|
||||
'PageActions',
|
||||
'PageThumbs',
|
||||
'PanelMultiView',
|
||||
'PanelView',
|
||||
'PictureInPicture',
|
||||
'PlacesTransactions',
|
||||
'PlacesUIUtils',
|
||||
'PlacesUtils',
|
||||
'PrivateBrowsingUtils',
|
||||
'ProcessHangMonitor',
|
||||
'PromptUtils',
|
||||
'ReaderMode',
|
||||
'ResetPBMPanel',
|
||||
'SafeBrowsing',
|
||||
'Sanitizer',
|
||||
'ScreenshotsUtils',
|
||||
'SearchUIUtils',
|
||||
'SessionStartup',
|
||||
'SessionStore',
|
||||
'SessionWindowUI',
|
||||
'SharingUtils',
|
||||
'ShortcutUtils',
|
||||
'SiteDataManager',
|
||||
'SitePermissions',
|
||||
'SubDialog',
|
||||
'SubDialogManager',
|
||||
'TabCrashHandler',
|
||||
'TabsSetupFlowManager',
|
||||
'TaskbarTabsChrome',
|
||||
'TelemetryEnvironment',
|
||||
'TranslationsParent',
|
||||
'UITour',
|
||||
'UpdateUtils',
|
||||
'URILoadingHelper',
|
||||
'UrlbarInput',
|
||||
'UrlbarPrefs',
|
||||
'UrlbarProviderSearchTips',
|
||||
'UrlbarTokenizer',
|
||||
'UrlbarUtils',
|
||||
'UrlbarValueFormatter',
|
||||
'Weave',
|
||||
'WebNavigationFrames',
|
||||
'webrtcUI',
|
||||
'WebsiteFilter',
|
||||
'ZoomUI',
|
||||
'fxAccounts',
|
||||
'PlacesTreeView',
|
||||
'PlacesInsertionPoint',
|
||||
'PlacesController',
|
||||
'PlacesControllerDragHelper',
|
||||
'PrintUtils',
|
||||
'ZoomManager',
|
||||
'FullZoom',
|
||||
'PanelUI',
|
||||
'gViewSourceUtils',
|
||||
'gTabsPanel',
|
||||
'BrowserAddonUI',
|
||||
'gExtensionsNotifications',
|
||||
'gUnifiedExtensions',
|
||||
'gXPInstallObserver',
|
||||
'ctrlTab',
|
||||
'CustomizationHandler',
|
||||
'AutoHideMenubar',
|
||||
'PointerLock',
|
||||
'FullScreen',
|
||||
'gIdentityHandler',
|
||||
'gPermissionPanel',
|
||||
'SelectTranslationsPanel',
|
||||
'FullPageTranslationsPanel',
|
||||
'gProtectionsHandler',
|
||||
'gGestureSupport',
|
||||
'gHistorySwipeAnimation',
|
||||
'gSafeBrowsing',
|
||||
'gSync',
|
||||
'gBrowserThumbnails',
|
||||
'nsContextMenu',
|
||||
'DownloadsPanel',
|
||||
'DownloadsOverlayLoader',
|
||||
'DownloadsView',
|
||||
'DownloadsViewUI',
|
||||
'DownloadsViewController',
|
||||
'DownloadsSummary',
|
||||
'DownloadsFooter',
|
||||
'DownloadsBlockedSubview',
|
||||
'DownloadsButton',
|
||||
'DownloadsIndicatorView',
|
||||
'gEditItemOverlay',
|
||||
'gGfxUtils',
|
||||
'ToolbarKeyboardNavigator',
|
||||
'A11yUtils',
|
||||
'gSharedTabWarning',
|
||||
'gPageStyleMenu',
|
||||
'gProfiles',
|
||||
'ContentPrefService2',
|
||||
'classifierService',
|
||||
'Favicons',
|
||||
'WindowsUIUtils',
|
||||
'BrowserHandler',
|
||||
'Marionette',
|
||||
'RemoteAgent',
|
||||
'Marionette',
|
||||
'RemoteAgent',
|
||||
'RTL_UI',
|
||||
'gLocaleChangeObserver',
|
||||
'gBrandBundle',
|
||||
'gBrowserBundle',
|
||||
'gCustomizeMode',
|
||||
'gNavToolbox',
|
||||
'gURLBar',
|
||||
'gNotificationBox',
|
||||
'InlineSpellCheckerUI',
|
||||
'PopupNotifications',
|
||||
'MacUserActivityUpdater',
|
||||
'Win7Features',
|
||||
'gToolbarKeyNavEnabled',
|
||||
'gBookmarksToolbarVisibility',
|
||||
'gFxaToolbarEnabled',
|
||||
'gFxaToolbarAccessed',
|
||||
'gAddonAbuseReportEnabled',
|
||||
'gMiddleClickNewTabUsesPasteboard',
|
||||
'gPrintEnabled',
|
||||
'gTranslationsEnabled',
|
||||
'gUseFeltPrivacyUI',
|
||||
'gReduceMotion',
|
||||
'gFindBar',
|
||||
'gFindBarInitialized',
|
||||
'gFindBarPromise',
|
||||
'SelectableProfileService',
|
||||
'ActionsProviderContextualSearch',
|
||||
'ToolbarDropHandler',
|
||||
'ProfilesDatastoreService',
|
||||
|
||||
'TAB_DROP_TYPE',
|
||||
];
|
Reference in New Issue
Block a user