diff --git a/accordion.js b/accordion.js index e32bf6b..54632a9 100644 --- a/accordion.js +++ b/accordion.js @@ -20,7 +20,6 @@ const syncCategories = function (selected) { let checkbox = accordion.querySelector(".switch input"); let category = checkbox.id; - console.log(category); checkbox.checked = selected.includes(category); checkbox.addEventListener("change", () => { diff --git a/background.js b/background.js index 21fbf99..58ebf30 100644 --- a/background.js +++ b/background.js @@ -1,15 +1,21 @@ let categories = { collect: { title: "Collection of Data", - keywords: ["data", "collect"], + keywords: ["data center", "data", "collect", "content and data", "collect data"], }, usage: { title: "How do they use this data", - keywords: ["usage", "use"], + keywords: ["data to", "data from", "your data", "use of data"], }, third: { - title: "Usage of Data", - keywords: ["share", "third", "companies", "party"], + title: "Sharing your data", + keywords: [ + "share content", + "share information", + "share your", + "third party", + "third countries", + ], }, location: { title: "Location", @@ -17,7 +23,7 @@ let categories = { }, permission: { title: "Permission and Consent", - keywords: ["permission", "consent"], + keywords: ["your permission", "device permission"], }, upload: { title: "Uploaded Contents", @@ -25,7 +31,7 @@ let categories = { }, suspension: { title: "Suspension of the account", - keywords: ["suspension", "termination", "ban", "suspend", "disable", "account", "breached"], + keywords: ["suspension", "termination", "ban", "suspend", "disable", "breached"], }, }; diff --git a/popup.js b/popup.js index 409a5f9..ba71d06 100644 --- a/popup.js +++ b/popup.js @@ -51,8 +51,12 @@ activate.addEventListener("click", async () => { function highlightSelected(active) { chrome.storage.sync.get(["categories", "selected"], (result) => { - for (const el of document.querySelectorAll("*")) { + for (const el of document.querySelectorAll("*:not(html, body)")) { el.style.visibility = active ? "hidden" : "visible"; + el.style.backgroundColor = ""; + el.style.color = ""; + // el.style.height = "0px"; + // el.style.display = active ? "none" : ""; } if (active) { @@ -69,9 +73,18 @@ function highlightSelected(active) { wrapped.innerHTML = finding.textContent; wrapped.style.visibility = "visible"; + wrapped.style.backgroundColor = "#1834e9"; + wrapped.style.color = "white"; let target = finding.parentElement; target.replaceChild(wrapped, finding); + + // wrapped.style.display = ""; + // let upper = target; + // while (upper.parentElement) { + // upper.style.display = ""; + // upper = upper.parentElement; + // } } } });