ReOpenIn Picker Panel functional
This commit is contained in:
parent
2ae3a4d9bf
commit
7a2b46fa2d
2 changed files with 14 additions and 12 deletions
|
@ -30,7 +30,6 @@ async function init() {
|
|||
assignedUserContextId,
|
||||
false
|
||||
);
|
||||
console.log(currentTab);
|
||||
Utils.reloadInContainer(
|
||||
currentTab.url,
|
||||
false,
|
||||
|
|
|
@ -910,26 +910,29 @@ Logic.registerPanel(P_CONTAINERS_EDIT, {
|
|||
};
|
||||
break;
|
||||
case REOPEN_IN_CONTAINER:
|
||||
pickedFunction = function (identity) {
|
||||
try {
|
||||
browser.tabs.create({
|
||||
cookieStoreId: identity.cookieStoreId
|
||||
});
|
||||
pickedFunction = async function (identity) {
|
||||
const currentTab = await Utils.currentTab();
|
||||
const newUserContextId = Utils.userContextId(identity.cookieStoreId);
|
||||
console.log(currentTab);
|
||||
Utils.reloadInContainer(
|
||||
currentTab.url,
|
||||
false,
|
||||
newUserContextId,
|
||||
currentTab.index + 1,
|
||||
currentTab.active
|
||||
);
|
||||
window.close();
|
||||
} catch (e) {
|
||||
window.close();
|
||||
}
|
||||
};
|
||||
break;
|
||||
case ALWAYS_OPEN_IN_PICKER:
|
||||
default:
|
||||
pickedFunction = async function (identity) {
|
||||
const userContextId = Utils.userContextId(identity.cookieStoreId);
|
||||
const currentTab = await Utils.currentTab();
|
||||
const assignedUserContextId = Utils.userContextId(identity.cookieStoreId);
|
||||
Utils.setOrRemoveAssignment(
|
||||
currentTab.id,
|
||||
currentTab.url,
|
||||
userContextId,
|
||||
assignedUserContextId,
|
||||
false
|
||||
);
|
||||
window.close();
|
||||
|
|
Loading…
Add table
Reference in a new issue