Refresh assignManager is proxy permission changes

This commit is contained in:
Maxx Crawford 2021-09-29 15:29:06 -05:00
parent 82e9a72235
commit c43d807873
No known key found for this signature in database
GPG key ID: 71DBD3273B65FEF9
3 changed files with 7 additions and 2 deletions

View file

@ -384,8 +384,6 @@ window.assignManager = {
permissions: ["proxy"]
});
console.log("hasProxyPermission: ", hasProxyPermission);
if (hasProxyPermission) {
browser.proxy.onRequest.addListener(this.handleProxifiedRequest, {urls: ["<all_urls>"]});
}

View file

@ -23,6 +23,9 @@ const messageHandler = {
case "resetBookmarksContext":
response = assignManager.resetBookmarksMenuItem();
break;
case "resetProxySupport":
response = assignManager.init();
break;
case "deleteContainer":
response = backgroundLogic.deleteContainer(m.message.userContextId);
break;

View file

@ -18,6 +18,10 @@ async function requestPermissions(event) {
if (permission === "bookmarks") {
browser.runtime.sendMessage({ method: "resetBookmarksContext" });
}
if (permission === "proxy") {
browser.runtime.sendMessage({ method: "resetProxySupport" });
}
}