1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 const { SyncedTabs } = ChromeUtils.importESModule(
8 "resource://services-sync/SyncedTabs.sys.mjs"
10 const { SyncedTabsDeckComponent } = ChromeUtils.importESModule(
11 "resource:///modules/syncedtabs/SyncedTabsDeckComponent.sys.mjs"
14 var syncedTabsDeckComponent = new SyncedTabsDeckComponent({
19 let onLoaded = () => {
20 window.top.MozXULElement.insertFTLIfNeeded("browser/syncedTabs.ftl");
22 .getElementById("SyncedTabsSidebarContext")
23 .querySelectorAll("[data-lazy-l10n-id]")
25 el.setAttribute("data-l10n-id", el.getAttribute("data-lazy-l10n-id"));
26 el.removeAttribute("data-lazy-l10n-id");
28 syncedTabsDeckComponent.init();
30 .getElementById("template-container")
31 .appendChild(syncedTabsDeckComponent.container);
34 let onUnloaded = () => {
35 removeEventListener("DOMContentLoaded", onLoaded);
36 removeEventListener("unload", onUnloaded);
37 syncedTabsDeckComponent.uninit();
40 addEventListener("DOMContentLoaded", onLoaded);
41 addEventListener("unload", onUnloaded);