I'm trying to figure out the best way to store a dictionary that has multiple entries and is updated anytime a user visits a given list of websites.
I'm looking to store this information using chrome.storage.sync, but the number of entries I'm looking to have is around ~300 websites, so it seems kind of excessive to store these as individual key:value pairs, like so: chrome.storage.sync({url : timestamp}, function () { return; } )'
Is there a way for me to use chrome storage sync like the following?
var list = ["google.com", "bing.com"]
if (list.indexOf(tab.url) > -1) {
time = Date.now();
chrome.storage.sync.set({websites[tab.url] : time}. function() { console.log( tab.url + " has been updated to time: " + time ); });
}
I can't seem to make this work, so I'm not sure if it's possible.