Skip to content

Commit

Permalink
Merge pull request #437 from privacy-tech-lab/issue-436
Browse files Browse the repository at this point in the history
Issue 436
  • Loading branch information
OliverWang13 committed Nov 14, 2023
2 parents 2e1d885 + e729df6 commit a2fdc6c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
3 changes: 0 additions & 3 deletions src/background/protection/protection.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ async function updateDomainlist(details) {
let parsedDomain = parsedUrl.domain;
let currDomainValue = await storage.get(stores.domainlist, parsedDomain);

console.log(parsedDomain);
if (currDomainValue === undefined) {
storage.set(stores.domainlist, null, parsedDomain); // Sets to storage async
}
Expand Down Expand Up @@ -293,7 +292,6 @@ function dataToPopupHelper(){
if (tabs[activeTabID] !== undefined) {

requestsData = domPrev3rdParties[activeTabID][globalParsedDomain];
console.log("requests by tabID:", domPrev3rdParties);
}
return requestsData
}
Expand All @@ -302,7 +300,6 @@ function dataToPopupHelper(){
function dataToPopup(wellknownData) {

let requestsData = dataToPopupHelper(); //get requests from the helper
console.log("req data",requestsData);
chrome.tabs.query({active: true, currentWindow: true}, function(tabs){
let popupData = {
requests: requestsData,
Expand Down
4 changes: 2 additions & 2 deletions src/popup/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function renderFirstPartyDomain(parsedDomain) {

// Extension on/off renderer helper

function renderExtenionIsEnabledDisabled(isEnabled, isDomainlisted) {
function renderExtensionIsEnabledDisabled(isEnabled, isDomainlisted) {
if (isEnabled === undefined || isDomainlisted === undefined) {
document.getElementById("img").src = "../assets/play-circle-outline.svg";
document
Expand Down Expand Up @@ -449,7 +449,7 @@ document.addEventListener("DOMContentLoaded", async (event) => {
isDomainlisted = await storage.get(stores.settings, "IS_DOMAINLISTED");
parsedDomain = await getCurrentParsedDomain(); // This must happen first

renderExtenionIsEnabledDisabled(isEnabled, isDomainlisted); // Render global ENABLED/DISABLED mode
renderExtensionIsEnabledDisabled(isEnabled, isDomainlisted); // Render global ENABLED/DISABLED mode
listenerExtensionIsEnabledDisabledButton(isEnabled);

renderFirstPartyDomain(parsedDomain); // Render 1P domain
Expand Down
3 changes: 2 additions & 1 deletion src/rules/gpc_exceptions_rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"type": "modifyHeaders",
"requestHeaders": [
{ "header": "Sec-GPC", "operation": "remove" },
{ "header": "DNT", "operation": "remove" }
{ "header": "DNT", "operation": "remove" },
{ "header": "Permissions-Policy", "operation": "remove"}
]
},
"condition": {
Expand Down
3 changes: 2 additions & 1 deletion src/rules/universal_gpc_rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"type": "modifyHeaders",
"requestHeaders": [
{ "header": "Sec-GPC", "operation": "set", "value": "1" },
{ "header": "DNT", "operation": "set", "value": "1" }
{ "header": "DNT", "operation": "set", "value": "1" },
{ "header": "Permissions-Policy", "operation": "set", "value": "browsing-topics=()"}
]
},
"condition": {
Expand Down

0 comments on commit a2fdc6c

Please sign in to comment.