Adding back in legacy code without message passing code.
This commit is contained in:
@@ -63,7 +63,6 @@ const identityState = {
|
||||
const containers = await browser.contextualIdentities.query({});
|
||||
for (const id in containers) {
|
||||
const container = containers[id];
|
||||
const userContextId = backgroundLogic.getUserContextIdFromCookieStoreId(container.cookieStoreId);
|
||||
await this.remapTabsIfMissing(container.cookieStoreId);
|
||||
const containerState = await this.storageArea.get(container.cookieStoreId);
|
||||
if (containerState.openTabs > 0) {
|
||||
@@ -118,14 +117,6 @@ const identityState = {
|
||||
async remapTabsIfMissing(cookieStoreId) {
|
||||
// We already know this cookieStoreId.
|
||||
const containerState = await this.storageArea.get(cookieStoreId) || this._createIdentityState();
|
||||
//REINSTATE THIS TODO, currently buggy
|
||||
/*
|
||||
if (containerState !== null) {
|
||||
return;
|
||||
}
|
||||
*/
|
||||
const hiddenTabs = containerState.hiddenTabs;
|
||||
//END REINSTATE
|
||||
|
||||
await this.storageArea.set(cookieStoreId, containerState);
|
||||
await this.remapTabsFromUserContextId(cookieStoreId);
|
||||
@@ -141,14 +132,6 @@ const hiddenTabs = containerState.hiddenTabs;
|
||||
containerState.openTabs = tabsByContainer.length;
|
||||
await this.storageArea.set(cookieStoreId, containerState);
|
||||
},
|
||||
/*TODO check if used
|
||||
remapTab(tab) {
|
||||
const userContextId = this._getUserContextIdFromTab(tab);
|
||||
if (userContextId) {
|
||||
this.remapTabsFromUserContextId(userContextId);
|
||||
}
|
||||
},
|
||||
*/
|
||||
|
||||
_createIdentityState() {
|
||||
return {
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
</head>
|
||||
<body>
|
||||
<!--
|
||||
This didn't work for debugging in the manifest.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const tabPageCounter = {
|
||||
counters: {},
|
||||
|
||||
|
||||
@@ -487,19 +487,19 @@ Logic.registerPanel(P_CONTAINERS_LIST, {
|
||||
});
|
||||
|
||||
document.addEventListener("keydown", (e) => {
|
||||
const selectables = [...document.querySelectorAll("[tabindex='0'], [tabindex='-1']")];
|
||||
const element = document.activeElement;
|
||||
const index = selectables.indexOf(element) || 0;
|
||||
function next() {
|
||||
const nextElement = element.nextElementSibling;
|
||||
const nextElement = selectables[index + 1];
|
||||
if (nextElement) {
|
||||
//TOFIX, dunno when this broke
|
||||
nextElement.querySelector(`td[tabindex="0"]`).focus();
|
||||
nextElement.focus();
|
||||
}
|
||||
}
|
||||
function previous() {
|
||||
const previousElement = element.previousElementSibling;
|
||||
const previousElement = selectables[index - 1];
|
||||
if (previousElement) {
|
||||
//TOFIX, dunno when this broke
|
||||
previousElement.querySelector(`td[tabindex="0"]`).focus();
|
||||
previousElement.focus();
|
||||
}
|
||||
}
|
||||
switch (e.keyCode) {
|
||||
|
||||
Reference in New Issue
Block a user