window.localStorage vs chrome.storage.local

localStorage Pros: Synchronous, and thus easier to work with: var value = localStorage[key] Has support in Dev Tools: Resources > Local Storage to view and modify. Cons: Only stores strings, therefore you need to serialize data yourself, i.e. with JSON.stringify Is not accessible from content scripts (or rather, context scripts share it with the page … Read more

Returning Chrome storage API value without function

Here’s a tailored answer to your question. It will still be 90% long explanation why you can’t get around async, but bear with me — it will help you in general. I promise there is something pertinent to chrome.storage in the end. Before we even begin, I will reiterate canonical links for this: After calling … Read more