let categories = { collect: { title: "Collection of Data", keywords: ["data center", "data", "collect", "content and data", "collect data"], }, usage: { title: "How do they use this data", keywords: ["data to", "data from", "your data", "use of data"], }, third: { title: "Sharing your data", keywords: [ "share content", "share information", "share your", "third party", "third countries", ], }, location: { title: "Location", keywords: ["location", "position", "coordinate"], }, permission: { title: "Permission and Consent", keywords: ["your permission", "device permission"], }, upload: { title: "Uploaded Contents", keywords: ["upload", "content"], }, suspension: { title: "Suspension of the account", keywords: ["suspension", "termination", "ban", "suspend", "disable", "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(", ") ); });