added logic for attaching url to container

This commit is contained in:
Sherry Ma 2020-03-07 21:30:44 -05:00 committed by Martin D Kealey
parent d2f1ee9d70
commit 826ecf0b8b

View file

@ -1870,6 +1870,21 @@ Logic.registerPanel(P_CONTAINER_EDIT, {
const formValues = new FormData(this._editForm); const formValues = new FormData(this._editForm);
console.log(formValues.get("container-id")); console.log(formValues.get("container-id"));
console.log(formValues.get("site-name")); console.log(formValues.get("site-name"));
const url = formValues.get("site-name");
const userContextId = formValues.get("container-id");
const currentTab = await Logic.currentTab();
const tabId = currentTab.id;
try {
await browser.runtime.sendMessage({
method: "setOrRemoveAssignment",
tabId: tabId,
url: url,
userContextId: userContextId,
value: false
});
} catch (e) {
console.log(e);
}
}, },
showAssignedContainers(assignments) { showAssignedContainers(assignments) {