mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1777445 - Move firefoxview to use mjs files, rather than defining sourceType for ESLint. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D150734
This commit is contained in:
parent
5091c3db76
commit
f37add548d
@ -1,11 +0,0 @@
|
||||
/* 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/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
parserOptions: {
|
||||
sourceType: "module",
|
||||
},
|
||||
};
|
@ -14,11 +14,10 @@
|
||||
<link rel="localization" href="preview/colorwaycloset.ftl">
|
||||
<link rel="stylesheet" href="chrome://global/skin/in-content/common.css">
|
||||
<link rel="stylesheet" href="chrome://browser/content/firefoxview.css">
|
||||
<script type="module" src="chrome://browser/content/tabs-pickup.js"></script>
|
||||
<script type="module" src="chrome://browser/content/firefoxview.js"></script>
|
||||
<script type="module" src="chrome://browser/content/recently-closed-tabs.js"></script>
|
||||
<script type="module" src="chrome://browser/content/tab-pickup-list.js"></script>
|
||||
<script type="module" src="chrome://browser/content/helpers.js"></script>
|
||||
<script type="module" src="chrome://browser/content/tabs-pickup.mjs"></script>
|
||||
<script type="module" src="chrome://browser/content/firefoxview.mjs"></script>
|
||||
<script type="module" src="chrome://browser/content/recently-closed-tabs.mjs"></script>
|
||||
<script type="module" src="chrome://browser/content/tab-pickup-list.mjs"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -4,8 +4,7 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
import { tabsSetupFlowManager } from "./tabs-pickup.js";
|
||||
import "./recently-closed-tabs.js";
|
||||
import { tabsSetupFlowManager } from "./tabs-pickup.mjs";
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.import(
|
||||
"resource://gre/modules/XPCOMUtils.jsm"
|
||||
@ -14,7 +13,8 @@ const { BuiltInThemes } = ChromeUtils.import(
|
||||
"resource:///modules/BuiltInThemes.jsm"
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(globalThis, {
|
||||
let lazy = {};
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
ColorwayClosetOpener: "resource:///modules/ColorwayClosetOpener.jsm",
|
||||
AddonManager: "resource://gre/modules/AddonManager.jsm",
|
||||
});
|
||||
@ -33,9 +33,7 @@ async function getColorway() {
|
||||
}
|
||||
BuiltInThemes.ensureBuiltInThemes();
|
||||
let colorwayProperties = {};
|
||||
const colorway = (
|
||||
await globalThis.AddonManager.getAddonsByTypes(["theme"])
|
||||
).find(
|
||||
const colorway = (await lazy.AddonManager.getAddonsByTypes(["theme"])).find(
|
||||
theme => theme.isActive && BuiltInThemes.isMonochromaticTheme(theme.id)
|
||||
);
|
||||
if (colorway) {
|
||||
@ -76,7 +74,7 @@ function showColorway({
|
||||
expiry: document.querySelector("#colorways-collection-expiry-date > span"),
|
||||
};
|
||||
el.button.addEventListener("click", () => {
|
||||
globalThis.ColorwayClosetOpener.openModal();
|
||||
lazy.ColorwayClosetOpener.openModal();
|
||||
});
|
||||
document.l10n.setAttributes(
|
||||
el.expiry,
|
@ -4,10 +4,10 @@
|
||||
|
||||
browser.jar:
|
||||
content/browser/firefoxview.html
|
||||
content/browser/firefoxview.js
|
||||
content/browser/firefoxview.mjs
|
||||
content/browser/firefoxview.css
|
||||
content/browser/helpers.js
|
||||
content/browser/tabs-pickup.js
|
||||
content/browser/tab-pickup-list.js
|
||||
content/browser/recently-closed-tabs.js
|
||||
content/browser/helpers.mjs
|
||||
content/browser/tabs-pickup.mjs
|
||||
content/browser/tab-pickup-list.mjs
|
||||
content/browser/recently-closed-tabs.mjs
|
||||
content/browser/colorway-background.svg (content/colorway-background.svg)
|
||||
|
@ -16,7 +16,7 @@ import {
|
||||
formatURIForDisplay,
|
||||
convertTimestamp,
|
||||
createFaviconElement,
|
||||
} from "./helpers.js";
|
||||
} from "./helpers.mjs";
|
||||
|
||||
const SS_NOTIFY_CLOSED_OBJECTS_CHANGED = "sessionstore-closed-objects-changed";
|
||||
|
@ -16,7 +16,7 @@ import {
|
||||
formatURIForDisplay,
|
||||
convertTimestamp,
|
||||
createFaviconElement,
|
||||
} from "./helpers.js";
|
||||
} from "./helpers.mjs";
|
||||
|
||||
const SYNCED_TABS_CHANGED = "services.sync.tabs.changed";
|
||||
|
Loading…
Reference in New Issue
Block a user