Skip to content

Commit

Permalink
simplify updating setting showing blocked resources container in popup
Browse files Browse the repository at this point in the history
  • Loading branch information
ablanathtanalba committed May 6, 2021
1 parent cad1393 commit 6408edb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
6 changes: 4 additions & 2 deletions src/js/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -467,13 +467,15 @@ function toggleBlockedResourcesHandler() {
$("#collapse-blocked-resources, #blockedResources").show();
$("#expand-blocked-resources").hide();
chrome.runtime.sendMessage({
type: "showTrackingDomainsSection"
type: "updateSettings",
data: { showExpandedTrackingSection: true }
});
} else {
$("#collapse-blocked-resources, #blockedResources").hide();
$("#expand-blocked-resources").show();
chrome.runtime.sendMessage({
type: "hideTrackingDomainsSection"
type: "updateSettings",
data: { showExpandedTrackingSection: false }
});
}
}
Expand Down
12 changes: 0 additions & 12 deletions src/js/webrequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -1128,18 +1128,6 @@ function dispatcher(request, sender, sendResponse) {
break;
}

case "showTrackingDomainsSection": {
badger.getSettings().setItem("showExpandedTrackingSection", true);
sendResponse();
break;
}

case "hideTrackingDomainsSection": {
badger.getSettings().setItem("showExpandedTrackingSection", false);
sendResponse();
break;
}

case "downloadCloud": {
chrome.storage.sync.get("disabledSites", function (store) {
if (chrome.runtime.lastError) {
Expand Down

0 comments on commit 6408edb

Please sign in to comment.