let categories = { collect: { title: "Collection of Data", keywords: ["data", "collect"], }, usage: { title: "How do they use this data", keywords: ["usage", "use"], }, third: { title: "Usage of Data", keywords: ["share", "third", "companies", "party"], }, location: { title: "Location", keywords: ["location", "position", "coordinate"], }, permission: { title: "Permission and Consent", keywords: ["permission", "consent"], }, upload: { title: "Uploaded Contents", keywords: ["upload", "content"], }, suspension: { title: "Suspension of the account", keywords: ["suspension", "termination", "ban", "suspend", "disable", "account", "breached"], }, }; let selected = []; chrome.runtime.onInstalled.addListener(() => { chrome.storage.sync.set({ selected, categories }); console.log( "The default selected categories are:", selected.map((slug) => categories[slug].title).join(", ") ); });