Skip to content

Commit

Permalink
Added a check for Containers Mode in switchToNoList for #20
Browse files Browse the repository at this point in the history
  • Loading branch information
ke-d committed Jun 20, 2017
1 parent d7a02df commit 9e55c45
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion extension/popup/popup.js
Expand Up @@ -152,7 +152,11 @@ document.getElementById("activeModeSwitch").addEventListener("click", () => {
document.getElementById("switchToNoList").addEventListener("click", () => {
console.log("Removed from list");
if (hostUrl !== undefined) {
page.whiteList.removeURLFromLists(hostUrl, cookieStoreId);
if(page.contextualIdentitiesEnabled) {
page.whiteList.removeURLFromLists(hostUrl, cookieStoreId);
} else {
page.whiteList.removeURLFromLists(hostUrl, defaultWhiteList);
}
page.checkIfProtected(activeTab);
}
});
Expand Down
2 changes: 2 additions & 0 deletions src/services/WhiteListService.js
Expand Up @@ -98,6 +98,8 @@ class WhiteListService {
removeURLFromLists(url, cookieStoreId = defaultWhiteList) {
let otherList = this.returnOtherList(cookieStoreId);
// console.log(this.cookieWhiteList);
// console.log(url);
// console.log(cookieStoreId + " " + otherList);
this.cookieWhiteList.get(cookieStoreId).delete(url);
this.cookieWhiteList.get(otherList).delete(url);
}
Expand Down

0 comments on commit 9e55c45

Please sign in to comment.